angularUtils
angularUtils copied to clipboard
ordinalDate filter: Showing a date one day earlier
Returning JSON such as my_date: '2015-02-24'
. Showing via {{my_date | ordinalDate:'MMMM d'}}
resulted in "February 23rd". Changing to {{my_date | date:'MMMM d'}}
showed the correct date of "February 24".
Perhaps this is due to timezone differences (eg: since converting a date to a time ends up at the beginning of the day, and then in the States, we have a negative offset, putting us into the previous day).
Thanks for the report. I'll look into this properly when I have more time later this week, hopefully. I somewhat dread getting into the murky world of date-time manipulation in JS. But I'll give it a go...
Ran into this issue running the tests. I suspect this is due to an unspecified time zone. I'll try to address as time permits. If someone beats me to it, I'd be happy to verify.
Yeah I've not yet had time to look into this - so please go ahead if you get time.