Support ISO 8601 extended format datetime strings (YYYY-MM-DDTHH:mm:ss.SSSZ) as defined
in EcmaScript 5 throughout angular. This means that the following apis switched from
YYYY-MM-DDTHH:mm:ssZ to YYYY-MM-DDTHH:mm:ss.SSSZ (note the added millis) when representing dates:
- angular.Date.toString
- angular.String.toDate
- JSON serialization and deserialization (used by json filter, $xhr and $resource)
TzDate is a Date-like type that is independent from the timezone
settings of the machine on which TzDate instances are created.
This property makes it ideal for testing code that deals with
timezones in a manner that makes the code portable between timezones.
Closes#81
It would be better to separate the time-zone logic to a separate unit and test just this logic.
This logic is simply convert minutes to HH:MM, the source of time-zone is from date object...
Date filter now supports:
yyyy: four digit year
yy: two digit year
MM: two digit month
dd: two digit day of month
HH: two digit hour in 0-23
KK: two digit hour in 0-12
mm: two digit minute
ss: two digit second
a: am/pm
Z: four digit timezone offset
example {{ timestamp | date:'yyyy-MM-dd HH:mm:ss' }} becomes 2010-10-13 14:45:23