From ef3f1093aeca764039bbffcb9ce5f563ce95e6fa Mon Sep 17 00:00:00 2001 From: einhverfr Date: Fri, 1 Aug 2008 00:10:29 +0000 Subject: Correcting missue with closedto dates git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@2229 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/Form.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'LedgerSMB/Form.pm') 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; -- cgit v1.2.3