[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Deb package for Julian date?



Godric <godric@dial.pipex.com> writes:
>Hi. Anyone know if there is a deb package (I'm using Slink still with
>2.0.36 kernel) for converting ordinary dates into Julian dates (as used
>in Astronomy)? Or if no debs then any GNU/Linux package which I could
>use alien on?

The "date" command (in the shellutils package, you probably have it
already installed) can display the day of the year:

rjs@anar:~$ date
Sun Dec  5 22:42:21 EET 1999
rjs@anar:~$ date +%j-%Y
339-1999
rjs@anar:~$ date +%j-%Y -d'March 12, 1996'
072-1996
rjs@anar:~$ date +%j-%Y -d'March 12, 1997'
071-1997

Also, "cal" (in the bsdmainutils package, probably also installed on
your system...) can display Julian dates in its calendar:

rjs@anar:~$ cal -j
       December 1999
  S   M  Tu   W  Th   F   S
            335 336 337 338
339 340 341 342 343 344 345
346 347 348 349 350 351 352
353 354 355 356 357 358 359
360 361 362 363 364 365

"date" can also do conversion in the other direction:

rjs@anar:~$ date -d'January 1, 1997 + 71 days'
Thu Mar 13 00:00:00 EET 1997
rjs@anar:~$ date -d'January 1, 1996 + 71 days'
Tue Mar 12 00:00:00 EET 1996

-- 
-=- Rjs -=- rjs@lloke.dna.fi


Reply to: