aboutsummaryrefslogtreecommitdiff
path: root/noao/imred/vtel/d1900.x
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 /noao/imred/vtel/d1900.x
downloadiraf-osx-40e5a5811c6ffce9b0974e93cdd927cbcf60c157.tar.gz
Repatch (from linux) of OSX IRAF
Diffstat (limited to 'noao/imred/vtel/d1900.x')
-rw-r--r--noao/imred/vtel/d1900.x15
1 files changed, 15 insertions, 0 deletions
diff --git a/noao/imred/vtel/d1900.x b/noao/imred/vtel/d1900.x
new file mode 100644
index 00000000..7af25a4b
--- /dev/null
+++ b/noao/imred/vtel/d1900.x
@@ -0,0 +1,15 @@
+# D1900 -- Function to return the number of days since the turn of the
+# century.
+
+int procedure d1900 (month, day, year)
+
+int month, day, year # m,d,y of date
+
+int mac[12]
+data mac/0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334/
+
+begin
+ d1900 = 365 * year + (year - 1) / 4 + mac[month] + day
+ if (month >= 3 && mod(year,4) == 0)
+ d1900 = d1900 + 1
+end