Changelog
2.0.0 See changelog
Added short form localized tokens.
Added ability to define language a string should be parsed in.
Added support for reversed add/subtract arguments.
Added support for endOf('week')
and startOf('week')
.
Fixed the logic for moment#diff(Moment, 'months')
and moment#diff(Moment, 'years')
moment#diff
now floors instead of rounds.
Normalized moment#toString
.
Added isSame
, isAfter
, and isBefore
methods.
Added better week support.
Added moment#toJSON
Bugfix: Fixed parsing of first century dates
Bugfix: Parsing 10Sep2001 should work as expected
Bugfix: Fixed weirdness with moment.utc()
parsing.
Changed language ordinal method to return the number + ordinal instead of just the ordinal.
Changed two digit year parsing cutoff to match strptime.
Removed moment#sod
and moment#eod
in favor of moment#startOf
and moment#endOf
.
Removed moment.humanizeDuration()
in favor of moment.duration().humanize()
.
Removed the lang data objects from the top level namespace.
Duplicate Date
passed to moment()
instead of referencing it.
Changelog
1.7.0 See discussion
Added moment.fn.endOf()
and moment.fn.startOf()
.
Added validation via moment.fn.isValid()
.
Made formatting method 3x faster. http://jsperf.com/momentjs-cached-format-functions
Add support for month/weekday callbacks in moment.fn.format()
Added instance specific languages.
Added two letter weekday abbreviations with the formatting token dd
.
Various language updates.
Various bugfixes.
Changelog
1.6.0 See discussion
Added Durations.
Revamped parser to support parsing non-separated strings (YYYYMMDD vs YYYY-MM-DD).
Added support for millisecond parsing and formatting tokens (S SS SSS)
Added a getter for moment.lang()
Various bugfixes.
There are a few things deprecated in the 1.6.0 release.
The format tokens z
and zz
(timezone abbreviations like EST CST MST etc) will no longer be supported. Due to inconsistent browser support, we are unable to consistently produce this value. See this issue for more background.
The method moment.fn.native
is deprecated in favor of moment.fn.toDate
. There continue to be issues with Google Closure Compiler throwing errors when using native
, even in valid instances.
The way to customize am/pm strings is being changed. This would only affect you if you created a custom language file. For more information, see this issue.
Changelog
1.5.0 See milestone
Added UTC mode.
Added automatic ISO8601 parsing.
Various bugfixes.
Changelog
1.4.0 See milestone
Added moment.fn.toDate
as a replacement for moment.fn.native
.
Added moment.fn.sod
and moment.fn.eod
to get the start and end of day.
Various bugfixes.