06-11-2004, 08:58 PM
Let me trya again
The parameters are year, month, day, ut (universal time zone my is GMT-3 so is -3, in GMT is 0 ).
When i put fix(a) i mean it to be the greatest integer less than a. Ej. 1.34 -> 1, -2.3 -> -3, 1.75 -> 1, -2.7 -> -3.
I tune my programin knowing that may 25th of 1810 was friday. Then i try current date and my birthday date.
Google "julian date" and pick up Eric Weisstein's world of astronomy. I dont know why the link doesnt work i copy from the address bar :???:.
I think it should work.
The parameters are year, month, day, ut (universal time zone my is GMT-3 so is -3, in GMT is 0 ).
When i put fix(a) i mean it to be the greatest integer less than a. Ej. 1.34 -> 1, -2.3 -> -3, 1.75 -> 1, -2.7 -> -3.
I tune my programin knowing that may 25th of 1810 was friday. Then i try current date and my birthday date.
Code:
a# = JulianDate#(2004, 6, 11, 0) '-> current date is friday
b# = JulianDate#(1900, 1, 1, 0) '-> date to test
d& = FIX(a# - b#) ' -> days elapsed
PRINT "January 1th, 1900 was ";
SELECT CASE d& MOD 7 ' -> we get day of the week
CASE 0: PRINT "friday" '-> same day of the week
CASE 1: PRINT "thursday" '-> b is the day after so b is thursday
CASE 2: PRINT "wednesday" '-> and so on
CASE 3: PRINT "tuesday"
CASE 4: PRINT "monday"
CASE 5: PRINT "sunday"
CASE 6: PRINT "saturday"
END SELECT
Google "julian date" and pick up Eric Weisstein's world of astronomy. I dont know why the link doesnt work i copy from the address bar :???:.
I think it should work.