michaelbromley / michaelbromley/angularUtils
ordinalDate filter: Showing a date one day earlier
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2k
- Forks
- 842
- PR merge metrics
- No merged PRs in 30d
Description
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).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the ordinalDate filter and compare its handling with the date filter. Reproduce the reported JSON value and template using ordinalDate:'MMMM d'; the work is done when 2015-02-24 renders as February 24th rather than February 23rd.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100