This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: 1.7.9 : date command fails for year 1900

cygwin sent the following at Tuesday, January 24, 2012 5:00 AM
>I want to thank everybody that responded. It looks like you don't think
>this is a bug. Given that date seems to work as I expect on SL 6.0, I
>would like to make a feature request: "Fix the date command to actually
>respond with the date"

Again, what you are asking is not simple, because time and calendars are
complicated.  How does one handle leap seconds (which occur irregularly)?
How does one handle location-dependent changes between calendars (e.g.,
Julian to Gregorian), and changes in when the year starts (not always
January 1)?  There was no 2011-12-31 in Samoa and Tokelau because they
switched which side of the International Date Line they were on.  See
for more.

Here's an experiment.  (Note:  I don't have a Linux box so have not tried
this.)  Go to your SL 6.0 box and use date to find out the day 500 years
ago.  (This should put you earlier than the adoption of the Gregorian
calendar anywhere.)

$ date -d '500 years ago'

Now use cal to get a calendar of that month.  Do days of the week

Another experiment on your SL box:

$ date -d 1752-09-10

This should give an error message, since (in Britain and its
Dependencies) this date did not exist.  Does it?

$ date -d 1900-02-29

This date didn't exist in the Gregorian calendar.  (No leap year in years
divisible by 100 unless they are also divisible by 400.)  Did date give an

As I wrote earlier, you are using date to do something that it was never
intended to do.  You should seriously consider getting a tool designed to
do what you want.  Also, depending on how far you go back and where you
are interested in, human intervention maybe required.

>Big Props to all you guys that make this software possible and help out
>users like me.


- Barry
  Disclaimer: Statements made herein are not made on behalf of NIAID.

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]