Sys(1), Sys(10), Sys(11)
To everything there is a purpose, and a time to everything under heaven.
Ecclesiastes
If you are like us and never had a need to use the Julian date system, you've probably assumed that it was named for some dead Roman emperor, Julius somebody, and was based on some arcane mythology or astrological event. Not so, bucko.While many of us prefer to count the days, weeks, fortnights, months and years as they go by, some scientists prefer to just have a serial number to distinguish today from yesterday, this night from one a hundred days ago. They may have a point. Joseph Scaliger in 1582 devised a numbering scheme based on the intersection of three major cycles: the 28-year solar cycle, the 19-year lunar cycle and the 15-year indiction cycle (the tax period used in the Ancient Roman Empire) and determined that the last date on which all these cycles started on the same date was January 1, 4713 B.C., and therefore called this Julian Day One. He named it Julian after his father, Julius. And we've been counting ever since.At least that's one story we've read. Another is that these are sequential numbers since the date of the Great Flood. Since we weren't around for either of these events, we're not too worried about the truth of them, just what FoxPro can do with these numbers.The Visual FoxPro facility for dates, as we mentioned in "DBF, FPT, CDX, DBC—Hike!" is accurate only back to 1752. The FoxPro help file cautiously points out that this is true only in the United States. We suspect it is also as accurate in the British Empire and former colonies, but know it took the Russian Revolution of 1918 to bring that region into compliance. If you're implementing an application outside the U.S. and need historical accuracy, you'd be wise to consult your neighborhood chronologist.So the Julian numbering scheme may be a good way to get around all these local squabbles about what day it is. For dates in the distant past, though, you may need to devise your own algorithm, but once it's created, math on those numbers will be accurate against the values returned by these functions.
Usage |
cDateJ = SYS( 1 ) cJtoC = SYS( 10, nExpression ) cDtoJ = SYS( 11, dExpression | tExpression | cExpression ) |
See Also |