RE: DT-subtraction bugs in DT::F::Excel and DT::Event::Sunrise

2003-10-09 Thread Hill, Ronald
Hi Dave,

 
 
 On Tue, 7 Oct 2003, Hill, Ronald wrote:
 
  Thanks for that!! I just started looking at the sunrise module
  to do some updates for preserving the timezone.
 
  I just installed the new release of DateTime 0.1704
  and all tests now pass for sunrise :)
 
 0.1704 is really broken so try it again with 0.1705 just to 
 make sure ;)
 

Oh dear!!
I have installed the new DateTime update and tests for sunrise
fail :(

the 04 version was working. Here is the results

F:\perl_modules\DateTime-0.1704perl makefile.pl
Testing if you have a C compiler

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

cl  /c test.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

test.c
Checking if your kit is complete...
Looks good
Writing Makefile for DateTime

F:\perl_modules\DateTime-0.1704nmake

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

cp lib/DateTime.pm blib\lib\DateTime.pm
cp lib/DateTimePP.pm blib\lib\DateTimePP.pm
cp lib/DateTime/Duration.pm blib\lib\DateTime/Duration.pm
cp lib/DateTimePPExtra.pm blib\lib\DateTimePPExtra.pm
cp lib/DateTime/Infinite.pm blib\lib\DateTime/Infinite.pm
cp lib/DateTime/LeapSecond.pm blib\lib\DateTime/LeapSecond.pm
F:\perl\bin\perl.exe F:\Perl\lib\ExtUtils/xsubpp  -typemap
F:\Perl\lib\ExtUtils\typemap
eTime.xs  DateTime.xsc  F:\perl\bin\perl.exe -MExtUtils::Command -e mv
DateTime.xsc DateTime.c
cl -c-nologo -Gf -W3 -MD -DNDEBUG -O1 -DWIN32 -D_CONSOLE
-DNO_STRICT -DHAVE_DES_FCRYP
DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO
-DPERL_MSVCRT_READFIX -MD -DNDEBUG -O1
VERSION=\0.1704\  -DXS_VERSION=\0.1704\  -IF:\Perl\lib\CORE
DateTime.c
DateTime.c
DateTime.xs(129) : warning C4244: '=' : conversion from 'double ' to 'long
', possible loss of da
Running Mkbootstrap for DateTime ()
F:\perl\bin\perl.exe -MExtUtils::Command -e chmod 644 DateTime.bs
F:\perl\bin\perl.exe -MExtUtils::Mksymlists  -e
Mksymlists('NAME'=\DateTime\, 'DLBASE
 'DateTime', 'DL_FUNCS' = {  }, 'FUNCLIST' = [], 'IMPORTS' = {  },
'DL_VARS' = []);
link -out:blib\arch\auto\DateTime\DateTime.dll -dll -nologo
-nodefaultlib -release  -libp
:C:\Perl\lib\CORE  -machine:x86 DateTime.obj   F:\Perl\lib\CORE\perl58.lib
oldnames.lib kernel3
ib user32.lib gdi32.lib winspool.lib  comdlg32.lib advapi32.lib shell32.lib
ole32.lib oleaut32.li
netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib
odbccp32.lib msvcrt.l
-def:DateTime.def
   Creating library blib\arch\auto\DateTime\DateTime.lib and object
blib\arch\auto\DateTime\DateT
.exp
F:\perl\bin\perl.exe -MExtUtils::Command -e chmod 755
blib\arch\auto\DateTime\DateTime.dl
F:\perl\bin\perl.exe -MExtUtils::Command -e cp DateTime.bs
blib\arch\auto\DateTime\DateTi
bs
F:\perl\bin\perl.exe -MExtUtils::Command -e chmod 644
blib\arch\auto\DateTime\DateTime.bs

F:\perl_modules\DateTime-0.1704nmake install

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

Skipping F:\Perl\site\lib\auto\DateTime\DateTime.bs (unchanged)
Installing F:\Perl\site\lib\auto\DateTime\DateTime.dll
Installing F:\Perl\site\lib\auto\DateTime\DateTime.exp
Installing F:\Perl\site\lib\auto\DateTime\DateTime.lib
Installing F:\Perl\site\lib\DateTime.pm
Skipping F:\Perl\site\lib\DateTimePP.pm (unchanged)
Skipping F:\Perl\site\lib\DateTimePPExtra.pm (unchanged)
Installing F:\Perl\site\lib\DateTime\Duration.pm
Skipping F:\Perl\site\lib\DateTime\Infinite.pm (unchanged)
Skipping F:\Perl\site\lib\DateTime\LeapSecond.pm (unchanged)
Writing F:\Perl\site\lib\auto\DateTime\.packlist
Appending installation info to F:\Perl\lib/perllocal.pod

F:\perl_modules\DateTime-0.1704g:

G:\cd modules

G:\modulescd datetime-event-sunrise


G:\modules\DateTime-Event-Sunriseperl makefile.pl
Checking if your kit is complete...
Looks good
Writing Makefile for DateTime::Event::Sunrise

G:\modules\DateTime-Event-Sunrisenmake

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

cp lib/DateTime/Event/Sunrise.pm blib\lib\DateTime/Event/Sunrise.pm

G:\modules\DateTime-Event-Sunrisenmake test

Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

F:\perl\bin\perl.exe -MExtUtils::Command::MM -e test_harness(0,
'blib\lib', 'blib\ar
) t\00load.t t\01basic.t
t\00load.ok
t\01basicok
All tests successful.
Files=2, Tests=16,  1 wallclock secs ( 0.00 cusr +  0.00 csys =  0.00 CPU)

G:\modules\DateTime-Event-Sunrise

G:\modules\DateTime-Event-Sunrisef:

F:\perl_modules\DateTime-0.1704cd ..

F:\perl_modulescd datetime-0.1705

F:\perl_modules\DateTime-0.1705nmake distclean

Microsoft (R) 

RE: DT-subtraction bugs in DT::F::Excel and DT::Event::Sunrise

2003-10-07 Thread Dave Rolsky
On Tue, 7 Oct 2003, Hill, Ronald wrote:

 Thanks for that!! I just started looking at the sunrise module
 to do some updates for preserving the timezone.

 I just installed the new release of DateTime 0.1704
 and all tests now pass for sunrise :)

