aboutsummaryrefslogtreecommitdiffstats
path: root/test/JsonSpec.js
diff options
context:
space:
mode:
authorIgor Minar2010-11-08 09:05:48 -0800
committerIgor Minar2010-11-08 22:49:30 -0800
commite5c135ac50bfb463895c71a9b83267e9ca836c7b (patch)
tree1130899dc2c48f2e3f1087d106597fcc00ebff5d /test/JsonSpec.js
parent1a43f36e2395c77005fd14fafd43808548b111f2 (diff)
downloadangular.js-e5c135ac50bfb463895c71a9b83267e9ca836c7b.tar.bz2
Support ISO 8601 extended datetime format troughout angular.
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)
Diffstat (limited to 'test/JsonSpec.js')
-rw-r--r--test/JsonSpec.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/JsonSpec.js b/test/JsonSpec.js
index e6264293..0acbd79c 100644
--- a/test/JsonSpec.js
+++ b/test/JsonSpec.js
@@ -62,9 +62,9 @@ describe('json', function(){
});
it('should serialize UTC dates', function() {
- var date = angular.String.toDate("2009-10-09T01:02:03Z");
- expect(toJson(date)).toEqual('"2009-10-09T01:02:03Z"');
- expect(fromJson('"2009-10-09T01:02:03Z"').getTime()).toEqual(date.getTime());
+ var date = angular.String.toDate("2009-10-09T01:02:03.027Z");
+ expect(toJson(date)).toEqual('"2009-10-09T01:02:03.027Z"');
+ expect(fromJson('"2009-10-09T01:02:03.027Z"').getTime()).toEqual(date.getTime());
});
it('should prevent recursion', function() {