bfdi533 has asked for the wisdom of the Perl Monks concerning the following question:
I have the following code that I have been using to get the date for "next Thursday" but it runs VERY slow. From what I can tell it is because I am using Date::Manip.
Is there a better/different way to do this?
#!/usr/bin/perl use Date::Manip; $today_dt = &ParseDate("today"); $new_dt = &Date_GetNext($today_dt, 'Thu', 1); $date = &UnixDate($new_dt, "%Y-%m-%d"); print $date . "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: code to get the date for "next Thursday"
by Albannach (Monsignor) on Mar 20, 2006 at 21:08 UTC | |
|
Re: code to get the date for "next Thursday"
by ikegami (Patriarch) on Mar 20, 2006 at 20:54 UTC | |
by duckyd (Hermit) on Mar 20, 2006 at 21:15 UTC | |
by bfdi533 (Friar) on Mar 20, 2006 at 22:28 UTC | |
|
Re: code to get the date for "next Thursday"
by saintmike (Vicar) on Mar 20, 2006 at 21:09 UTC | |
|
Re: code to get the date for "next Thursday"
by duff (Parson) on Mar 20, 2006 at 21:00 UTC |