aboutsummaryrefslogtreecommitdiff
path: root/unix/boot/spp/rpp/ratlibr/fmtdat.r
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
committerJoe Hunkeler <jhunkeler@gmail.com>2015-08-11 16:51:37 -0400
commit40e5a5811c6ffce9b0974e93cdd927cbcf60c157 (patch)
tree4464880c571602d54f6ae114729bf62a89518057 /unix/boot/spp/rpp/ratlibr/fmtdat.r
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'unix/boot/spp/rpp/ratlibr/fmtdat.r')
-rw-r--r--unix/boot/spp/rpp/ratlibr/fmtdat.r34
1 files changed, 34 insertions, 0 deletions
diff --git a/unix/boot/spp/rpp/ratlibr/fmtdat.r b/unix/boot/spp/rpp/ratlibr/fmtdat.r
new file mode 100644
index 00000000..652b6769
--- /dev/null
+++ b/unix/boot/spp/rpp/ratlibr/fmtdat.r
@@ -0,0 +1,34 @@
+include defs
+
+# fmtdat - format date and time information
+
+ subroutine fmtdat(date, time, now, form)
+ character date(ARB), time(ARB)
+ integer now(7), form
+
+ # at present, simply return mm/dd/yy and hh:mm:ss
+ # 'form' is reserved for selecting different formats
+ # when those have been chosen.
+
+ date(1) = now(2) / 10 + DIG0
+ date(2) = mod(now(2), 10) + DIG0
+ date(3) = SLASH
+ date(4) = now(3) / 10 + DIG0
+ date(5) = mod(now(3), 10) + DIG0
+ date(6) = SLASH
+ date(7) = mod(now(1), 100) / 10 + DIG0
+ date(8) = mod(now(1), 10) + DIG0
+ date(9) = EOS
+
+ time(1) = now(4) / 10 + DIG0
+ time(2) = mod(now(4), 10) + DIG0
+ time(3) = COLON
+ time(4) = now(5) / 10 + DIG0
+ time(5) = mod(now(5), 10) + DIG0
+ time(6) = COLON
+ time(7) = now(6) / 10 + DIG0
+ time(8) = mod(now(6), 10) + DIG0
+ time(9) = EOS
+
+ return
+ end