[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1746] trunk
- Subject: SF.net SVN: ledger-smb: [1746] trunk
- From: ..hidden..
- Date: Thu, 11 Oct 2007 10:48:23 -0700
Revision: 1746
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1746&view=rev
Author: tetragon
Date: 2007-10-11 10:48:23 -0700 (Thu, 11 Oct 2007)
Log Message:
-----------
Fixing the real problem behind 1811022
Modified Paths:
--------------
trunk/LedgerSMB/Form.pm
trunk/LedgerSMB.pm
Modified: trunk/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm 2007-10-11 17:46:06 UTC (rev 1745)
+++ trunk/LedgerSMB/Form.pm 2007-10-11 17:48:23 UTC (rev 1746)
@@ -977,13 +977,13 @@
my $mm;
my $dd;
- if ( $myconfig->{dateformat} =~ /^yy/ ) {
+ if ( $date =~ /^\d{4}-\d\d-\d\d$/ ) {
( $yy, $mm, $dd ) = split /\D/, $date;
- }
- elsif ( $myconfig->{dateformat} =~ /^mm/ ) {
+ } if ( $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;
}
Modified: trunk/LedgerSMB.pm
===================================================================
--- trunk/LedgerSMB.pm 2007-10-11 17:46:06 UTC (rev 1745)
+++ trunk/LedgerSMB.pm 2007-10-11 17:48:23 UTC (rev 1746)
@@ -589,13 +589,13 @@
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 @@
1;
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.