Lines 146-159
while (my $accountline = $sth->fetchrow_hashref) {
Link Here
|
146 |
|
146 |
|
147 |
if ($mode eq 'us') { |
147 |
if ($mode eq 'us') { |
148 |
if ($description =~ /$US_DATE/) { # mm/dd/yyyy |
148 |
if ($description =~ /$US_DATE/) { # mm/dd/yyyy |
149 |
my $date = eval { output_pref( { dt => dt_from_string( $1 ), dateonly => 1, dateformat => 'us' } ); }; |
149 |
my $date = output_pref( { dt => dt_from_string( $1, 'us' ), dateonly => 1} ); |
150 |
print "Converting $1 (us) to " . $date . "\n" if $DEBUG;i |
150 |
print "Converting $1 (us) to " . $date . "\n" if $DEBUG;i |
151 |
$description =~ s/$US_DATE/$date/; |
151 |
$description =~ s/$US_DATE/$date/; |
152 |
$updated = 1; |
152 |
$updated = 1; |
153 |
} |
153 |
} |
154 |
} elsif ($mode eq 'metric') { |
154 |
} elsif ($mode eq 'metric') { |
155 |
if ($description =~ /$METRIC_DATE/) { # dd/mm/yyyy |
155 |
if ($description =~ /$METRIC_DATE/) { # dd/mm/yyyy |
156 |
my $date = eval { output_pref( { dt => dt_from_string( $1 ), dateonly => 1, dateformat => 'metric' } ); }; |
156 |
my $date = output_pref( { dt => dt_from_string( $1, 'metric' ), dateonly => 1} ); |
157 |
print "Converting $1 (metric) to " . $date . "\n" if $DEBUG; |
157 |
print "Converting $1 (metric) to " . $date . "\n" if $DEBUG; |
158 |
$description =~ s/$METRIC_DATE/$date/; |
158 |
$description =~ s/$METRIC_DATE/$date/; |
159 |
$updated = 2; |
159 |
$updated = 2; |
160 |
- |
|
|