in reply to Checking if a given date falls between 2 other specific dates
my $epochSecs = localtime($secs, $mins, $hours, $mday, $mon, $year);
Note that $mon is 0 for January to 11 for December.
Once you have converted your three dates to epoch seconds you can do a simple numeric comparison.
If, however, your date strings are complex and inconsistent then using a module as chargrill suggests would probably be less painful.
Cheers,
JohnGG
Update: tag cock-up corrected
|
|---|