OT The problem is very old. TSO, Time Sharing Option, was IBM's first
commercial timesharing product. Its interactivity offered the first way for
most enterprise customers off punched cards. When the date first went from
February 28 to February 29 in 1972, the date on the session startup message
read "March 0".

On Sat, Nov 6, 2010 at 9:30 AM, Michael Pavling <[email protected]> wrote:

> On 3 November 2010 14:56, Rob Biedenharn <[email protected]>
> wrote:
> > Current versions of ActiveSupport handle this properly, but older
> versions
> > that treat 1.month simply as 30 days of seconds would fail to do the
> > expected thing for dates in March (or any dates in months that follow a
> 31
> > day month -- yeah, it's not looking too good).
>
> ah... the old parsing "31st Feb" giving no error, but instead
> returning "3rd March" :-)
>
> You can also avoid errors given by "Date.today.beginning_of_month -
> 1.month" or "Date.today.beginning_of_month.ago(1.month)" by using
> "Date.today.beginning_of_month.ago(1.day).beginning_of_month" as
> another alternative.
>
> Dates and times are horrible...
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<rubyonrails-talk%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to