add tests to Ox.formatDateRange

This commit is contained in:
rolux 2012-01-17 11:29:32 +05:30
parent 7da384d03a
commit 1445824ffd

View file

@ -219,6 +219,12 @@ Ox.formatDateRange <f> Formats a date range as a string
'Sat, Jan 1, 2000, 00:00:00'
> Ox.formatDateRange('2000-01-01 00:00:00', '2000-01-01 00:00:02')
'Sat, Jan 1, 2000, 00:00:00 - 00:00:02'
> Ox.formatDateRange('1999-12', '2000-01')
'December 1999'
> Ox.formatDateRange('1999-12-31', '2000-01-01')
'Fri, Dec 31, 1999'
> Ox.formatDateRange('1999-12-31 23:00', '2000-01-01 00:00')
'Fri, Dec 31, 1999, 23:00'
> Ox.formatDateRange('-50', '50')
'50 BC - 50 AD'
> Ox.formatDateRange('-50-01-01', '-50-12-31')