summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-08-01 00:10:29 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2008-08-01 00:10:29 +0000
commitef3f1093aeca764039bbffcb9ce5f563ce95e6fa (patch)
tree9ca92875033afea26369231535e0b3198a18f723 /LedgerSMB
parent327beb77919cbea42841ec0c10977f4d1c3648ca (diff)
Correcting missue with closedto dates
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2229 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rw-r--r--LedgerSMB/Form.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index ab85c326..48ef9c8f 100644
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -966,7 +966,7 @@ Converts $date from the format $myconfig->{dateformat} to the format 'yyyymmdd'.
If the year extracted is only two-digits, the year given is assumed to be in the
range 2000-2099.
-If $date does not contain any digits, datetonum does nothing.
+If $date does not contain any non-digits, datetonum does nothing.
$picture is ignored.
@@ -976,6 +976,11 @@ sub datetonum {
my ( $self, $myconfig, $date, $picture ) = @_;
+ if ($date =~ /^\d{4}-\d{2}-\d{2}$/){
+ $date =~ s/-//;
+ return $date;
+ }
+
if ( $date && $date =~ /\D/ ) {
my $yy;