Constructor validation of parameters

2003-07-29 Thread Dan Sully
0.13 2003-05-05 [ IMPROVEMENTS ] - DateTime now does more validation of parameters given to constructors and to the set() method, so bogus values like a month of 13 are a fatal error. I'm not entirely sure I'd call this an improvement. In 0.12 code, I'm able to do things like:

Re: Constructor validation of parameters

2003-07-29 Thread Eugene van der Pijll
Dan Sully schreef: To get the beginning and ending times of a month: 2002-12-01 00:00:00 2002-12-31 23:59:59 How would one do this with = 0.13 releases? TIMTOWTDI: my $dt2 = DateTime-new( month = $month, year = 2002) -add( months = 1 )

Re: Constructor validation of parameters

2003-07-29 Thread Dave Rolsky
On Tue, 29 Jul 2003, Dan Sully wrote: 0.13 2003-05-05 [ IMPROVEMENTS ] - DateTime now does more validation of parameters given to constructors and to the set() method, so bogus values like a month of 13 are a fatal error. I'm not entirely sure I'd call this an improvement. This

Re: Constructor validation of parameters

2003-07-29 Thread Dan Sully
* Eugene van der Pijll [EMAIL PROTECTED] shaped the electrons to say... TIMTOWTDI: my $dt2 = DateTime-new( month = $month, year = 2002) -add( months = 1 ) -truncate( to = 'month' ) -subtract( seconds = 1 ); my

Re: Constructor validation of parameters

2003-07-29 Thread Dave Rolsky
On Tue, 29 Jul 2003, Dan Sully wrote: * Dave Rolsky [EMAIL PROTECTED] shaped the electrons to say... my $dt1 = DateTime-new( month = $month, year = 2002 ); my $dt2 = $dt1-clone-add( months = 1 )-subtract( seconds = 1 ); There are several variations on the above that'd work. Which

Re: XSLoader ignoring version?

2003-07-29 Thread Joshua Hoblitt
I've gotten this as a test failure from one of the automated CPAN tester boxes, also running Solaris. It could just be an @INC problem, in that it's finding the wrong .so file first. It shouldn't be loading a .so file at all. Isn't DynaLoader aware of versioning? -J --

Re: Constructor validation of parameters

2003-07-29 Thread Dave Rolsky
On Tue, 29 Jul 2003, Dan Sully wrote: * Dave Rolsky [EMAIL PROTECTED] shaped the electrons to say... Well, obviously this is a bug in the DateTime code, as that's not what _anyone_ would expect as a result, right? Just checking to make sure that I'm not the only anyone here. =) Ah, looks

Re: Constructor validation of parameters

2003-07-29 Thread Dan Sully
* Eugene van der Pijll [EMAIL PROTECTED] shaped the electrons to say... This solution, OTOH, should work: my $dt3 = DateTime-last_day_of_month( month = $month, year = 2002) -add( days = 1 ) -subtract( seconds = 1 ); And it does. (DT version

Re: Constructor validation of parameters

2003-07-29 Thread Dan Sully
* Dave Rolsky [EMAIL PROTECTED] shaped the electrons to say... _If_ it can't find finite() or isfinite() macros/functions, a piece that can be done in XS is done in Perl (_normalize_tai_seconds). Are you running on Win32 or HPUX? I know on both those platforms it ends up using the Perl

ANNOUNCE: DateTime 0.15

2003-07-29 Thread Dave Rolsky
0.15 2003-07-29 [ IMPROVEMENTS ] - The utc_rd_values() method now returns nanoseconds in addition, Rata Die days and minutes. Based on a patch by Joshua Hoblitt. - The from_object() method expects objects to return the same values from their utc_rd_values() methods. Based on a patch by

Re: ANNOUNCE: DateTime 0.15

2003-07-29 Thread Joshua Hoblitt
On Tue, 29 Jul 2003, Dave Rolsky wrote: 0.15 2003-07-29 [ IMPROVEMENTS ] - The utc_rd_values() method now returns nanoseconds in addition, Rata Die days and minutes. Based on a patch by Joshua Hoblitt. Minutes? :) -J --

Re: Constructor validation of parameters

2003-07-29 Thread Dan Sully
* Dave Rolsky [EMAIL PROTECTED] shaped the electrons to say... It's broken with 0.1402 under Solaris 8 (SPARC). Works fine on HP-UX 11.00 and 11i Try 0.15 Works great. Thanks for the fast response. -D -- faisal my life is collapsing to what will soon be

[ANNOUNCE] DateTime::Calendar::Mayan 0.06

2003-07-29 Thread Joshua Hoblitt
Released to CPAN. Available immediately from: http://kolea.ifa.hawaii.edu/~jhoblitt/pm/DateTime-Calendar-Mayan-0.06.tar.gz Changes since 0.05 - add nanosecond preservation - fix undef being returned from utc_rd_values for rd_secs when not preserving from an object -J --

Python's 'DateTime'

2003-07-29 Thread Joshua Hoblitt
Date/Time type announcement http://www.python.org/doc/2.3/whatsnew/node18.html#SECTION000181 'DateTime' Object http://www.python.org/doc/2.3/lib/module-datetime.html Gregorian Calendar from Calendrical Calculations that requires 'DateTime'

Re: Python's 'DateTime'

2003-07-29 Thread Joshua Hoblitt
Date/Time type announcement http://www.python.org/doc/2.3/whatsnew/node18.html#SECTION000181 'DateTime' Object http://www.python.org/doc/2.3/lib/module-datetime.html Gregorian Calendar from Calendrical Calculations that requires 'DateTime'

Re: Python's 'DateTime'

2003-07-29 Thread Dave Rolsky
On Tue, 29 Jul 2003, Joshua Hoblitt wrote: 'DateTime' Object http://www.python.org/doc/2.3/lib/module-datetime.html No leap seconds. Years 1 - only! (why?!). microsecond resolution. Gregorian Calendar from Calendrical Calculations that requires 'DateTime'

Re: Python's 'DateTime'

2003-07-29 Thread Joshua Hoblitt
They suck, we rule. I forgot the 'for entertainment purposes only' disclaimer. :) -J --

Re: Python's 'DateTime'

2003-07-29 Thread Joshua Hoblitt
Just to be clear - I intended this to be humorous. I was not truly equating that 'stuff' to one true DateTime {TM}. :) Cheers, -J -- On Tue, 29 Jul 2003, Joshua Hoblitt wrote: Date/Time type announcement http://www.python.org/doc/2.3/whatsnew/node18.html#SECTION000181