Re: Date::Manip DateCalc

2013-03-29 Thread Lawrence Statton
On 03/29/2013 03:01 PM, Grant wrote: I'm getting strange results from a business days calculation with Date::Manip. Everything works as expected if I use a number of days between 1 and 6, but after 6 the resulting date doesn't seem to be based on business days. It is worth no

Re: Date::Manip DateCalc

2013-03-29 Thread Grant
>> I'm getting strange results from a business days calculation with >> Date::Manip. Everything works as expected if I use a number of days >> between 1 and 6, but after 6 the resulting date doesn't seem to be >> based on business days. >> >> my

Re: Date::Manip DateCalc

2013-03-29 Thread Owen
> I'm getting strange results from a business days calculation with > Date::Manip. Everything works as expected if I use a number of days > between 1 and 6, but after 6 the resulting date doesn't seem to be > based on business days. > > my $unparsed_date = DateCalc

Date::Manip DateCalc

2013-03-29 Thread Grant
I'm getting strange results from a business days calculation with Date::Manip. Everything works as expected if I use a number of days between 1 and 6, but after 6 the resulting date doesn't seem to be based on business days. my $unparsed_date = DateCalc("today","+ 6 days

Re: Date::Manip question

2012-11-08 Thread Gerhard
On Thu, Nov 08, 2012 at 10:56:00AM +, Marco van Kammen wrote: > my $current_month =(should be Nov) > my $current_mont_num = (should be 11) > my $previous_month = (should be Oct) > my $previous_month_num = (should be 10) There is Time::Piece and

Re: Date::Manip question

2012-11-08 Thread Ken Slater
On Thu, Nov 8, 2012 at 7:42 AM, Marco van Kammen wrote: > Yeah, so something like this: > > #!/usr/bin/perl > > use strict; > use warnings; > > my $previous_month; > my $previous_month_num; > > my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); > > my @months = ( 'JAN', 'F

RE: Date::Manip question

2012-11-08 Thread Marco van Kammen
evious_month_num\n"; seems to work... :-) Thanks all! Marco van Kammen Applicatiebeheerder Mirabeau | Managed ServicesDr. C.J.K. van Aalstweg 8F 301, 1625 NV Hoorn +31(0)20-5950550 - www.mirabeau.nl Please consider the environment before printing this email

Re: Date::Manip question

2012-11-08 Thread David Precious
On Thu, 8 Nov 2012 12:53:31 +0100 Rob Coops wrote: > Something like the below would do perfectly fine... > > my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = > localtime(time); > > my @months = ( 'JAN', 'FEB', 'MAR', 'APR', 'MAY', 'JUN', 'JUL', 'AUG', > 'SEP', 'OCT', 'NOV', 'DEC' ); >

Re: Date::Manip question

2012-11-08 Thread Rob Coops
riables. >> >> ** ** >> >> my $current_month =(should be Nov) >> >> my $current_mont_num = (should be 11) >> >> my $previous_month = (should be Oct) >> >> my $previous_month_num = (should be 10)

Re: Date::Manip question

2012-11-08 Thread Rob Coops
t_mont_num = (should be 11) > > my $previous_month = (should be Oct) > > my $previous_month_num = (should be 10)**** > > ** ** > > I’ve been looking at the module Date::Manip to get this going, but I can’t > seem to get it working. >

Date::Manip question

2012-11-08 Thread Marco van Kammen
been looking at the module Date::Manip to get this going, but I can't seem to get it working. Any help in the right direction would be appreciated. With Kind Regards, [cid:blank1c63.gif] Marco van Kammen Applicatiebeheerder [cid:blank52fd.gif] [cid:blank4113.gif] Mirabeau | Managed Serv

Re: Of Date-Manip and Perl versions

2012-03-09 Thread Bruce Ferrell
ains timestamp() > > use Date::Manip; > ... > > Shouldn't this have thrown SOME kind of error/warning what was going on? > > You might want to make that suggestion to the module maintainer: > > https://rt.cpan.org/Public/Dist/Display.html?Name=Date-Manip > >

Re: Of Date-Manip and Perl versions

2012-03-09 Thread David Christensen
On 03/08/2012 11:53 AM, Bruce Ferrell wrote: Just thought I'd share with the group and experience I just had. In perhaps the hope of sparing others of the PITA I just went through. ... > use Common; # contains timestamp() > use Date::Manip; ... > Shouldn't this have thrown

Re: Of Date-Manip and Perl versions

2012-03-08 Thread Bruce Ferrell
function weren't working I first had >> to find the location of the failing code. Is it being passed it's necessary >> data. Yep... OK, so what's >> wrong? Any errors thrown? Nope. OK, extract the code into a test program >> (below, suitably "c

Of Date-Manip and Perl versions

2012-03-08 Thread Bruce Ferrell
data. Yep... OK, so what's wrong? Any errors thrown? Nope. OK, extract the code into a test program (below, suitably "cleaned" to disguise what it really is). "In circuit" the code runs as a daemon and errors aren't easy to get at. #!/usr/bin/perl -w use lib

Re: Date::Manip

2008-05-12 Thread reader
Rob Dixon <[EMAIL PROTECTED]> writes: >> What is the right syntax? > > print $date = ParseDate("epoch 1210628919") . "\n"; Egad, and there is a big NOTE in perldoc Date::Manip about that very thing... thanks for you patience For anyone finding these pos

Re: Date::Manip

2008-05-12 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > Can soneone show me how to convert unix time to something else using > Date:: Manip? > > AFter looking at the Docs in perldoc Date::Manip I thought maybe (from > the examples) something like script below would work. The first two > (now commented)

Date::Manip

2008-05-12 Thread reader
Can soneone show me how to convert unix time to something else using Date:: Manip? AFter looking at the Docs in perldoc Date::Manip I thought maybe (from the examples) something like script below would work. The first two (now commented) worked as expected but the one with unix date produces a

Re: FW: How to install Date::Manip on cygwin perl?

2008-04-08 Thread [EMAIL PROTECTED]
file in ~/. > Something is probably expanding $HOME and not quoting the result. I looked in > CPAN.pm but could not figure out where it is untaring it. I looked in ~/ for > a configuration file with no luck. > > Is there a place to log a bug with CPAN? > > Gunnar: I tried

RE: FW: How to install Date::Manip on cygwin perl?

2008-03-21 Thread Siegfried Heintze (Aditi)
could not figure out where it is untaring it. I looked in ~/ for a configuration file with no luck. Is there a place to log a bug with CPAN? Gunnar: I tried your suggestion and that worked for Date::Manip but I was quickly overwhelmed with DateTime as there were many dependencies to download

RE: FW: How to install Date::Manip on cygwin perl?

2008-03-20 Thread Bob McConnell
. I didn't have to fiddle with anything in the MS-Windows setup afterwards. It just worked. Bob McConnell -Original Message- From: Siegfried Heintze (Aditi) [mailto:[EMAIL PROTECTED] Sent: Thursday, March 20, 2008 3:32 PM To: beginners@perl.org Subject: RE: FW: How to install Date::Manip

RE: FW: How to install Date::Manip on cygwin perl?

2008-03-20 Thread Siegfried Heintze (Aditi)
Ah! Good idea! How do I do that with CPAN? -Original Message- From: Bob McConnell [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 12:46 PM To: Gunnar Hjalmarsson; beginners@perl.org Subject: RE: FW: How to install Date::Manip on cygwin perl? I have always avoided the "Pr

RE: FW: How to install Date::Manip on cygwin perl?

2008-03-18 Thread Bob McConnell
s not one of their better innovations. Bob McConnell -Original Message- From: Gunnar Hjalmarsson [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 18, 2008 3:37 PM To: beginners@perl.org Subject: Re: FW: How to install Date::Manip on cygwin perl? Siegfried Heintze (Aditi) wrote: > It look

Re: FW: How to install Date::Manip on cygwin perl?

2008-03-18 Thread Gunnar Hjalmarsson
Siegfried Heintze (Aditi) wrote: It looks like the CPAN program does not anticipate paths with spaces in them. So it seems. You may want to try other methods to install the module. http://search.cpan.org/src/SBECK/Date-Manip-5.48/INSTALL -- Gunnar Hjalmarsson Email: http://www.gunnar.cc/cgi

RE: How to install Date::Manip on cygwin perl?

2008-03-18 Thread Siegfried Heintze (Aditi)
Can someone advise me as to where I should put the quotes? All I did was type perl -MCPAN -e 'install Date::Manip' Somewhere the is a perl script that needs to be edited. Can someone tell me what script this is? Thanks, Siegfried -Original Message- From: Mike Wohlrab [mai

RE: How to install Date::Manip on cygwin perl?

2008-03-17 Thread Mike Wohlrab
www.mikewohlrab.com -Original Message- From: Siegfried Heintze (Aditi) [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2008 6:34 PM To: beginners@perl.org Subject: FW: How to install Date::Manip on cygwin perl? Hmm... I did not see this appear on the list so I'm posting it again

FW: How to install Date::Manip on cygwin perl?

2008-03-17 Thread Siegfried Heintze (Aditi)
as a workaround! My apologies if this appears twice. Siegfried From: Siegfried Heintze (Aditi) Sent: Monday, March 17, 2008 12:42 PM To: '[EMAIL PROTECTED]' Subject: How to install Date::Manip on cygwin perl? It looks like the CPAN program does not anticipate paths with spaces in them.

Re: Date::manip query

2007-12-19 Thread Gunnar Hjalmarsson
pauld wrote: Gunnar Hjalmarsson wrote: pauld wrote: im using Date::Manip to convert dates and times eg 2007:08:02 12:23 to allow me to sort them, Why are you doing that? C:\home>type test.pl @dates = ( '2007:08:02 12:23', '2007:10:21 04:40', '20

Re: Date::manip query

2007-12-19 Thread Tom Phoenix
On 12/19/07, pauld <[EMAIL PROTECTED]> wrote: > im sorting it on a key of the hash > my @daylistsorted = sort { $$a{'START_DS'} <=> $$b{'START_DS'} } > @daylist; > generates a > Argument "2007:09:30 13:41" isn't numeric in numeric comparison (<=>) > at ./518573 Have you tried using a string comp

Re: Date::manip query

2007-12-19 Thread pauld
im sorting it on a key of the hash my @daylistsorted = sort { $$a{'START_DS'} <=> $$b{'START_DS'} } @daylist; generates a Argument "2007:09:30 13:41" isn't numeric in numeric comparison (<=>) at ./518573 error my @daylistsorted = sort { $$a{'START'} <=> $$b{'START'} } @daylist; works -- To u

Re: Date::manip query

2007-12-18 Thread Gunnar Hjalmarsson
pauld wrote: im using Date::Manip to convert dates and times eg 2007:08:02 12:23 to allow me to sort them, Why are you doing that? C:\home>type test.pl @dates = ( '2007:08:02 12:23', '2007:10:21 04:40', '2007:06:05 16:08', '2007:09:11 2

Re: Date::manip query

2007-12-18 Thread pauld
the END_DS field is the date field that I want - but as I couldnt get it back from the seconds since epoch field I included it. IMHO it would be tideir to just use the (numerical) date-seconds and convert it back as necessary . i used the Date::Manip function Date_SecsSince1970($m,$d,$y,$h,$mn

Re: Date::manip query

2007-12-18 Thread Rob Dixon
:04 10:33 duration 58 interval to next start 34 4 from 2007:08:04 11:07 to 2007:08:04 13:29 duration 142 interval to next start 26 Your START and END fields appear to be seconds since epoch, whereas the END_DS field is in the form '%Y:%m:%d %H:%M' as you described in

Re: Date::manip query

2007-12-17 Thread Chas. Owens
On Dec 18, 2007 1:05 AM, John W. Krahn <[EMAIL PROTECTED]> wrote: snip > > printf ( > > "%s from $s to %s duration %s %s\n", snip You missed the usage of $s instead of %s. I always get bitten by that. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [

Re: Date::manip query

2007-12-17 Thread John W . Krahn
On Monday 17 December 2007 15:40, [EMAIL PROTECTED] wrote: > > On Dec 17, 3:22 am, [EMAIL PROTECTED] (Pauld) wrote: > > > > my $var=0;my [EMAIL PROTECTED]; > > while ($var<$va_length) > > { > > print "${$daylistsorted[$var]}{TH} "; > > print 'from '; > > print ${$daylistsorted[$var]}{START}; > >

Re: Date::manip query

2007-12-17 Thread davidfilmer
On Dec 17, 3:22 am, [EMAIL PROTECTED] (Pauld) wrote: > my $var=0;my [EMAIL PROTECTED]; > while ($var<$va_length) > { > print "${$daylistsorted[$var]}{TH} "; > print 'from '; > print ${$daylistsorted[$var]}{START}; > print ' to '.${$daylistsorted[$var]}{END_DS}; > print " duration ";print int

Re: Date::manip query

2007-12-17 Thread pauld
im importing data from an excel spreadsheet into an array of hashes. the date is initially converted using Date::Format::Excel. for this bit {START} = unix start time .{START_DS} = string that I use to convert to unixtime with my $var=0;my [EMAIL PROTECTED]; while ($var<$va_length) { print "${$d

Re: Date::manip query

2007-12-16 Thread Rob Dixon
pauld wrote: > im using Date::Manip to convert dates and times eg 2007:08:02 12:23 to allow me to sort them, which it does . but I cant see how to get the number back into a human -readable format print scalar localtime($var{STARTTIME}); prints the long string . is there a better way to

Re: Date::manip query

2007-12-16 Thread John W . Krahn
On Sunday 16 December 2007 04:31, pauld wrote: > > im using Date::Manip to convert dates and times eg 2007:08:02 12:23 > to allow me to sort them, which it does . > but I cant see how to get the number back into a human -readable > format Use the UnixDate() function that comes w

Date::manip query

2007-12-16 Thread pauld
im using Date::Manip to convert dates and times eg 2007:08:02 12:23 to allow me to sort them, which it does . but I cant see how to get the number back into a human -readable format print scalar localtime($var{STARTTIME}); prints the long string . is there a better way to get just the bits I

Re: Date::Manip Delta_Format aprox question

2005-11-17 Thread Dermot Paikkos
On 17 Nov 2005 at 11:36, Rianne Ubbink wrote: > Hello, > > For a program that I'm writing atm I have to calculate the number of > months between two dates. The months format is 2005-11-17 and I've been > able to get a nice delta with the time in between de two dates. > This sounds like a jobs

Date::Manip Delta_Format aprox question

2005-11-17 Thread Rianne Ubbink
it doesnt use it anymore. I also tried to put the approx in the $delta .. well ofcourse that didnt work either. And I did set the correct timezone for Date::Manip I cant seem to find anything other in the manpages about this. And on the web I cant seem to find anyone that uses the approx.

Re: Using Delta_Format in Date::Manip

2002-09-19 Thread Steve
At 12:40 PM 9/19/02 , you wrote: >Steve wrote: > > > I just read the help file for Date::Manip concerning Delta > > Format. Delta_Format seems to be what I want for what I want to do but I > > can't quite get to to work. I have this: > > > > m

Re: Using Delta_Format in Date::Manip

2002-09-19 Thread david
Steve wrote: > I just read the help file for Date::Manip concerning Delta > Format. Delta_Format seems to be what I want for what I want to do but I > can't quite get to to work. I have this: > > my $diff_tot=&Delta_Format($diff,3,@format); > > @format is set t

Using Delta_Format in Date::Manip

2002-09-18 Thread Steve
I just read the help file for Date::Manip concerning Delta Format. Delta_Format seems to be what I want for what I want to do but I can't quite get to to work. I have this: my $diff_tot=&Delta_Format($diff,3,@format); @format is set to %MNt. But all I get printed out is "MNt&

Date::Manip acting strange (must be me)

2001-09-14 Thread Schooley, Chris
problem is that I am trying to use Date::Manip to get user input and then convert it to seconds since 1970. When I try to use the &Date_SecsSince1970() subroutine the program hangs. Thanks, Chris #!/usr/bin/perl -w use Date::Manip; #use Time::Ctime; &Date_Init(); sub period_begin { loca

Date::Manip - Date calculation

2001-06-23 Thread Adrian Harper
15:47:07". At the moment, I have been trying to write code to use Date:Manip to convert the time string into seconds elapsed since Jan 1st 1970 and then subtracting this number from the result of using $currentTime = time. From the Date::Manip docs it seems that the following code below shou