Skip to content

#1230: count a month only when its full time has passed - #1285

Open
morphqdd wants to merge 2 commits into
zerocracy:masterfrom
morphqdd:1230
Open

morphqdd wants to merge 2 commits into
zerocracy:masterfrom
morphqdd:1230

Conversation

@morphqdd

Copy link
Copy Markdown
Contributor

getMonthsDifference compared only the calendar days, so a month or a year was counted up to 23 hours too early. Now it counts a month only when the start, moved by that many months with its time of day, is not later than now.

Closes #1230

@morphqdd

Copy link
Copy Markdown
Contributor Author

@yegor256, please take a look when you have a moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

outdated.js says "one year ago" for a page that is 364 days old, because getMonthsDifference compares calendar days and ignores the time of day

1 participant