0.1704 is really broken so try it again with 0.1705 just to make sure ;)


-dave

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


Re: DT-subtraction bugs in DT::F::Excel and DT::Event::Sunrise

2003-10-04 Thread RIck Measham
Flavio S. Glock wrote:
 BTW, how about adding a simple formatter to DT::Duration,
 something like a stripped down DateTime::Format::ICal-format_duration ?

This would be really good. I actually rolled my own duration for some
subtractions I was doing because I wasn't real happy with the current one.
I'd like to be able to do things like:

$dd-normalise( base = $dt );
Which would turn 26 hours into 1 day, 2 hours. 
Which would turn 34 days into 1 month, 3 days if base is in a 31 day month

$dd-as_seconds
Returns the duration in fractional seconds. 1 days becomes 86400.00

$dd-seconds
Return the seconds in the duration. If we've normalised, this will be
between 0 and 59

$dd-as and $dd-___ would also exist.

Then there'd be
$dd-as( 'hours', 'minutes');
returning as array where the duration is returned as hours and minutes. The
last element of the array would be a float.

Cheers!
Rick


-- 
Obviously the reply-to is a fake. Just change the 'spam-' to 'i' so that the
result sounds like why you go to an optometerist.


Re: DT-subtraction bugs in DT::F::Excel and DT::Event::Sunrise

2003-10-03 Thread Eugene van der Pijll
Dave Rolsky schreef:
 On Fri, 3 Oct 2003, Eugene van der Pijll wrote:
 
  $dt1-subtract_datetime( $dt2,
   [ 'months', 'days', 'minutes', 'seconds' ] );
 
 
 It's not hard, just a little bit of math.  I'm more concerned with the
 API.  I don't like the one you have up there, but I don't want to just
 change the existing syntax either, maybe something like:
 
  $dt1-subtract_datetime( $dt2 ); # current behavior
 
  $dt1-subtract_datetime( datetime = $dt2,
   units = [ qw( days minutes nanoseconds ) ] );

I didn't really like my API either, but a function with two different
API's isn't very nice either. I can live with both, though, if there is
no better solution.

Eugene