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 $dt3 = DateTime-last_day_of_month( month = $month, year = 2002)
   -add( days = 1, seconds = -1 );

Which yield 

2002-12-01 00:00:-01
2003-01-01 00:00:-01

respectivly. Not quite correct.

-D
-- 
It's the wrong trousers Gromit, and they've gone wrong!


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 0.1402, perl 5.8.0, linux)

It's broken with 0.1402 under Solaris 8 (SPARC).

Works fine on HP-UX 11.00 and 11i

-D
-- 
Have the appropriate amount of fun.


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 version of that method.

It works on HPUX.

Broken on Solaris 8

-D
-- 
Dondi5 I must keep track of all this cheese


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 NEGATIVE INTEGER degrees of 
separation.


Re: Rough first draft of a FAQ

2003-05-31 Thread Dan Sully
* Ben Bennett [EMAIL PROTECTED] shaped the electrons to say...

 I have a (very) rough draft of a faq available at:
   http://www.limey.net/~fiji/perl/

Ben - I like the FAQ a lot. A suggestion though - you offer quite a few
functions that do useful things, ie: get_day_in_same_week, etc.

It'd be useful (to me at least) if those made it into a DateTime::Helpers or somesuch.

-D
--
I'm riding my bicycle 600 miles to fight AIDS! 
I've raised $1850 out of a minimum $2500 so far!
Sponsor me at: http://electricrain.com/daniel/lifecycle/sponsor/