darren chamberlain wrote:
> > I don't understand this. September 9th 2000 was a wednesday, not a
> > monday or tuesday.
>
> The 9th? I see the 13th, which my machine thinks is a Tuesday:
Sorry, that's what I meant, but the 13th really should be a wednesday.
September 2000
Su Mo Tu We Th Fr Sa
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
> $ tpage
> [% USE day = date(format => '%A', locale => 'en_GB') %]
> [% day.format('4:20:00 9-13-2000') %]
The first of the two problems was that the date should be in day-month-year
rather than month-day-year.
-[% day.format('4:20:00 9-13-2000') %]
+[% day.format('4:20:00 13-9-2000') %]
The second problem was that the large number being fed into the expected
output was also plain wrong.
-[% # 4:20:00 9-13-2000 equals 979010400 seconds since the epoch
- nowloc(979010400, '%A', 'en_GB')
+[% # 4:20:00 9-13-2000 equals 968818800 seconds since the epoch
+ nowloc(968818800, '%A', 'en_GB')
%]
Now wednesday has been restored to its rightful place. :-)
A
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates