diff options
author | jeff <jeff> | 2006-12-15 05:29:48 +0000 |
---|---|---|
committer | jeff <jeff> | 2006-12-15 05:29:48 +0000 |
commit | 02b9c53fb85b0a87d959e140dc30ae21cccb0902 (patch) | |
tree | 56d1edfd2ee7a2f92fe830b8e55a6db84d214b0f /httemplate/elements/tr-input-date-field.html | |
parent | ba1f19e48ec2f2ac293b07a41042de59e744db1e (diff) |
move use statements to handler.pl, do not show 1/1/70 for new birthdates, and improve error handling
Diffstat (limited to 'httemplate/elements/tr-input-date-field.html')
-rw-r--r-- | httemplate/elements/tr-input-date-field.html | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/httemplate/elements/tr-input-date-field.html b/httemplate/elements/tr-input-date-field.html index 1624df05c..2320a9552 100644 --- a/httemplate/elements/tr-input-date-field.html +++ b/httemplate/elements/tr-input-date-field.html @@ -29,10 +29,9 @@ $format = "%m/%d/%Y" unless $format; $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); } |