in reply to date parsing

I very rarely use Date::Parse or Date::Manip. The core module Time::Piece usually does everything I need. Here is an SSCCE showing it correctly parsing the two sample dates which you gave in your prose (but which do not appear in your code sample).

use strict; use warnings; use Time::Piece; use Test::More tests => 6; my $str = '31/08/2024'; my $tp = Time::Piece->strptime ($str, '%d/%m/%Y/'); is $tp->mday, 31; is $tp->mon, 8; is $tp->year, 2024; $str = '01/09/2024'; $tp = Time::Piece->strptime ($str, '%d/%m/%Y/'); is $tp->mday, 1; is $tp->mon, 9; is $tp->year, 2024;

If you want to persist with Date::Parse and/or Date::Manip that's fine but you will doubtless help others to help you by showing the problem as an SSCCE like this.


🦛