From 6e268e145f7b871a93b59264a7aeeaf947d712be Mon Sep 17 00:00:00 2001 From: tetragon Date: Thu, 11 Oct 2007 17:44:18 +0000 Subject: 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 --- LedgerSMB/Form.pm | 14 ++++++-------- 1 file 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; } -- cgit v1.2.3 uch/log/tags/9d/da/20181030090002.AAFCCCF0@xayide.jones.dk?h=master'>logtreecommitdiff
path: root/tags/9d/da/20181030090002.AAFCCCF0@xayide.jones.dk
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2023-06-27 09:35:08 +0200
committerJonas Smedegaard <dr@jones.dk>2023-06-27 09:35:08 +0200
commitfd54908da2b05c526dd3bee9b6dcd093214a220d (patch)
treec69c845069c99d1d01044f6fafda7c08433329c6 /tags/9d/da/20181030090002.AAFCCCF0@xayide.jones.dk
parentba46132213560cf3335d53560d519c0ec0190da2 (diff)
Diffstat (limited to 'tags/9d/da/20181030090002.AAFCCCF0@xayide.jones.dk')
-rw-r--r--tags/9d/da/20181030090002.AAFCCCF0@xayide.jones.dk/jones0
-rw-r--r--tags/9d/da/20181030090002.AAFCCCF0@xayide.jones.dk/sys0
2 files changed, 0 insertions, 0 deletions