Completely new model for computing whether a moment is valid or not. Also added parsing flags to allow checking specific issues during parsing.
.format() now returns
Ivalid Date for invalid moments. Read #1140 for
Also added strick mode parsing, which is intolerant to all deviations from the format. #913
toString should only be used for development/debugging purposes. If you want
a long format in a particular language use
Iso format will be used only if string doesn't have extra characters after format.
- Australian English (en-au)
- Bosnian (bs)
- Uzbek (uz)
- Lithuanian (lt)
- Vietnamese (vn)
Creating moments from string and format now supports weekday, week, week-year, and the iso variant. The week tokens interpretation only kicks in if neither month nor date-of-month are present in the tokens to prevent conflicting information coming from different tokens.
ddddlocale weekday, for example 'Monday'
GGGGGiso week year
.lang function accepts an array of languages and tries less specific
variants too. Intended to be used with browser provided language preferences.
Duration objects can be created using an iso duration string like
Change moment's timezone based on the input string
- Language modules now return the language code #1146, #1147
- Support for creating invalid moments. #1098 fixes #716
- When using AMD tell moment not to export it as a global variable #1098
- More precise array-of-formats parsing #1094
- long strings won't confuse array-of-formats creation. #1143 fixed by #1164
- formatting strings can contain newlines. #1151 fixed by #1158
- fixed weird bug Prototype.js monkey patching Array. #1159, [2ccdbc0]
- bg now uses 24H format #1157 fixes #1148
- renamed language bundles from
moment_with_langsto avoid issue with IIS, #1138 fixes #1118
- updated hungarian translation #1137
- IE < 9 work again after addition of
extend()function #1115 fixes #1114
- weekday now works on utc moments properly #1110
- fixed isValid for unix format token #1086 fixes #1075
- AM/PM for russian and ukranian #1072
- fixes in russian, ukranian week names #1082
- decapitalize dutch today/tomorrow/yesterday #1093 fixes #919
- added proper am/pm for chineese #1056
- fixed bug in node repl #1091 fixes #1084