Skip to content

Instantly share code, notes, and snippets.

@ichernev
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ichernev/ac3899324a5fa6c8c9b4 to your computer and use it in GitHub Desktop.
Save ichernev/ac3899324a5fa6c8c9b4 to your computer and use it in GitHub Desktop.
moment 2.8.0 changelong

moment 2.8.0 changelog

incompatible changes

  • #1761: moments created without a language are no longer following the global language, in case it changes. Only newly created moments take the global language by default. In case you're affected by this, wait, comment on #1797 and wait for a proper reimplementation
  • #1642: 45 days is no longer "a month" according to humanize, cutoffs for month, and year have changed. Hopefully your code does not depend on a particular answer from humanize (which it shouldn't anyway)
  • #1784: if you use the human readable English datetime format in a weird way (like storing them in a database) that would break when the format changes you're at risk.
  • #1785 moment.momentProperties is now an array of properties instead of a hash. If you have a plugin that uses it to make sure cloned moments will retain the plugin-added properties you need to change your code.

deprecations (old behavior will be dropped in 3.0)

  • #1761 lang is renamed to locale, langData -> localeData. Also there is now defineLocale that should be used when creating new locales
  • #1763 add(unit, value) and subtract(unit, value) are now deprecated. Use add(value, unit) and subtract(value, unit) instead.
  • #1759 rename duration.toIsoString to duration.toISOString. The js standard library and moment's toISOString follow that convention.

new locales

bugfixes

  • #1738 local to zone conversion with keepLocalTime=true
  • #1642 more accurate humanize

performance

  • #1808 speedup cloning 49x
  • #1708 speedup creation with Date object

features

  • #1716 moment.relativeTimeThreshold now supports getting the existing threshold

locale bugfix

  • #1784 add comma between day-of-month and year in us-en
  • #1710 fix lithuanian month name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment