diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-10-11 17:44:18 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-10-11 17:44:18 +0000 |
commit | 6e268e145f7b871a93b59264a7aeeaf947d712be (patch) | |
tree | 1ee952c6bffc66c4e64a539353cb0923254a8fc9 /LedgerSMB | |
parent | 086238f6d9e3217c77059aa3d802219bb2a17a17 (diff) |
Fixing the real problem of 1811022. No problems with the defaults table.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1744 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-x | LedgerSMB/Form.pm | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 7489bdfe..e46d2022 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -1358,16 +1358,14 @@ sub datetonum { my ( $self, $myconfig, $date, $picture ) = @_; if ( $date && $date =~ /\D/ ) { - - if ( $myconfig->{dateformat} =~ /^yy/ ) { + if ( $date && $date =~ /^\d{4}-\d\d-\d\d$/ ) { + # SC: Handle standard form of YYYY-MM-DD ( $yy, $mm, $dd ) = split /\D/, $date; - } - - if ( $myconfig->{dateformat} =~ /^mm/ ) { + } elsif ( $myconfig->{dateformat} =~ /^yy/ ) { + ( $yy, $mm, $dd ) = split /\D/, $date; + } elsif ( $myconfig->{dateformat} =~ /^mm/ ) { ( $mm, $dd, $yy ) = split /\D/, $date; - } - - if ( $myconfig->{dateformat} =~ /^dd/ ) { + } elsif ( $myconfig->{dateformat} =~ /^dd/ ) { ( $dd, $mm, $yy ) = split /\D/, $date; } |