aboutsummaryrefslogtreecommitdiffstats
path: root/test/FiltersSpec.js
AgeCommit message (Collapse)Author
2011-11-14move(filters): appease the History GodMisko Hevery
2011-11-14refactor(services): migrate angular.service -> moduleMisko Hevery
2011-11-14refactor(injector): turn scope into a serviceMisko Hevery
- turn scope into a $rootScope service. - injector is now a starting point for creating angular application. - added inject() method which wraps jasmine its/beforeEach/afterEach, and which allows configuration and injection of services. - refactor tests to use inject() where possible BREAK: - removed angular.scope() method
2011-10-20feat(filter.date): use mediumDate as defaultIgor Minar
Breaking change! Previously the default was fullDate.
2011-10-20fix(date filter): default to fullDate formatIgor Minar
The browser's behave inconsistently, so we should just stick to one format when the format is not specified by the developer Closes #605
2011-10-11chore(formating): clean code to be function() {Misko Hevery
2011-09-08style(filter): Couple of missing spaces, semi-colons, add empty linesVojta Jina
2011-09-08fix(filter.currency): Return empty string for non-numbersVojta Jina
2011-08-14break(date): remove support for 'long', 'longtime' date formats and 'z' flagIgor Minar
The support for the 'z' formatting flag was removed becase the timezone info can't be retrieved from the browser apis (except for en-US locale on some but not all browsers). For this reason we don't want to support this flag at all. Related to this, since the 'long' and 'longtime' datetime formats require the 'z' flag in the formatting string, we are removing support for this format as well.
2011-08-14refactor(date,curreny,number): inject and use $locale in filtersDi Peng
- filter.number, filter.currency and filter.date are injected with $locale service so that we can just swap the service to localize these - date filter was beefed up in order to support literal strings found in localization rules
2011-07-26feat(number/currency filter): format numbers and currency using patternDi Peng
both numbers and currency need to be formatted using a generic pattern which can be replaced for a different pattern when angular is working in a non en-US locale for now only en-US locale is supported, but that will change in the future
2011-07-20feat(filter.date): add support for default datetime formats in enDi Peng
- add support for full,long, medium, short datetime formats in en Breaks MMMMM. now we don't support MMMMM anymore as old implementation differs from Unicode Locale Data format we are following. - removed support for fullDateTime and fullTime as it means too much trouble with full timeZone names - added docs for the new features
2011-07-18feat(strict mode): adding strict mode flag to all js filesIgor Minar
the flag must be in all src and test files so that we get the benefit of running in the strict mode even in jstd the following script was used to modify all files: for file in `find src test -name "*.js"`; do echo -e "'use strict';\n" > temp.txt cat $file >> temp.txt mv temp.txt $file done
2011-06-23feat:filter.date: add day/month string format supportDi Peng
Support new date format, specifically day of week/Month of year in string e.g. {{ someDate | data:"EEE, MMM d, yyyy" }} -> "Wed, Jul 10, 2011" Closes #396
2011-06-08Number filter would return incorrect value when fractional part had leading ↵Misko Hevery
zeros.
2011-01-24fixed example rendering, add tests for it.Misko Hevery
2011-01-10Fixed filter.date, so it parses format ending with non-replaced stringVojta Jina
Closes #159
2010-11-09Updated filters tests to use jasmine expectsVojta Jina
And some small formatting...
2010-11-08Support ISO 8601 extended datetime format troughout angular.Igor Minar
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)
2010-11-08fixing spec description for the date filterIgor Minar
2010-11-08date filter should accept ISO 8601 formatted string as inputIgor Minar
Closes #125
2010-11-03fix the linky filterMisko Hevery
2010-10-26Add TzDate to angular-mocks.jsIgor Minar
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
2010-10-25Add millisecond support for date filterIgor Minar
Date filter should translate input which is a number (or number string) into a date.
2010-10-23Revert "added support for treating numbers as date in miliseconds"Igor Minar
This reverts commit 1391f19fb49275af59230afef51b472c58d7818c.
2010-10-23added support for treating numbers as date in milisecondsMisko Hevery
2010-10-19fix date filter to igrone falsy inputMisko Hevery
2010-10-18fixing css class name for currency filter and its specIgor Minar
2010-10-16fixed date formater and make it work on ieMisko Hevery
2010-10-16Fixed filter date test - remove dependency on machine timezoneVojta Jina
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...
2010-10-13Added support for date filterMisko Hevery
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