in reply to Compare two dates

Note that something like '2019-08-01' looks like a kind of ISO 8601-ish date, and as such will  lt le eq ne ge gt cmp stringwise compare properly with other such dates — if they have exactly the same format!

c:\@Work\Perl\monks>perl -wMstrict -le "my $d1 = '2019-08-01'; my $d2 = '2019-06-08'; ;; my $comparison = $d1 cmp $d2; $comparison = $comparison > 0 ? 'greater than' : $comparison < 0 ? 'less than' : 'equal to'; ;; printf qq{$d1 is %s $d2}, $comparison; " 2019-08-01 is greater than 2019-06-08
Of course, no date validation is done!


Give a man a fish:  <%-{-{-{-<