summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-fixed-date.html
blob: 731a3caa7aae7b0919f6420d93e827a8fd88e73c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<% include('tr-fixed.html', %opt ) %>
<%init>

my %opt;
if ( ref($_[0]) ) {
  my $hashref = shift;
  %opt = %$hashref;
} else {
  %opt = @_;
}

my $value = $opt{'curr_value'} || $opt{'value'};

my $conf = new FS::Conf;
my $date_format = $opt{'format'} || $conf->config('date_format') || '%m/%d/%Y';

$opt{'formatted_value'} = $value > 0 ? time2str($date_format, $value) : '';

</%init>