Re: Dates are killing me..

2004-07-07 Thread Jeff 'japhy' Pinyan
On Jul 7, Chris Charley said: >Like Luke's solution, but using Date::Simple which comes with the standard >distro of Perl. > >#!/usr/bin/perl >use strict; >use warnings; >use Date::Calc qw/ Day_of_Week Add_Delta_Days /; This uses Date::Calc, not Date::Simple... and neither of those came with *my*

Re: Dates are killing me..

2004-07-07 Thread Chris Charley
Like Luke's solution, but using Date::Simple which comes with the standard distro of Perl. #!/usr/bin/perl use strict; use warnings; use Date::Calc qw/ Day_of_Week Add_Delta_Days /; my @days = (undef, qw/ Mon Tue Wed Thur Fri Sat Sun /); if ($ARGV[0] !~ /^\d{4}-\d{2}-\d{2}$/) { die "Date given

Re: Dates are killing me..

2004-07-07 Thread Chris Puccio
Luke, Thanks!!! Works exactly as needed! -c On Wednesday 07 July 2004 09:41 am, Bakken, Luke wrote: > > Hi Guys, > > > > I'm having a real hard time trying to figure this out.. > > > > There are tons of modules on dates, etc, but I can't seem to > > find one to do > > what I need. > > > > I have

RE: Dates are killing me..

2004-07-07 Thread Bakken, Luke
> Hi Guys, > > I'm having a real hard time trying to figure this out.. > > There are tons of modules on dates, etc, but I can't seem to > find one to do > what I need. > > I have one date, for example: 2004-07-07. > > I need to take that date, get Monday's date and Sunday's date > where 2004

Re: Dates are killing me..

2004-07-07 Thread Johan Viklund
Hi Use the following methods from the Date::Calc module from CPAN: Week_of_Year: ($week,$year) = Week_of_Year($year,$month,$day); Monday_of_Week: ($year,$month,$day) = Monday_of_Week($week,$year); Add_Delta_Days: ($year,$month,$day) = Add_Delta_Days($year,$month,$day, $Dd); Shouldn't be t

Dates are killing me..

2004-07-07 Thread Chris Puccio
Hi Guys, I'm having a real hard time trying to figure this out.. There are tons of modules on dates, etc, but I can't seem to find one to do what I need. I have one date, for example: 2004-07-07. I need to take that date, get Monday's date and Sunday's date where 2004-07-07 is between. Any s