At 8:56 AM EST on March 13 darren chamberlain sent off: > Quoting Rob Reid <[EMAIL PROTECTED]> [Mar 12, 2002 18:43]: > > Modified Julian Dates are completely numeric and therefore > > suitable for all Earthlings (not just astronomers) but > > unfortunately my /bin/date, from Red Hat's sh-utils-2.0-11 RPM, > > doesn't support them. It really should. > > Completely unrelated to the rest of this thread, but: > > $ rpm -qi sh-utils | head -2 | cut -c-30 > Name : sh-utils > Version : 2.0.11 > > $ /bin/date +%j > 072 > > The sh-utils on my RH 7.2 box seems to support julian dates just > fine. > > (darren) >
At 9:14 AM EST on March 13 Knute sent off: > That is not a julian date! It's the day of the year! > > $ man date |grep j > Reformatting date(1), please wait... > %j day of year (001..366) You're both sort of right. Julian dates are day numbers, but they start from January 1, 4713 B.C., when the solar, lunar, and Roman tax collection cycles were all synched up. So the Julian date right now is 2452347.25770. Note that hours, minutes, and seconds are included in the decimal digits, which is one big reason why date's +%j isn't good enough.* Despite the connection to Roman taxes, Julian dates were introduced in the same year as the Gregorian calendar and were named after the inventor's father (who happened to be Julius Caesar Scaliger). * I know, a script could calculate it from %H, %m, and %s, but I think date itself would be the ideal utility to do it. The Modified Julian Date (MJD) starts from November 17, 1858. All it does is knock off 2400000.50000 from the Julian date for convienience. (Julian days are really nights in England, which suited European astronomers just fine, but eventually the system spread around all time zones and the 12 hour offset from Greenwich time was just a nuisance.) Astronomers love MJDs because they allow easy calculation (i.e. one subtraction) of arbitrarily long time intervals without base 24 and 60 conversions and leap day calculations. For this reason /bin/date probably has something very similar in its guts (probably starting from 1970) so it's disappointing that it doesn't provide it for external use. Some of you are thinking that you *like* seeing month names and so on. Fine. Use the ISO standard and have your MUA and/or editor parse it* and translate into your preferred language. If everyone uses a standard ordering of the fields it should be easy enough to substitute in the right month name. Or even better, the attribution could have the MJD and the reader would pass it through a fixed up date and display the user's preferred format. * already done for sorting. -- "Let's just sit here a moment and savor the impending terror." - Calvin Robert I. Reid <[EMAIL PROTECTED]> http://astro.utoronto.ca/~reid/ PGP Key: http://astro.utoronto.ca/~reid/pgp.html