Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Re: How to make time/date global?

Quote Reply
Re: How to make time/date global? In reply to
here's another solution...
put this right into the template itself:
<%GT::Date::date_get('', "%HH%:%MM% | %dddd%, %mmmm% %d%, %yyyy%")%>

or if you really want to put it in globals (so that you can change the format of the date w/o having to modify every template):
'timedate' => 'sub { return GT::Date::date_get('', "%HH%:%MM% | %dddd%, %mmmm% %d%, %yyyy%") }'

or another solution...
'timedate' => 'sub { my $time = localtime(); return GT::Date::date_transform($time, "%ddd% %mmm% %dd% %HH%:%MM%:%ss% %yyyy%", "%HH%:%MM% | %dddd%, %mmmm% %d%, %yyyy%"); }'


Adrian
Subject Author Views Date
Thread How to make time/date global? ryel01 4147 Jul 20, 2001, 1:21 AM
Thread Re: How to make time/date global?
brewt 4093 Jul 20, 2001, 2:38 PM
Thread Re: How to make time/date global?
ryel01 4086 Jul 20, 2001, 3:56 PM
Thread Re: How to make time/date global?
brewt 4048 Jul 20, 2001, 4:19 PM
Post Re: How to make time/date global?
ryel01 4050 Jul 20, 2001, 4:33 PM
Thread Re: How to make time/date global?
ryel01 4047 Jul 20, 2001, 4:39 PM
Post Re: How to make time/date global?
dearnet 4015 Jul 21, 2001, 10:45 PM
Thread Re: How to make time/date global?
brewt 4053 Jul 20, 2001, 5:11 PM
Thread Re: How to make time/date global?
ryel01 4054 Jul 20, 2001, 5:35 PM
Post Re: How to make time/date global?
brewt 4065 Jul 20, 2001, 5:49 PM