[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [1744] branches/1.2/LedgerSMB/Form.pm
- Subject: SF.net SVN: ledger-smb: [1744] branches/1.2/LedgerSMB/Form.pm
- From: ..hidden..
- Date: Thu, 11 Oct 2007 10:44:18 -0700
Revision: 1744
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=1744&view=rev
Author: tetragon
Date: 2007-10-11 10:44:18 -0700 (Thu, 11 Oct 2007)
Log Message:
-----------
Fixing the real problem of 1811022. No problems with the defaults table.
Modified Paths:
--------------
branches/1.2/LedgerSMB/Form.pm
Modified: branches/1.2/LedgerSMB/Form.pm
===================================================================
--- branches/1.2/LedgerSMB/Form.pm 2007-10-11 15:20:17 UTC (rev 1743)
+++ branches/1.2/LedgerSMB/Form.pm 2007-10-11 17:44:18 UTC (rev 1744)
@@ -1358,16 +1358,14 @@
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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.