fix(dateFilter): correctly format ISODates on Android<=2.1

In older Android browsers, `undefined` does not act like `0` in some
arithmetic operations. This leads to dates being formatted with `NaN`
strings in the dateFilter because the implementation of the `dateGetter`
function allows offset to be an optional parameter.
The fix is to convert offset to 0 if it is undefined.

Closes #2277, #2275
This commit is contained in:
Pete Bacon Darwin 2013-05-07 11:43:25 +01:00
parent bc04afe183
commit 01bda54e05

View file

@ -192,6 +192,7 @@ function padNumber(num, digits, trim) {
function dateGetter(name, size, offset, trim) {
offset = offset || 0;
return function(date) {
var value = date['get' + name]();
if (offset > 0 || value > -offset)