Skip Menu |

This queue is for tickets about the DateTime-Format-Flexible CPAN distribution.

Report information
The Basics
Id: 124596
Status: resolved
Priority: 0/
Queue: DateTime-Format-Flexible

People
Owner: Nobody in particular
Requestors: rod.taylor [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.29
Fixed in: 0.30



Subject: Compact style q{Jul25'17}
Added a new separator for q{'}. Modified the Month to XNX converter to accept digits + noise behind the month name. This date style was found on popular fast food receipt.
Subject: scdate.patch
Only in DTFreceiptdate: blib diff -cr DateTime-Format-Flexible-0.29/lib/DateTime/Format/Flexible/lang.pm DTFreceiptdate/lib/DateTime/Format/Flexible/lang.pm *** DateTime-Format-Flexible-0.29/lib/DateTime/Format/Flexible/lang.pm 2017-03-07 13:12:00.000000000 -0500 --- DTFreceiptdate/lib/DateTime/Format/Flexible/lang.pm 2018-02-26 11:00:53.758651646 -0500 *************** *** 279,284 **** --- 279,291 ---- return ( $date , $p ); } + elsif( $date =~ m{\b$month_name\d.*\b}mxi ) + { + $p->{ month } = $month_number; + $date =~ s{\b$month_name(\d.*)\b}{X${month_number}X$1}mxi; + + return ( $date , $p ); + } } return ( $date , $p ); } Only in DTFreceiptdate/lib/DateTime/Format/Flexible: .lang.pm.swp diff -cr DateTime-Format-Flexible-0.29/lib/DateTime/Format/Flexible.pm DTFreceiptdate/lib/DateTime/Format/Flexible.pm *** DateTime-Format-Flexible-0.29/lib/DateTime/Format/Flexible.pm 2018-02-22 02:13:41.000000000 -0500 --- DTFreceiptdate/lib/DateTime/Format/Flexible.pm 2018-02-26 11:01:03.326684887 -0500 *************** *** 11,17 **** use Carp 'croak'; ! my $DELIM = qr{(?:\\|\/|-|\.|\s)}; my $HMSDELIM = qr{(?:\.|:)}; my $YEAR = qr{(\d{1,4})}; my $MON = qr{([0-1]?\d)}; --- 11,17 ---- use Carp 'croak'; ! my $DELIM = qr{(?:\\|\/|-|'|\.|\s)}; my $HMSDELIM = qr{(?:\.|:)}; my $YEAR = qr{(\d{1,4})}; my $MON = qr{([0-1]?\d)}; Only in DTFreceiptdate: Makefile Only in DTFreceiptdate: MYMETA.json Only in DTFreceiptdate: MYMETA.yml Only in DTFreceiptdate: pm_to_blib diff -cr DateTime-Format-Flexible-0.29/t/data/tests.txt DTFreceiptdate/t/data/tests.txt *** DateTime-Format-Flexible-0.29/t/data/tests.txt 2018-02-22 02:08:59.000000000 -0500 --- DTFreceiptdate/t/data/tests.txt 2018-02-26 11:01:51.398852140 -0500 *************** *** 2981,2983 **** --- 2981,2987 ---- 25 October 2018 at 10:33 => 2018-10-25T10:33:00 19 February 2018 at 1:33 => 2018-02-19T01:33:00 1 February 2018 at 1:03 => 2018-02-01T01:03:00 + JUL25'17 => 2017-07-25T00:00:00 + JUL05'17 => 2017-07-05T00:00:00 + JUL5'17 => 2017-07-05T00:00:00 + SEP12'19 => 2019-09-12T00:00:00 diff -cr DateTime-Format-Flexible-0.29/t/parsing.t DTFreceiptdate/t/parsing.t *** DateTime-Format-Flexible-0.29/t/parsing.t 2018-02-22 02:08:21.000000000 -0500 --- DTFreceiptdate/t/parsing.t 2018-02-26 11:02:27.038976390 -0500 *************** *** 4,10 **** use warnings; use lib '.'; ! use Test::More tests => 8048; use File::Spec::Functions 'catfile'; use t::lib::helper; --- 4,10 ---- use warnings; use lib '.'; ! use Test::More tests => 8052; use File::Spec::Functions 'catfile'; use t::lib::helper;
Thanks for the ticket, this has been implemented in version 0.30.