Lines 69-85
sub dt_from_string {
Link Here
|
69 |
my $fallback_re = qr| |
69 |
my $fallback_re = qr| |
70 |
(?<year>\d{4}) |
70 |
(?<year>\d{4}) |
71 |
- |
71 |
- |
72 |
(?<month>\d{2}) |
72 |
(?<month>\d{1,2}) |
73 |
- |
73 |
- |
74 |
(?<day>\d{2}) |
74 |
(?<day>\d{1,2}) |
75 |
|xms; |
75 |
|xms; |
76 |
|
76 |
|
77 |
if ( $date_format eq 'metric' ) { |
77 |
if ( $date_format eq 'metric' ) { |
78 |
# metric format is "dd/mm/yyyy[ hh:mm:ss]" |
78 |
# metric format is "dd/mm/yyyy[ hh:mm:ss]" |
79 |
$regex = qr| |
79 |
$regex = qr| |
80 |
(?<day>\d{2}) |
80 |
(?<day>\d{1,2}) |
81 |
/ |
81 |
/ |
82 |
(?<month>\d{2}) |
82 |
(?<month>\d{1,2}) |
83 |
/ |
83 |
/ |
84 |
(?<year>\d{4}) |
84 |
(?<year>\d{4}) |
85 |
|xms; |
85 |
|xms; |
Lines 87-95
sub dt_from_string {
Link Here
|
87 |
elsif ( $date_format eq 'dmydot' ) { |
87 |
elsif ( $date_format eq 'dmydot' ) { |
88 |
# dmydot format is "dd.mm.yyyy[ hh:mm:ss]" |
88 |
# dmydot format is "dd.mm.yyyy[ hh:mm:ss]" |
89 |
$regex = qr| |
89 |
$regex = qr| |
90 |
(?<day>\d{2}) |
90 |
(?<day>\d{1,2}) |
91 |
. |
91 |
. |
92 |
(?<month>\d{2}) |
92 |
(?<month>\d{1,2}) |
93 |
. |
93 |
. |
94 |
(?<year>\d{4}) |
94 |
(?<year>\d{4}) |
95 |
|xms; |
95 |
|xms; |
Lines 97-105
sub dt_from_string {
Link Here
|
97 |
elsif ( $date_format eq 'us' ) { |
97 |
elsif ( $date_format eq 'us' ) { |
98 |
# us format is "mm/dd/yyyy[ hh:mm:ss]" |
98 |
# us format is "mm/dd/yyyy[ hh:mm:ss]" |
99 |
$regex = qr| |
99 |
$regex = qr| |
100 |
(?<month>\d{2}) |
100 |
(?<month>\d{1,2}) |
101 |
/ |
101 |
/ |
102 |
(?<day>\d{2}) |
102 |
(?<day>\d{1,2}) |
103 |
/ |
103 |
/ |
104 |
(?<year>\d{4}) |
104 |
(?<year>\d{4}) |
105 |
|xms; |
105 |
|xms; |
106 |
- |
|
|