It it now a leap year?

Mike - EMAIL IGNORED m_d_berger_1900 at yahoo.com
Wed Aug 8 21:42:55 UTC 2007


On Thu, 09 Aug 2007 06:02:27 +0930, Tim wrote:

> Andrew Parker:
>>> For bash the following will display 061 if its currently a leap year,
>>> 060 otherwise
>>> 
>>> date -d "$(date +%Y)/03/01" +%j
> 
> Kevin J. Cummings:
>> It doesn't work with dates after 2037/03/01 ....
> 
> Leaving you with thirty years to develop a solution, or spend a few
> minutes pondering whether to bother...  ;-)
> 
> But seriously, although some might think you don't need to worry about
> such things, there are programs that will need to do some work using a
> date from the future.  The matter is more urgent than immediately
> obvious.
> 
[...]

My program deals only with the present and the immediate past.
Since in 30 years I hope to celebrate (?) my 98th, it would be
quite interesting to see if the problem still concerns me. :)

Mike.





More information about the users mailing list