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 noting - the docume
>> 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",3);
>>
> 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",3);
> my $da
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' );
>
On Thu, Nov 8, 2012 at 12:53 PM, Rob Coops wrote:
>
> On Thu, Nov 8, 2012 at 11:56 AM, Marco van Kammen
> wrote:
>
>> Hi List,
>>
>> ** **
>>
>> For a logrotation and cleanup script I want to fill the following
>> variables.
>>
>> ** **
>>
>> my $current_month =(shou
On Thu, Nov 8, 2012 at 11:56 AM, Marco van Kammen wrote:
> Hi List,
>
> ** **
>
> For a logrotation and cleanup script I want to fill the following
> variables.
>
> ** **
>
> my $current_month =(should be Nov)
>
> my $current_mont_num = (should be 11)
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 posts with a search:
(From perldoc Date::M
[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) worked as expected bu
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',
'2007:06:05 16:08', '2007:09:11 22
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 22:20', );
print "$_\n" for sort @dates;
C
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,$
pauld wrote:
>
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_leng
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 get ju
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 with Date::Manip.
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
24 matches
Mail list logo