![]() |
|
Keep It Simple, Stupid | |
PerlMonks |
Re: Compare two datesby Ratazong (Monsignor) |
on Jul 23, 2019 at 05:55 UTC ( #11103191=note: print w/replies, xml ) | Need Help?? |
As others wrote, with the date-format chosen by you, you just have to apply normal string compare operators. However in case you have other date formats (e.g. the format DD.MM.YYYY, which is popular in Germany), this approach won't work. I made good experience in converting the date into a number (e.g. DD + 100*MM + 10000*(YYYY-2000) ), and then comparing them. HTH, Rata
In Section
Seekers of Perl Wisdom
|
|