diff options
| author | Igor Minar | 2010-11-08 09:05:48 -0800 | 
|---|---|---|
| committer | Igor Minar | 2010-11-08 22:49:30 -0800 | 
| commit | e5c135ac50bfb463895c71a9b83267e9ca836c7b (patch) | |
| tree | 1130899dc2c48f2e3f1087d106597fcc00ebff5d /test/angular-mocksSpec.js | |
| parent | 1a43f36e2395c77005fd14fafd43808548b111f2 (diff) | |
| download | angular.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/angular-mocksSpec.js')
| -rw-r--r-- | test/angular-mocksSpec.js | 10 | 
1 files changed, 5 insertions, 5 deletions
| diff --git a/test/angular-mocksSpec.js b/test/angular-mocksSpec.js index 3daa1428..b96a9cfc 100644 --- a/test/angular-mocksSpec.js +++ b/test/angular-mocksSpec.js @@ -10,8 +10,8 @@ describe('TzDate', function() {    });    it('should take dateString as constructor argument', function() { -    expect(new TzDate(0, '1970-01-01T00:00:00Z').getTime()).toBe(0); -    expect(new TzDate(0, '2010-09-03T23:05:08Z').getTime()).toBe(1283555108000); +    expect(new TzDate(0, '1970-01-01T00:00:00.000Z').getTime()).toBe(0); +    expect(new TzDate(0, '2010-09-03T23:05:08.023Z').getTime()).toBe(1283555108023);    }); @@ -88,7 +88,7 @@ describe('TzDate', function() {    it('should create a date representing new year in Bratislava', function() { -    var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z'); +    var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00.000Z');      expect(newYearInBratislava.getTimezoneOffset()).toBe(-60);      expect(newYearInBratislava.getFullYear()).toBe(2010);      expect(newYearInBratislava.getMonth()).toBe(0); @@ -100,7 +100,7 @@ describe('TzDate', function() {    it('should delegate all the UTC methods to the original UTC Date object', function() {      //from when created from string -    var date1 = new TzDate(-1, '2009-12-31T23:00:00Z'); +    var date1 = new TzDate(-1, '2009-12-31T23:00:00.000Z');      expect(date1.getUTCFullYear()).toBe(2009);      expect(date1.getUTCMonth()).toBe(11);      expect(date1.getUTCDate()).toBe(31); @@ -110,7 +110,7 @@ describe('TzDate', function() {      //from when created from millis -    var date2 = new TzDate(-1, angular.String.toDate('2009-12-31T23:00:00Z').getTime()); +    var date2 = new TzDate(-1, angular.String.toDate('2009-12-31T23:00:00.000Z').getTime());      expect(date2.getUTCFullYear()).toBe(2009);      expect(date2.getUTCMonth()).toBe(11);      expect(date2.getUTCDate()).toBe(31); | 
