Skip to content
Browse files

Added postgresql timestamp output format test.

  • Loading branch information...
1 parent a61e741 commit 801657066a3a96f6261cac5775341d110eaea74b @runejuhl runejuhl committed Aug 3, 2012
Showing with 24 additions and 0 deletions.
  1. +24 −0 tests/src/erlydtl_dateformat_tests.erl
View
24 tests/src/erlydtl_dateformat_tests.erl
@@ -102,6 +102,30 @@ run_tests() ->
%{"Z", "3600"}
]
},
+ {
+ "datetime 4",
+ {{2004, 2, 29}, {12, 0, 59.256687}}, % date/time tuple
+ [{"a", "p.m."}, {"A", "PM"}, {"c", "2004-02-29T12:00:59"},
+ {"d", "29"}, {"D", "Sun"}, {"f", "12"}, {"F", "February"},
+ {"g", "12"}, {"G", "12"},
+ {"h", "12"}, {"H", "12"}, {"i", "00"},
+ {"j", "29"}, {"l", "Sunday"}, {"L", "True"},
+ {"m", "02"}, {"M", "Feb"}, {"b", "feb"},
+ {"n", "2"}, {"N", "Feb."}, {"P", "noon"},
+ {"s", "59"}, {"S", "th"}, {"t", "29"},
+ {"w", "0"}, {"W", "9"}, {"y", "04"}, {"Y", "2004"}, {"z", "58"},
+ {"jS F Y H:i", "29th February 2004 12:00"},
+ {"jS o\\f F", "29th of February"},
+ % We expect these to come back verbatim
+ {"x", "x"}, {"C", "C"}, {";", ";"}, {"%", "%"}
+ % TODO : timzeone related tests.
+ %{"r", "Sun, 29 Feb 2004 12:00:59 +0000"},
+ %{"O", "0000"},
+ %{"T", "CET"},
+ %{"U", "300531600"},
+ %{"Z", "3600"}
+ ]
+ },
% Weeknum tests. Largely based on examples from :
% http://en.wikipedia.org/wiki/ISO_week_date
{ "weeknum 1.1", {2005, 1, 1}, [{"W", "53"}] },

0 comments on commit 8016570

Please sign in to comment.
Something went wrong with that request. Please try again.