summaryrefslogtreecommitdiff
path: root/httemplate/elements/tr-fixed-date.html
blob: ef599796de711cb88343b4ca367f8f33ed8cad2d (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'} = time2str($date_format, $value);

</%init>