From e5c135ac50bfb463895c71a9b83267e9ca836c7b Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Mon, 8 Nov 2010 09:05:48 -0800 Subject: 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) --- test/JsonSpec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/JsonSpec.js') 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() { -- cgit v1.2.3