diff options
| author | Igor Minar | 2011-10-18 23:42:36 -0700 |
|---|---|---|
| committer | Igor Minar | 2011-10-20 16:51:28 -0700 |
| commit | e175db37c6f52bba4080efeec22a7120a896099e (patch) | |
| tree | 426cd3adb6b2fddaccc2651734076cb672539476 /test/FiltersSpec.js | |
| parent | f38010d3a2f457a53798212ef72418637dabe189 (diff) | |
| download | angular.js-e175db37c6f52bba4080efeec22a7120a896099e.tar.bz2 | |
fix(date filter): default to fullDate format
The browser's behave inconsistently, so we should just stick to one format
when the format is not specified by the developer
Closes #605
Diffstat (limited to 'test/FiltersSpec.js')
| -rw-r--r-- | test/FiltersSpec.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/FiltersSpec.js b/test/FiltersSpec.js index 5bf9df6f..ac695ed4 100644 --- a/test/FiltersSpec.js +++ b/test/FiltersSpec.js @@ -225,13 +225,13 @@ describe('filter', function() { }); it('should do basic filter', function() { - expect(date(noon)).toEqual(noon.toLocaleDateString()); - expect(date(noon, '')).toEqual(noon.toLocaleDateString()); + expect(date(noon)).toEqual(date(noon, 'fullDate')); + expect(date(noon, '')).toEqual(date(noon, 'fullDate')); }); it('should accept number or number string representing milliseconds as input', function() { - expect(date(noon.getTime())).toEqual(noon.toLocaleDateString()); - expect(date(noon.getTime() + "")).toEqual(noon.toLocaleDateString()); + expect(date(noon.getTime())).toEqual(date(noon.getTime(), 'fullDate')); + expect(date(noon.getTime() + "")).toEqual(date(noon.getTime() + "", 'fullDate')); }); it('should accept various format strings', function() { @@ -297,7 +297,7 @@ describe('filter', function() { it('should be able to parse ISO 8601 dates/times using', function() { var isoString = '2010-09-03T05:05:08.872Z'; expect(date(isoString)). - toEqual(angular.String.toDate(isoString).toLocaleDateString()); + toEqual(date(isoString, 'fullDate')); }); it('should parse format ending with non-replaced string', function() { |
