Time::JulianDay -- Julian calendar manipulations
use Time::JulianDay $jd = julian_day($year, $month_1_to_12, $day) $jd = local_julian_day($seconds_since_1970); $jd = gm_julian_day($seconds_since_1970); ($year, $month_1_to_12, $day) = inverse_julian_day($jd) $dow = day_of_week($jd) print (Sun,Mon,Tue,Wed,Thu,Fri,Sat)[$dow]; $seconds_since_jan_1_1970 = jd_secondslocal($jd, $hour, $min, $sec) $seconds_since_jan_1_1970 = jd_secondsgm($jd, $hour, $min, $sec) $seconds_since_jan_1_1970 = jd_timelocal($sec,$min,$hours,$mday,$month_0_to_11,$year) $seconds_since_jan_1_1970 = jd_timegm($sec,$min,$hours,$mday,$month_0_to_11,$year)
JulianDay is a package that manipulates dates as number of days since some time a long time ago. It's easy to add and subtract time using julian days...
The day_of_week returned by day_of_week() is 0 for Sunday, and 6 for Saturday and everything else is in between.
Written by David Muir Sharnoff <firstname.lastname@example.org> with help from previous work by Kurt Jaeger aka PI <email@example.com> based on postings from: Ian Miller <firstname.lastname@example.org>; Gary Puckering <email@example.com> based on Collected Algorithms of the ACM ?; and the unknown-to-me author of Time::Local.
Copyright (C) 1996-1999 David Muir Sharnoff. License hereby granted for anyone to use, modify or redistribute this module at their own risk. Please feed useful changes back to firstname.lastname@example.org.