Re: Defeating DateTime::new hour limitation

2003-09-12 Thread Dave Rolsky
On Fri, 12 Sep 2003, Claus Färber wrote:

 Dave Rolsky schrieb:
  But there are only 24 hours in a day. What should DateTime do with hour
  = 24?

 It should be the beginning of the next day, of course (i.e. 00.00 on the
 next day).
 As ISO 8601 defines T2400, people might expect that behaviour.

Then it can be handled in the DT::F::ISO8601.


-dave

/*===
House Absolute Consulting
www.houseabsolute.com
===*/


I just found your list

2003-09-12 Thread Walter Torres
I've been building my own date/time code in JS, Perl and PHP for the past 5
years.

I'd love to get involved with this effort to build a unified date/time
library for Perl, and then maybe modify it for PHP.

I can I come and play in here too?  ;)

Walter




Re: Defeating DateTime::new hour limitation

2003-09-12 Thread Systems Tweak

   Date: Fri, 12 Sep 2003 18:25:41 +0200
   From: =?ISO-8859-1?Q?Claus_F=E4rber?= [EMAIL PROTECTED]

   Dave Rolsky schrieb:
But there are only 24 hours in a day. What should DateTime do with hour
= 24?

   It should be the beginning of the next day, of course (i.e. 00.00 on the 
   next day).

Actually in my special case, it was not the next day.  Since later I
realized a different approach prevented needing a hour=24, I'd say
that a new day object doesn't need my request.

   As ISO 8601 defines T2400, people might expect that behaviour.

But this is a break of the modules rules, there is another module
handling dates that does follow your suggestion, when it is setup in a
special mode.  I was actually looking for a special mode in td.


Try this: DateTime-new( ..., hour = $hour % 24, ... );

   That's one day off.

Well, actually it would have ruined my reasons for using hour=24 in
the first place.

r