Geoff B wrote:
> On Sep 8, 5:46 am, Tom Lea <[EMAIL PROTECTED]> wrote:
>> So no, 1.5.days.ago is not the same as 36.hours.ago in all cases, but
>> it is the same a (1.days + 12.hours).ago in all cases.
> 
> So, in other words, the fractional part of a day would always be
> relative to a standard 24 hour day, whereas the integer part will be
> sensitive to the 23 and 25 hour days that occur once per year in zones
> with DST.
> 
> One issue with this setup would be:
> 
> Time.now + 1.5.days + 1.5.days
> 
> would not always return the same result as:
> 
> Time.now + 3.days
> 
> Is this edge case acceptable? Thoughts?

This seems fine to me.  It's definitely a little counter-intuitive at
first, but any other solution would likely be a more confusing.  So I
think this is a net improvement for sure.



-- 
Cheers,

Koz


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to