adopted-ember-addons / adopted-ember-addons/ember-moment

startOf('day') gets previous day using ember-moment service

Open
#309 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
398
Forks
120
PR merge metrics
No merged PRs in 30d

Description

version:
ember-moment: 7.4.1

Issue in getting start of date using ember moment service.
get(this, 'moment').moment().startOf('day').toDate() -> gets previous date.
moment().startOf('day').toDate() -> gets correct date.

May I know why this occurs?

Contributor guide

Open the contributing guide

Research direction

Reproduce the report in ember-moment 7.4.1 by comparing get(this, 'moment').moment().startOf('day').toDate() with moment().startOf('day').toDate(). Start by finding where the ember-moment service creates or configures its moment instance. Done means the service call no longer returns the previous date, or the difference is explained in project documentation/tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
Half a day
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.