[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[6476] trunk/LedgerSMB
- Subject: SF.net SVN: ledger-smb:[6476] trunk/LedgerSMB
- From: ..hidden..
- Date: Thu, 16 Jan 2014 09:39:27 +0000
Revision: 6476
http://sourceforge.net/p/ledger-smb/code/6476
Author: einhverfr
Date: 2014-01-16 09:39:20 +0000 (Thu, 16 Jan 2014)
Log Message:
-----------
Fixes for date formats, along with dojo widgets, fixes 948
Modified Paths:
--------------
trunk/LedgerSMB/DBObject/User.pm
trunk/LedgerSMB/PGDate.pm
Modified: trunk/LedgerSMB/DBObject/User.pm
===================================================================
--- trunk/LedgerSMB/DBObject/User.pm 2014-01-16 08:12:24 UTC (rev 6475)
+++ trunk/LedgerSMB/DBObject/User.pm 2014-01-16 09:39:20 UTC (rev 6476)
@@ -88,7 +88,7 @@
my $self = shift @_;
$self->{dateformats} = [];
$self->{numberformats} = [];
- for my $opt (qw(mm-dd-yy mm/dd/yy dd-mm-yy dd/mm/yy dd.mm.yy yyyy-mm-dd)){
+ for my $opt (qw(mm-dd-yyyy mm/dd/yyyy dd-mm-yyyy dd/mm/yyyy dd.mm.yyyy yyyy-mm-dd)){
push @{$self->{dateformats}}, {format => $opt};
}
for my $opt (qw(1,000.00 1000.00 1.000,00 1000,00 1'000.00)){
Modified: trunk/LedgerSMB/PGDate.pm
===================================================================
--- trunk/LedgerSMB/PGDate.pm 2014-01-16 08:12:24 UTC (rev 6475)
+++ trunk/LedgerSMB/PGDate.pm 2014-01-16 09:39:20 UTC (rev 6476)
@@ -158,6 +158,7 @@
$input = undef if $input eq '';
my $format = $LedgerSMB::App_State::User->{dateformat};
$format ||= 'yyyy-mm-dd';
+ $format = 'yyyy-mm-dd' if $input =~ /^\d{4}/;
my $dt = _parse_string($self, $input, uc($format), $has_time);
my %prop = (date => $dt, dummy => !defined $dt);
delete $prop{date} unless defined $prop{date} and $prop{date} ne '';
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Ledger-smb-commits mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-commits