Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leap year #5

Open
rfrohl opened this issue Feb 29, 2012 · 1 comment
Open

leap year #5

rfrohl opened this issue Feb 29, 2012 · 1 comment

Comments

@rfrohl
Copy link

rfrohl commented Feb 29, 2012

Hi,
fitting for this day we found a bug concerning the leap year.
See the following example:

Timeliness.parse('2012', :format => 'yyyy', :strict => true)
2012-02-29 00:00:00 +0100

Timeliness.parse('2008', :format => 'yyyy', :strict => true)
2008-02-29 00:00:00 +0100

Timeliness.parse('2009', :format => 'yyyy', :strict => true)
nil

Timeliness.parse('2010', :format => 'yyyy', :strict => true)
nil
Timeliness.parse('2011-02', :format => 'yyyy-mm', :strict => true)
nil

Maybe Timeliness could check for this(29.02.) and return something like 28. 02. instead.

Regards,
Robert

@adzap
Copy link
Owner

adzap commented Mar 1, 2012

Oh damn, a leap year bug. I think advancing to March 1 would probably be the way to go. Need to think about it I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants