Socket
Socket
Sign inDemoInstall

moment

Package Overview
Dependencies
Maintainers
5
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moment - npm Package Versions

1
68

2.0.0

Diff

Changelog

Source

2.0.0 See changelog

  • Release Feb 9, 2013

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.

timrwood
published 1.7.2 •

Changelog

Source

1.7.2 See discussion

  • Release Oct 2, 2012

Bugfixes

timrwood
published 1.7.1 •

Changelog

Source

1.7.1 See discussion

  • Release Oct 1, 2012

Bugfixes

published 1.7.0 •

Changelog

Source

1.7.0 See discussion

  • Release Jul 26, 2012

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.

timrwood
published 1.6.2 •

timrwood
published 1.6.1 •

timrwood
published 1.6.0 •

Changelog

Source

1.6.0 See discussion

  • Release Apr 26, 2012

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.

  1. 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.

  2. 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.

  3. 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.

timrwood
published 1.5.1 •

timrwood
published 1.5.0 •

Changelog

Source

1.5.0 See milestone

  • Release Mar 20, 2012

Added UTC mode.

Added automatic ISO8601 parsing.

Various bugfixes.

timrwood
published 1.4.0 •

Changelog

Source

1.4.0 See milestone

  • Release Feb 4, 2012

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.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc