michaelbromley / michaelbromley/angularUtils

ordinalDate filter: Showing a date one day earlier

Open
#122 3 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.