summaryrefslogtreecommitdiff
path: root/LedgerSMB.pm
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-10-11 17:48:23 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-10-11 17:48:23 +0000
commit1d0b99e79370a025608ef7c45c82feb8997f8918 (patch)
tree2c27e55cda7c5417e77438cdd60be356e1dba981 /LedgerSMB.pm
parent29a8ed0fe05a4b0874203c2aa5ebc0f50421b349 (diff)
Fixing the real problem behind 1811022
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1746 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB.pm')
-rwxr-xr-xLedgerSMB.pm11
1 files changed, 6 insertions, 5 deletions
diff --git a/LedgerSMB.pm b/LedgerSMB.pm
index 1ca1ec13..b754e8d0 100755
--- a/LedgerSMB.pm
+++ b/LedgerSMB.pm
@@ -589,13 +589,13 @@ sub date_to_number {
my ( $yy, $mm, $dd );
if ( $date && $date =~ /\D/ ) {
- if ( $myconfig->{dateformat} =~ /^yy/ ) {
+ if ( $date =~ /^\d{4}-\d\d-\d\d$/ ) {
( $yy, $mm, $dd ) = split /\D/, $date;
- }
- elsif ( $myconfig->{dateformat} =~ /^mm/ ) {
+ } elsif ( $myconfig->{dateformat} =~ /^yy/ ) {
+ ( $yy, $mm, $dd ) = split /\D/, $date;
+ } elsif ( $myconfig->{dateformat} =~ /^mm/ ) {
( $mm, $dd, $yy ) = split /\D/, $date;
- }
- elsif ( $myconfig->{dateformat} =~ /^dd/ ) {
+ } elsif ( $myconfig->{dateformat} =~ /^dd/ ) {
( $dd, $mm, $yy ) = split /\D/, $date;
}
@@ -791,3 +791,4 @@ sub set {
1;
+