[freeside-commits] freeside/httemplate/elements
tr-input-date-field.html, 1.3, 1.4
Jeff Finucane,420,,
jeff at wavetail.420.am
Thu Dec 14 21:29:50 PST 2006
Update of /home/cvs/cvsroot/freeside/httemplate/elements
In directory wavetail:/tmp/cvs-serv18104/httemplate/elements
Modified Files:
tr-input-date-field.html
Log Message:
move use statements to handler.pl, do not show 1/1/70 for new birthdates, and improve error handling
Index: tr-input-date-field.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/elements/tr-input-date-field.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- tr-input-date-field.html 16 Nov 2006 06:20:37 -0000 1.3
+++ tr-input-date-field.html 15 Dec 2006 05:29:48 -0000 1.4
@@ -29,10 +29,9 @@
$label = $name unless $label;
if ($usedatetime) {
- eval "use DateTime;";
- die $@ if $@;
my $dt = DateTime->from_epoch(epoch => $value, time_zone => 'floating');
- $value = $dt->strftime($format);
+ $value = $dt->strftime($format)
+ unless $value eq '';
}else{
$value = time2str($format, $value);
}
More information about the freeside-commits
mailing list