Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix humanize #1642

Merged
merged 8 commits into from
Jun 19, 2014
Merged

Fix humanize #1642

merged 8 commits into from
Jun 19, 2014

Conversation

ichernev
Copy link
Contributor

@ichernev ichernev commented May 3, 2014

Fix for #1620

There are a few things going on here

  • Create accurate duration object given two dates (extracting months and milliseconds)
  • More accurate bubbling of milliseconds to months (taking into account days-per-year and leap years)
  • relativeTime now works with duration objects instead of mere milliseconds
  • fix broken tests -- oh well, hopefully wouldn't break anybody's flow
  • rebase on top of Adding settings to configure relative time thresholds between time units #1663

@icambron maybe a careful code review, I'll fix the tests at some point in the future.

@ichernev
Copy link
Contributor Author

ichernev commented Jun 5, 2014

Looks like #1663 is in (obvious) conflict with my code. I have to rebase it.

@icambron
Copy link
Member

Looks good to me. Merge whenever you want :)

ichernev added a commit that referenced this pull request Jun 19, 2014
Fix humanize

@changelog
@section bugfix
@description use duration object for relative duration strings
@Breaking relativeTimeThreshold keys are now changed to 's', 'm', 'h', 'd' and 'M'. Also the actual thresholds for changed (46 days is now 1 month, not 2).
@ichernev ichernev merged commit bc84a17 into moment:develop Jun 19, 2014
@ichernev ichernev deleted the fix-humanize branch June 19, 2014 06:02
Menelion pushed a commit to Menelion/moment that referenced this pull request Jul 6, 2014
@ashsearle ashsearle mentioned this pull request Aug 2, 2018
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.

2 participants