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
>> 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
> 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
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
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
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
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
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' );
>
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)
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.
>
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
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
>
>
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
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
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
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
[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)
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
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
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
. 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
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
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
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
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
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
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.
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
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
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
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
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
: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
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: [
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};
> >
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
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
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
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
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
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
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.
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
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
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&
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
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
47 matches
Mail list logo