Comparing version 2.3.1 to 2.4.0
{ | ||
"name": "moment", | ||
"version": "2.3.1", | ||
"version": "2.4.0", | ||
"main": "moment.js", | ||
@@ -5,0 +5,0 @@ "ignore": [ |
{ | ||
"name": "moment", | ||
"version": "2.3.1", | ||
"version": "2.4.0", | ||
"main": "moment.js", | ||
@@ -16,2 +16,3 @@ "description": "Parse, validate, manipulate, and display dates in javascript.", | ||
"lang/cv.js", | ||
"lang/cy.js", | ||
"lang/da.js", | ||
@@ -29,2 +30,3 @@ "lang/de.js", | ||
"lang/fi.js", | ||
"lang/fo.js", | ||
"lang/fr-ca.js", | ||
@@ -62,2 +64,3 @@ "lang/fr.js", | ||
"lang/th.js", | ||
"lang/tl-ph.js", | ||
"lang/tr.js", | ||
@@ -71,3 +74,6 @@ "lang/tzm-la.js", | ||
"lang/zh-tw.js" | ||
], | ||
"scripts": [ | ||
"moment.js" | ||
] | ||
} |
@@ -42,3 +42,3 @@ // moment.js language configuration | ||
nounCase = (/D[oD]? *MMMM?/).test(format) ? | ||
nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ? | ||
'accusative' : | ||
@@ -56,3 +56,3 @@ 'nominative'; | ||
nounCase = (/D[oD]? *MMMM?/).test(format) ? | ||
nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ? | ||
'accusative' : | ||
@@ -59,0 +59,0 @@ 'nominative'; |
// moment.js language configuration | ||
// language : chinese | ||
// author : suupic : https://github.com/suupic | ||
// author : Zeno Zeng : https://github.com/zenozeng | ||
@@ -33,3 +34,5 @@ (function (factory) { | ||
var hm = hour * 100 + minute; | ||
if (hm < 900) { | ||
if (hm < 600) { | ||
return "凌晨"; | ||
} else if (hm < 900) { | ||
return "早上"; | ||
@@ -47,7 +50,23 @@ } else if (hm < 1130) { | ||
calendar : { | ||
sameDay : '[今天]LT', | ||
nextDay : '[明天]LT', | ||
nextWeek : '[下]ddddLT', | ||
lastDay : '[昨天]LT', | ||
lastWeek : '[上]ddddLT', | ||
sameDay : function () { | ||
return this.minutes() === 0 ? "[今天]Ah[点整]" : "[今天]LT"; | ||
}, | ||
nextDay : function () { | ||
return this.minutes() === 0 ? "[明天]Ah[点整]" : "[明天]LT"; | ||
}, | ||
lastDay : function () { | ||
return this.minutes() === 0 ? "[昨天]Ah[点整]" : "[昨天]LT"; | ||
}, | ||
nextWeek : function () { | ||
var startOfWeek, prefix; | ||
startOfWeek = moment().startOf('week'); | ||
prefix = this.unix() - startOfWeek.unix() >= 7 * 24 * 3600 ? '[下]' : '[本]'; | ||
return this.minutes() === 0 ? prefix + "dddAh点整" : prefix + "dddAh点mm"; | ||
}, | ||
lastWeek : function () { | ||
var startOfWeek, prefix; | ||
startOfWeek = moment().startOf('week'); | ||
prefix = this.unix() < startOfWeek.unix() ? '[上]' : '[本]'; | ||
return this.minutes() === 0 ? prefix + "dddAh点整" : prefix + "dddAh点mm"; | ||
}, | ||
sameElse : 'L' | ||
@@ -57,12 +76,12 @@ }, | ||
switch (period) { | ||
case "d" : | ||
case "D" : | ||
case "DDD" : | ||
case "d": | ||
case "D": | ||
case "DDD": | ||
return number + "日"; | ||
case "M" : | ||
case "M": | ||
return number + "月"; | ||
case "w" : | ||
case "W" : | ||
case "w": | ||
case "W": | ||
return number + "周"; | ||
default : | ||
default: | ||
return number; | ||
@@ -85,4 +104,9 @@ } | ||
yy : "%d年" | ||
}, | ||
week : { | ||
// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 | ||
dow : 1, // Monday is the first day of the week. | ||
doy : 4 // The week that contains Jan 4th is the first week of the year. | ||
} | ||
}); | ||
})); |
//! moment.js | ||
//! version : 2.3.1 | ||
//! version : 2.4.0 | ||
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors | ||
//! license : MIT | ||
//! momentjs.com | ||
(function(a){function b(a,b){return function(c){return i(a.call(this,c),b)}}function c(a,b){return function(c){return this.lang().ordinal(a.call(this,c),b)}}function d(){}function e(a){u(a),g(this,a)}function f(a){var b=o(a),c=b.year||0,d=b.month||0,e=b.week||0,f=b.day||0,g=b.hour||0,h=b.minute||0,i=b.second||0,j=b.millisecond||0;this._input=a,this._milliseconds=+j+1e3*i+6e4*h+36e5*g,this._days=+f+7*e,this._months=+d+12*c,this._data={},this._bubble()}function g(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return b.hasOwnProperty("toString")&&(a.toString=b.toString),b.hasOwnProperty("valueOf")&&(a.valueOf=b.valueOf),a}function h(a){return 0>a?Math.ceil(a):Math.floor(a)}function i(a,b){for(var c=a+"";c.length<b;)c="0"+c;return c}function j(a,b,c,d){var e,f,g=b._milliseconds,h=b._days,i=b._months;g&&a._d.setTime(+a._d+g*c),(h||i)&&(e=a.minute(),f=a.hour()),h&&a.date(a.date()+h*c),i&&a.month(a.month()+i*c),g&&!d&&bb.updateOffset(a),(h||i)&&(a.minute(e),a.hour(f))}function k(a){return"[object Array]"===Object.prototype.toString.call(a)}function l(a){return"[object Date]"===Object.prototype.toString.call(a)}function m(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&q(a[d])!==q(b[d]))&&g++;return g+f}function n(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=Jb[a]||Kb[b]||b}return a}function o(a){var b,c,d={};for(c in a)a.hasOwnProperty(c)&&(b=n(c),b&&(d[b]=a[c]));return d}function p(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}bb[b]=function(e,f){var g,h,i=bb.fn._lang[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=bb().utc().set(d,a);return i.call(bb.fn._lang,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function q(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function r(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function s(a){return t(a)?366:365}function t(a){return 0===a%4&&0!==a%100||0===a%400}function u(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[gb]<0||a._a[gb]>11?gb:a._a[hb]<1||a._a[hb]>r(a._a[fb],a._a[gb])?hb:a._a[ib]<0||a._a[ib]>23?ib:a._a[jb]<0||a._a[jb]>59?jb:a._a[kb]<0||a._a[kb]>59?kb:a._a[lb]<0||a._a[lb]>999?lb:-1,a._pf._overflowDayOfYear&&(fb>b||b>hb)&&(b=hb),a._pf.overflow=b)}function v(a){a._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1}}function w(a){return null==a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length)),a._isValid}function x(a){return a?a.toLowerCase().replace("_","-"):a}function y(a,b){return b.abbr=a,mb[a]||(mb[a]=new d),mb[a].set(b),mb[a]}function z(a){delete mb[a]}function A(a){var b,c,d,e,f=0,g=function(a){if(!mb[a]&&nb)try{require("./lang/"+a)}catch(b){}return mb[a]};if(!a)return bb.fn._lang;if(!k(a)){if(c=g(a))return c;a=[a]}for(;f<a.length;){for(e=x(a[f]).split("-"),b=e.length,d=x(a[f+1]),d=d?d.split("-"):null;b>0;){if(c=g(e.slice(0,b).join("-")))return c;if(d&&d.length>=b&&m(e,d,!0)>=b-1)break;b--}f++}return bb.fn._lang}function B(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function C(a){var b,c,d=a.match(rb);for(b=0,c=d.length;c>b;b++)d[b]=Ob[d[b]]?Ob[d[b]]:B(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function D(a,b){return a.isValid()?(b=E(b,a.lang()),Lb[b]||(Lb[b]=C(b)),Lb[b](a)):a.lang().invalidDate()}function E(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(sb.lastIndex=0;d>=0&&sb.test(a);)a=a.replace(sb,c),sb.lastIndex=0,d-=1;return a}function F(a,b){var c;switch(a){case"DDDD":return vb;case"YYYY":case"GGGG":case"gggg":return wb;case"YYYYY":case"GGGGG":case"ggggg":return xb;case"S":case"SS":case"SSS":case"DDD":return ub;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return yb;case"a":case"A":return A(b._l)._meridiemParse;case"X":return Bb;case"Z":case"ZZ":return zb;case"T":return Ab;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"ww":case"W":case"WW":case"e":case"E":return tb;default:return c=new RegExp(N(M(a.replace("\\","")),"i"))}}function G(a){var b=(zb.exec(a)||[])[0],c=(b+"").match(Gb)||["-",0,0],d=+(60*c[1])+q(c[2]);return"+"===c[0]?-d:d}function H(a,b,c){var d,e=c._a;switch(a){case"M":case"MM":null!=b&&(e[gb]=q(b)-1);break;case"MMM":case"MMMM":d=A(c._l).monthsParse(b),null!=d?e[gb]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[hb]=q(b));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=q(b));break;case"YY":e[fb]=q(b)+(q(b)>68?1900:2e3);break;case"YYYY":case"YYYYY":e[fb]=q(b);break;case"a":case"A":c._isPm=A(c._l).isPM(b);break;case"H":case"HH":case"h":case"hh":e[ib]=q(b);break;case"m":case"mm":e[jb]=q(b);break;case"s":case"ss":e[kb]=q(b);break;case"S":case"SS":case"SSS":e[lb]=q(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=G(b);break;case"w":case"ww":case"W":case"WW":case"d":case"dd":case"ddd":case"dddd":case"e":case"E":a=a.substr(0,1);case"gg":case"gggg":case"GG":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=b)}}function I(a){var b,c,d,e,f,g,h,i,j,k,l=[];if(!a._d){for(d=K(a),a._w&&null==a._a[hb]&&null==a._a[gb]&&(f=function(b){return b?b.length<3?parseInt(b,10)>68?"19"+b:"20"+b:b:null==a._a[fb]?bb().weekYear():a._a[fb]},g=a._w,null!=g.GG||null!=g.W||null!=g.E?h=X(f(g.GG),g.W||1,g.E,4,1):(i=A(a._l),j=null!=g.d?T(g.d,i):null!=g.e?parseInt(g.e,10)+i._week.dow:0,k=parseInt(g.w,10)||1,null!=g.d&&j<i._week.dow&&k++,h=X(f(g.gg),k,j,i._week.doy,i._week.dow)),a._a[fb]=h.year,a._dayOfYear=h.dayOfYear),a._dayOfYear&&(e=null==a._a[fb]?d[fb]:a._a[fb],a._dayOfYear>s(e)&&(a._pf._overflowDayOfYear=!0),c=S(e,0,a._dayOfYear),a._a[gb]=c.getUTCMonth(),a._a[hb]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=l[b]=d[b];for(;7>b;b++)a._a[b]=l[b]=null==a._a[b]?2===b?1:0:a._a[b];l[ib]+=q((a._tzm||0)/60),l[jb]+=q((a._tzm||0)%60),a._d=(a._useUTC?S:R).apply(null,l)}}function J(a){var b;a._d||(b=o(a._i),a._a=[b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond],I(a))}function K(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function L(a){a._a=[],a._pf.empty=!0;var b,c,d,e,f,g=A(a._l),h=""+a._i,i=h.length,j=0;for(d=E(a._f,g).match(rb)||[],b=0;b<d.length;b++)e=d[b],c=(F(e,a).exec(h)||[])[0],c&&(f=h.substr(0,h.indexOf(c)),f.length>0&&a._pf.unusedInput.push(f),h=h.slice(h.indexOf(c)+c.length),j+=c.length),Ob[e]?(c?a._pf.empty=!1:a._pf.unusedTokens.push(e),H(e,c,a)):a._strict&&!c&&a._pf.unusedTokens.push(e);a._pf.charsLeftOver=i-j,h.length>0&&a._pf.unusedInput.push(h),a._isPm&&a._a[ib]<12&&(a._a[ib]+=12),a._isPm===!1&&12===a._a[ib]&&(a._a[ib]=0),I(a),u(a)}function M(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function N(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function O(a){var b,c,d,e,f;if(0===a._f.length)return a._pf.invalidFormat=!0,a._d=new Date(0/0),void 0;for(e=0;e<a._f.length;e++)f=0,b=g({},a),v(b),b._f=a._f[e],L(b),w(b)&&(f+=b._pf.charsLeftOver,f+=10*b._pf.unusedTokens.length,b._pf.score=f,(null==d||d>f)&&(d=f,c=b));g(a,c||b)}function P(a){var b,c=a._i,d=Cb.exec(c);if(d){for(b=4;b>0;b--)if(d[b]){a._f=Eb[b-1]+(d[6]||" ");break}for(b=0;4>b;b++)if(Fb[b][1].exec(c)){a._f+=Fb[b][0];break}zb.exec(c)&&(a._f+=" Z"),L(a)}else a._d=new Date(c)}function Q(b){var c=b._i,d=ob.exec(c);c===a?b._d=new Date:d?b._d=new Date(+d[1]):"string"==typeof c?P(b):k(c)?(b._a=c.slice(0),I(b)):l(c)?b._d=new Date(+c):"object"==typeof c?J(b):b._d=new Date(c)}function R(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function S(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function T(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function U(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function V(a,b,c){var d=eb(Math.abs(a)/1e3),e=eb(d/60),f=eb(e/60),g=eb(f/24),h=eb(g/365),i=45>d&&["s",d]||1===e&&["m"]||45>e&&["mm",e]||1===f&&["h"]||22>f&&["hh",f]||1===g&&["d"]||25>=g&&["dd",g]||45>=g&&["M"]||345>g&&["MM",eb(g/30)]||1===h&&["y"]||["yy",h];return i[2]=b,i[3]=a>0,i[4]=c,U.apply({},i)}function W(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=bb(a).add("d",f),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function X(a,b,c,d,e){var f,g,h=new Date(Date.UTC(a,0)).getUTCDay();return c=null!=c?c:e,f=e-h+(h>d?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:s(a-1)+g}}function Y(a){var b=a._i,c=a._f;return"undefined"==typeof a._pf&&v(a),null===b?bb.invalid({nullInput:!0}):("string"==typeof b&&(a._i=b=A().preparse(b)),bb.isMoment(b)?(a=g({},b),a._d=new Date(+b._d)):c?k(c)?O(a):L(a):Q(a),new e(a))}function Z(a,b){bb.fn[a]=bb.fn[a+"s"]=function(a){var c=this._isUTC?"UTC":"";return null!=a?(this._d["set"+c+b](a),bb.updateOffset(this),this):this._d["get"+c+b]()}}function $(a){bb.duration.fn[a]=function(){return this._data[a]}}function _(a,b){bb.duration.fn["as"+a]=function(){return+this/b}}function ab(){"undefined"==typeof ender&&(this.moment=bb)}for(var bb,cb,db="2.3.1",eb=Math.round,fb=0,gb=1,hb=2,ib=3,jb=4,kb=5,lb=6,mb={},nb="undefined"!=typeof module&&module.exports,ob=/^\/?Date\((\-?\d+)/i,pb=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,qb=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,rb=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,sb=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,tb=/\d\d?/,ub=/\d{1,3}/,vb=/\d{3}/,wb=/\d{1,4}/,xb=/[+\-]?\d{1,6}/,yb=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,zb=/Z|[\+\-]\d\d:?\d\d/i,Ab=/T/i,Bb=/[\+\-]?\d+(\.\d{1,3})?/,Cb=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?$/,Db="YYYY-MM-DDTHH:mm:ssZ",Eb=["YYYY-MM-DD","GGGG-[W]WW","GGGG-[W]WW-E","YYYY-DDD"],Fb=[["HH:mm:ss.S",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Gb=/([\+\-]|\d\d)/gi,Hb="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),Ib={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},Jb={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},Kb={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},Lb={},Mb="DDD w W M D d".split(" "),Nb="M D H h m s w W".split(" "),Ob={M:function(){return this.month()+1},MMM:function(a){return this.lang().monthsShort(this,a)},MMMM:function(a){return this.lang().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.lang().weekdaysMin(this,a)},ddd:function(a){return this.lang().weekdaysShort(this,a)},dddd:function(a){return this.lang().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return i(this.year()%100,2)},YYYY:function(){return i(this.year(),4)},YYYYY:function(){return i(this.year(),5)},gg:function(){return i(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return i(this.weekYear(),5)},GG:function(){return i(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return i(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return q(this.milliseconds()/100)},SS:function(){return i(q(this.milliseconds()/10),2)},SSS:function(){return i(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+i(q(a/60),2)+":"+i(q(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+i(q(10*a/6),4)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()}},Pb=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];Mb.length;)cb=Mb.pop(),Ob[cb+"o"]=c(Ob[cb],cb);for(;Nb.length;)cb=Nb.pop(),Ob[cb+cb]=b(Ob[cb],2);for(Ob.DDDD=b(Ob.DDD,3),g(d.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;12>b;b++)if(this._monthsParse[b]||(c=bb.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=bb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return W(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),bb=function(b,c,d,e){return"boolean"==typeof d&&(e=d,d=a),Y({_i:b,_f:c,_l:d,_strict:e,_isUTC:!1})},bb.utc=function(b,c,d,e){var f;return"boolean"==typeof d&&(e=d,d=a),f=Y({_useUTC:!0,_isUTC:!0,_l:d,_i:b,_f:c,_strict:e}).utc()},bb.unix=function(a){return bb(1e3*a)},bb.duration=function(a,b){var c,d,e,g=bb.isDuration(a),h="number"==typeof a,i=g?a._input:h?{}:a,j=null;return h?b?i[b]=a:i.milliseconds=a:(j=pb.exec(a))?(c="-"===j[1]?-1:1,i={y:0,d:q(j[hb])*c,h:q(j[ib])*c,m:q(j[jb])*c,s:q(j[kb])*c,ms:q(j[lb])*c}):(j=qb.exec(a))&&(c="-"===j[1]?-1:1,e=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*c},i={y:e(j[2]),M:e(j[3]),d:e(j[4]),h:e(j[5]),m:e(j[6]),s:e(j[7]),w:e(j[8])}),d=new f(i),g&&a.hasOwnProperty("_lang")&&(d._lang=a._lang),d},bb.version=db,bb.defaultFormat=Db,bb.updateOffset=function(){},bb.lang=function(a,b){var c;return a?(b?y(x(a),b):null===b?(z(a),a="en"):mb[a]||A(a),c=bb.duration.fn._lang=bb.fn._lang=A(a),c._abbr):bb.fn._lang._abbr},bb.langData=function(a){return a&&a._lang&&a._lang._abbr&&(a=a._lang._abbr),A(a)},bb.isMoment=function(a){return a instanceof e},bb.isDuration=function(a){return a instanceof f},cb=Pb.length-1;cb>=0;--cb)p(Pb[cb]);for(bb.normalizeUnits=function(a){return n(a)},bb.invalid=function(a){var b=bb.utc(0/0);return null!=a?g(b._pf,a):b._pf.userInvalidated=!0,b},bb.parseZone=function(a){return bb(a).parseZone()},g(bb.fn=e.prototype,{clone:function(){return bb(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){return D(bb(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return w(this)},isDSTShifted:function(){return this._a?this.isValid()&&m(this._a,(this._isUTC?bb.utc(this._a):bb(this._a)).toArray())>0:!1},parsingFlags:function(){return g({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(a){var b=D(this,a||bb.defaultFormat);return this.lang().postformat(b)},add:function(a,b){var c;return c="string"==typeof a?bb.duration(+b,a):bb.duration(a,b),j(this,c,1),this},subtract:function(a,b){var c;return c="string"==typeof a?bb.duration(+b,a):bb.duration(a,b),j(this,c,-1),this},diff:function(a,b,c){var d,e,f=this._isUTC?bb(a).zone(this._offset||0):bb(a).local(),g=6e4*(this.zone()-f.zone());return b=n(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-bb(this).startOf("month")-(f-bb(f).startOf("month")))/d,e-=6e4*(this.zone()-bb(this).startOf("month").zone()-(f.zone()-bb(f).startOf("month").zone()))/d,"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:h(e)},from:function(a,b){return bb.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!b)},fromNow:function(a){return this.from(bb(),a)},calendar:function(){var a=this.diff(bb().zone(this.zone()).startOf("day"),"days",!0),b=-6>a?"sameElse":-1>a?"lastWeek":0>a?"lastDay":1>a?"sameDay":2>a?"nextDay":7>a?"nextWeek":"sameElse";return this.format(this.lang().calendar(b,this))},isLeapYear:function(){return t(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=T(a,this.lang()),this.add({d:a-b})):b},month:function(a){var b,c=this._isUTC?"UTC":"";return null!=a?"string"==typeof a&&(a=this.lang().monthsParse(a),"number"!=typeof a)?this:(b=this.date(),this.date(1),this._d["set"+c+"Month"](a),this.date(Math.min(b,this.daysInMonth())),bb.updateOffset(this),this):this._d["get"+c+"Month"]()},startOf:function(a){switch(a=n(a)){case"year":this.month(0);case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),this},endOf:function(a){return a=n(a),this.startOf(a).add("isoWeek"===a?"week":a,1).subtract("ms",1)},isAfter:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)>+bb(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+bb(a).startOf(b)},isSame:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)===+bb(a).startOf(b)},min:function(a){return a=bb.apply(null,arguments),this>a?this:a},max:function(a){return a=bb.apply(null,arguments),a>this?this:a},zone:function(a){var b=this._offset||0;return null==a?this._isUTC?b:this._d.getTimezoneOffset():("string"==typeof a&&(a=G(a)),Math.abs(a)<16&&(a=60*a),this._offset=a,this._isUTC=!0,b!==a&&j(this,bb.duration(b-a,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?bb(a).zone():0,0===(this.zone()-a)%60},daysInMonth:function(){return r(this.year(),this.month())},dayOfYear:function(a){var b=eb((bb(this).startOf("day")-bb(this).startOf("year"))/864e5)+1;return null==a?b:this.add("d",a-b)},weekYear:function(a){var b=W(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==a?b:this.add("y",a-b)},isoWeekYear:function(a){var b=W(this,1,4).year;return null==a?b:this.add("y",a-b)},week:function(a){var b=this.lang().week(this);return null==a?b:this.add("d",7*(a-b))},isoWeek:function(a){var b=W(this,1,4).week;return null==a?b:this.add("d",7*(a-b))},weekday:function(a){var b=(this.day()+7-this.lang()._week.dow)%7;return null==a?b:this.add("d",a-b)},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},get:function(a){return a=n(a),this[a]()},set:function(a,b){return a=n(a),"function"==typeof this[a]&&this[a](b),this},lang:function(b){return b===a?this._lang:(this._lang=A(b),this)}}),cb=0;cb<Hb.length;cb++)Z(Hb[cb].toLowerCase().replace(/s$/,""),Hb[cb]);Z("year","FullYear"),bb.fn.days=bb.fn.day,bb.fn.months=bb.fn.month,bb.fn.weeks=bb.fn.week,bb.fn.isoWeeks=bb.fn.isoWeek,bb.fn.toJSON=bb.fn.toISOString,g(bb.duration.fn=f.prototype,{_bubble:function(){var a,b,c,d,e=this._milliseconds,f=this._days,g=this._months,i=this._data;i.milliseconds=e%1e3,a=h(e/1e3),i.seconds=a%60,b=h(a/60),i.minutes=b%60,c=h(b/60),i.hours=c%24,f+=h(c/24),i.days=f%30,g+=h(f/30),i.months=g%12,d=h(g/12),i.years=d},weeks:function(){return h(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+2592e6*(this._months%12)+31536e6*q(this._months/12)},humanize:function(a){var b=+this,c=V(b,!a,this.lang());return a&&(c=this.lang().pastFuture(b,c)),this.lang().postformat(c)},add:function(a,b){var c=bb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=bb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=n(a),this[a.toLowerCase()+"s"]()},as:function(a){return a=n(a),this["as"+a.charAt(0).toUpperCase()+a.slice(1)+"s"]()},lang:bb.fn.lang,toIsoString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"}});for(cb in Ib)Ib.hasOwnProperty(cb)&&(_(cb,Ib[cb]),$(cb.toLowerCase()));_("Weeks",6048e5),bb.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},bb.lang("en",{ordinal:function(a){var b=a%10,c=1===q(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),nb?(module.exports=bb,ab()):"function"==typeof define&&define.amd?define("moment",function(a,b,c){return c.config().noGlobal!==!0&&ab(),bb}):ab()}).call(this); | ||
(function(a){function b(a,b){return function(c){return i(a.call(this,c),b)}}function c(a,b){return function(c){return this.lang().ordinal(a.call(this,c),b)}}function d(){}function e(a){u(a),g(this,a)}function f(a){var b=o(a),c=b.year||0,d=b.month||0,e=b.week||0,f=b.day||0,g=b.hour||0,h=b.minute||0,i=b.second||0,j=b.millisecond||0;this._input=a,this._milliseconds=+j+1e3*i+6e4*h+36e5*g,this._days=+f+7*e,this._months=+d+12*c,this._data={},this._bubble()}function g(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return b.hasOwnProperty("toString")&&(a.toString=b.toString),b.hasOwnProperty("valueOf")&&(a.valueOf=b.valueOf),a}function h(a){return 0>a?Math.ceil(a):Math.floor(a)}function i(a,b){for(var c=a+"";c.length<b;)c="0"+c;return c}function j(a,b,c,d){var e,f,g=b._milliseconds,h=b._days,i=b._months;g&&a._d.setTime(+a._d+g*c),(h||i)&&(e=a.minute(),f=a.hour()),h&&a.date(a.date()+h*c),i&&a.month(a.month()+i*c),g&&!d&&bb.updateOffset(a),(h||i)&&(a.minute(e),a.hour(f))}function k(a){return"[object Array]"===Object.prototype.toString.call(a)}function l(a){return"[object Date]"===Object.prototype.toString.call(a)||a instanceof Date}function m(a,b,c){var d,e=Math.min(a.length,b.length),f=Math.abs(a.length-b.length),g=0;for(d=0;e>d;d++)(c&&a[d]!==b[d]||!c&&q(a[d])!==q(b[d]))&&g++;return g+f}function n(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=Kb[a]||Lb[b]||b}return a}function o(a){var b,c,d={};for(c in a)a.hasOwnProperty(c)&&(b=n(c),b&&(d[b]=a[c]));return d}function p(b){var c,d;if(0===b.indexOf("week"))c=7,d="day";else{if(0!==b.indexOf("month"))return;c=12,d="month"}bb[b]=function(e,f){var g,h,i=bb.fn._lang[b],j=[];if("number"==typeof e&&(f=e,e=a),h=function(a){var b=bb().utc().set(d,a);return i.call(bb.fn._lang,b,e||"")},null!=f)return h(f);for(g=0;c>g;g++)j.push(h(g));return j}}function q(a){var b=+a,c=0;return 0!==b&&isFinite(b)&&(c=b>=0?Math.floor(b):Math.ceil(b)),c}function r(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function s(a){return t(a)?366:365}function t(a){return 0===a%4&&0!==a%100||0===a%400}function u(a){var b;a._a&&-2===a._pf.overflow&&(b=a._a[gb]<0||a._a[gb]>11?gb:a._a[hb]<1||a._a[hb]>r(a._a[fb],a._a[gb])?hb:a._a[ib]<0||a._a[ib]>23?ib:a._a[jb]<0||a._a[jb]>59?jb:a._a[kb]<0||a._a[kb]>59?kb:a._a[lb]<0||a._a[lb]>999?lb:-1,a._pf._overflowDayOfYear&&(fb>b||b>hb)&&(b=hb),a._pf.overflow=b)}function v(a){a._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function w(a){return null==a._isValid&&(a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated,a._strict&&(a._isValid=a._isValid&&0===a._pf.charsLeftOver&&0===a._pf.unusedTokens.length)),a._isValid}function x(a){return a?a.toLowerCase().replace("_","-"):a}function y(a,b){return b.abbr=a,mb[a]||(mb[a]=new d),mb[a].set(b),mb[a]}function z(a){delete mb[a]}function A(a){var b,c,d,e,f=0,g=function(a){if(!mb[a]&&nb)try{require("./lang/"+a)}catch(b){}return mb[a]};if(!a)return bb.fn._lang;if(!k(a)){if(c=g(a))return c;a=[a]}for(;f<a.length;){for(e=x(a[f]).split("-"),b=e.length,d=x(a[f+1]),d=d?d.split("-"):null;b>0;){if(c=g(e.slice(0,b).join("-")))return c;if(d&&d.length>=b&&m(e,d,!0)>=b-1)break;b--}f++}return bb.fn._lang}function B(a){return a.match(/\[[\s\S]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function C(a){var b,c,d=a.match(rb);for(b=0,c=d.length;c>b;b++)d[b]=Pb[d[b]]?Pb[d[b]]:B(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function D(a,b){return a.isValid()?(b=E(b,a.lang()),Mb[b]||(Mb[b]=C(b)),Mb[b](a)):a.lang().invalidDate()}function E(a,b){function c(a){return b.longDateFormat(a)||a}var d=5;for(sb.lastIndex=0;d>=0&&sb.test(a);)a=a.replace(sb,c),sb.lastIndex=0,d-=1;return a}function F(a,b){var c;switch(a){case"DDDD":return vb;case"YYYY":case"GGGG":case"gggg":return wb;case"YYYYY":case"GGGGG":case"ggggg":return xb;case"S":case"SS":case"SSS":case"DDD":return ub;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return zb;case"a":case"A":return A(b._l)._meridiemParse;case"X":return Cb;case"Z":case"ZZ":return Ab;case"T":return Bb;case"SSSS":return yb;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"ww":case"W":case"WW":case"e":case"E":return tb;default:return c=new RegExp(N(M(a.replace("\\","")),"i"))}}function G(a){var b=(Ab.exec(a)||[])[0],c=(b+"").match(Hb)||["-",0,0],d=+(60*c[1])+q(c[2]);return"+"===c[0]?-d:d}function H(a,b,c){var d,e=c._a;switch(a){case"M":case"MM":null!=b&&(e[gb]=q(b)-1);break;case"MMM":case"MMMM":d=A(c._l).monthsParse(b),null!=d?e[gb]=d:c._pf.invalidMonth=b;break;case"D":case"DD":null!=b&&(e[hb]=q(b));break;case"DDD":case"DDDD":null!=b&&(c._dayOfYear=q(b));break;case"YY":e[fb]=q(b)+(q(b)>68?1900:2e3);break;case"YYYY":case"YYYYY":e[fb]=q(b);break;case"a":case"A":c._isPm=A(c._l).isPM(b);break;case"H":case"HH":case"h":case"hh":e[ib]=q(b);break;case"m":case"mm":e[jb]=q(b);break;case"s":case"ss":e[kb]=q(b);break;case"S":case"SS":case"SSS":case"SSSS":e[lb]=q(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=G(b);break;case"w":case"ww":case"W":case"WW":case"d":case"dd":case"ddd":case"dddd":case"e":case"E":a=a.substr(0,1);case"gg":case"gggg":case"GG":case"GGGG":case"GGGGG":a=a.substr(0,2),b&&(c._w=c._w||{},c._w[a]=b)}}function I(a){var b,c,d,e,f,g,h,i,j,k,l=[];if(!a._d){for(d=K(a),a._w&&null==a._a[hb]&&null==a._a[gb]&&(f=function(b){return b?b.length<3?parseInt(b,10)>68?"19"+b:"20"+b:b:null==a._a[fb]?bb().weekYear():a._a[fb]},g=a._w,null!=g.GG||null!=g.W||null!=g.E?h=X(f(g.GG),g.W||1,g.E,4,1):(i=A(a._l),j=null!=g.d?T(g.d,i):null!=g.e?parseInt(g.e,10)+i._week.dow:0,k=parseInt(g.w,10)||1,null!=g.d&&j<i._week.dow&&k++,h=X(f(g.gg),k,j,i._week.doy,i._week.dow)),a._a[fb]=h.year,a._dayOfYear=h.dayOfYear),a._dayOfYear&&(e=null==a._a[fb]?d[fb]:a._a[fb],a._dayOfYear>s(e)&&(a._pf._overflowDayOfYear=!0),c=S(e,0,a._dayOfYear),a._a[gb]=c.getUTCMonth(),a._a[hb]=c.getUTCDate()),b=0;3>b&&null==a._a[b];++b)a._a[b]=l[b]=d[b];for(;7>b;b++)a._a[b]=l[b]=null==a._a[b]?2===b?1:0:a._a[b];l[ib]+=q((a._tzm||0)/60),l[jb]+=q((a._tzm||0)%60),a._d=(a._useUTC?S:R).apply(null,l)}}function J(a){var b;a._d||(b=o(a._i),a._a=[b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond],I(a))}function K(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function L(a){a._a=[],a._pf.empty=!0;var b,c,d,e,f,g=A(a._l),h=""+a._i,i=h.length,j=0;for(d=E(a._f,g).match(rb)||[],b=0;b<d.length;b++)e=d[b],c=(F(e,a).exec(h)||[])[0],c&&(f=h.substr(0,h.indexOf(c)),f.length>0&&a._pf.unusedInput.push(f),h=h.slice(h.indexOf(c)+c.length),j+=c.length),Pb[e]?(c?a._pf.empty=!1:a._pf.unusedTokens.push(e),H(e,c,a)):a._strict&&!c&&a._pf.unusedTokens.push(e);a._pf.charsLeftOver=i-j,h.length>0&&a._pf.unusedInput.push(h),a._isPm&&a._a[ib]<12&&(a._a[ib]+=12),a._isPm===!1&&12===a._a[ib]&&(a._a[ib]=0),I(a),u(a)}function M(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function N(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function O(a){var b,c,d,e,f;if(0===a._f.length)return a._pf.invalidFormat=!0,a._d=new Date(0/0),void 0;for(e=0;e<a._f.length;e++)f=0,b=g({},a),v(b),b._f=a._f[e],L(b),w(b)&&(f+=b._pf.charsLeftOver,f+=10*b._pf.unusedTokens.length,b._pf.score=f,(null==d||d>f)&&(d=f,c=b));g(a,c||b)}function P(a){var b,c=a._i,d=Db.exec(c);if(d){for(a._pf.iso=!0,b=4;b>0;b--)if(d[b]){a._f=Fb[b-1]+(d[6]||" ");break}for(b=0;4>b;b++)if(Gb[b][1].exec(c)){a._f+=Gb[b][0];break}Ab.exec(c)&&(a._f+="Z"),L(a)}else a._d=new Date(c)}function Q(b){var c=b._i,d=ob.exec(c);c===a?b._d=new Date:d?b._d=new Date(+d[1]):"string"==typeof c?P(b):k(c)?(b._a=c.slice(0),I(b)):l(c)?b._d=new Date(+c):"object"==typeof c?J(b):b._d=new Date(c)}function R(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);return 1970>a&&h.setFullYear(a),h}function S(a){var b=new Date(Date.UTC.apply(null,arguments));return 1970>a&&b.setUTCFullYear(a),b}function T(a,b){if("string"==typeof a)if(isNaN(a)){if(a=b.weekdaysParse(a),"number"!=typeof a)return null}else a=parseInt(a,10);return a}function U(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function V(a,b,c){var d=eb(Math.abs(a)/1e3),e=eb(d/60),f=eb(e/60),g=eb(f/24),h=eb(g/365),i=45>d&&["s",d]||1===e&&["m"]||45>e&&["mm",e]||1===f&&["h"]||22>f&&["hh",f]||1===g&&["d"]||25>=g&&["dd",g]||45>=g&&["M"]||345>g&&["MM",eb(g/30)]||1===h&&["y"]||["yy",h];return i[2]=b,i[3]=a>0,i[4]=c,U.apply({},i)}function W(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=bb(a).add("d",f),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function X(a,b,c,d,e){var f,g,h=new Date(Date.UTC(a,0)).getUTCDay();return c=null!=c?c:e,f=e-h+(h>d?7:0),g=7*(b-1)+(c-e)+f+1,{year:g>0?a:a-1,dayOfYear:g>0?g:s(a-1)+g}}function Y(a){var b=a._i,c=a._f;return"undefined"==typeof a._pf&&v(a),null===b?bb.invalid({nullInput:!0}):("string"==typeof b&&(a._i=b=A().preparse(b)),bb.isMoment(b)?(a=g({},b),a._d=new Date(+b._d)):c?k(c)?O(a):L(a):Q(a),new e(a))}function Z(a,b){bb.fn[a]=bb.fn[a+"s"]=function(a){var c=this._isUTC?"UTC":"";return null!=a?(this._d["set"+c+b](a),bb.updateOffset(this),this):this._d["get"+c+b]()}}function $(a){bb.duration.fn[a]=function(){return this._data[a]}}function _(a,b){bb.duration.fn["as"+a]=function(){return+this/b}}function ab(a){var b=!1,c=bb;"undefined"==typeof ender&&(this.moment=a?function(){return!b&&console&&console.warn&&(b=!0,console.warn("Accessing Moment through the global scope is deprecated, and will be removed in an upcoming release.")),c.apply(null,arguments)}:bb)}for(var bb,cb,db="2.4.0",eb=Math.round,fb=0,gb=1,hb=2,ib=3,jb=4,kb=5,lb=6,mb={},nb="undefined"!=typeof module&&module.exports,ob=/^\/?Date\((\-?\d+)/i,pb=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,qb=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,rb=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,sb=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,tb=/\d\d?/,ub=/\d{1,3}/,vb=/\d{3}/,wb=/\d{1,4}/,xb=/[+\-]?\d{1,6}/,yb=/\d+/,zb=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Ab=/Z|[\+\-]\d\d:?\d\d/i,Bb=/T/i,Cb=/[\+\-]?\d+(\.\d{1,3})?/,Db=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d:?\d\d|Z)?)?$/,Eb="YYYY-MM-DDTHH:mm:ssZ",Fb=["YYYY-MM-DD","GGGG-[W]WW","GGGG-[W]WW-E","YYYY-DDD"],Gb=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d{1,3}/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Hb=/([\+\-]|\d\d)/gi,Ib="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),Jb={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},Kb={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},Lb={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},Mb={},Nb="DDD w W M D d".split(" "),Ob="M D H h m s w W".split(" "),Pb={M:function(){return this.month()+1},MMM:function(a){return this.lang().monthsShort(this,a)},MMMM:function(a){return this.lang().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.lang().weekdaysMin(this,a)},ddd:function(a){return this.lang().weekdaysShort(this,a)},dddd:function(a){return this.lang().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return i(this.year()%100,2)},YYYY:function(){return i(this.year(),4)},YYYYY:function(){return i(this.year(),5)},gg:function(){return i(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return i(this.weekYear(),5)},GG:function(){return i(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return i(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return q(this.milliseconds()/100)},SS:function(){return i(q(this.milliseconds()/10),2)},SSS:function(){return i(this.milliseconds(),3)},SSSS:function(){return i(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+i(q(a/60),2)+":"+i(q(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+i(q(10*a/6),4)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()}},Qb=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];Nb.length;)cb=Nb.pop(),Pb[cb+"o"]=c(Pb[cb],cb);for(;Ob.length;)cb=Ob.pop(),Pb[cb+cb]=b(Pb[cb],2);for(Pb.DDDD=b(Pb.DDD,3),g(d.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;12>b;b++)if(this._monthsParse[b]||(c=bb.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=bb([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return W(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),bb=function(b,c,d,e){return"boolean"==typeof d&&(e=d,d=a),Y({_i:b,_f:c,_l:d,_strict:e,_isUTC:!1})},bb.utc=function(b,c,d,e){var f;return"boolean"==typeof d&&(e=d,d=a),f=Y({_useUTC:!0,_isUTC:!0,_l:d,_i:b,_f:c,_strict:e}).utc()},bb.unix=function(a){return bb(1e3*a)},bb.duration=function(a,b){var c,d,e,g=bb.isDuration(a),h="number"==typeof a,i=g?a._input:h?{}:a,j=null;return h?b?i[b]=a:i.milliseconds=a:(j=pb.exec(a))?(c="-"===j[1]?-1:1,i={y:0,d:q(j[hb])*c,h:q(j[ib])*c,m:q(j[jb])*c,s:q(j[kb])*c,ms:q(j[lb])*c}):(j=qb.exec(a))&&(c="-"===j[1]?-1:1,e=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*c},i={y:e(j[2]),M:e(j[3]),d:e(j[4]),h:e(j[5]),m:e(j[6]),s:e(j[7]),w:e(j[8])}),d=new f(i),g&&a.hasOwnProperty("_lang")&&(d._lang=a._lang),d},bb.version=db,bb.defaultFormat=Eb,bb.updateOffset=function(){},bb.lang=function(a,b){var c;return a?(b?y(x(a),b):null===b?(z(a),a="en"):mb[a]||A(a),c=bb.duration.fn._lang=bb.fn._lang=A(a),c._abbr):bb.fn._lang._abbr},bb.langData=function(a){return a&&a._lang&&a._lang._abbr&&(a=a._lang._abbr),A(a)},bb.isMoment=function(a){return a instanceof e},bb.isDuration=function(a){return a instanceof f},cb=Qb.length-1;cb>=0;--cb)p(Qb[cb]);for(bb.normalizeUnits=function(a){return n(a)},bb.invalid=function(a){var b=bb.utc(0/0);return null!=a?g(b._pf,a):b._pf.userInvalidated=!0,b},bb.parseZone=function(a){return bb(a).parseZone()},g(bb.fn=e.prototype,{clone:function(){return bb(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){return D(bb(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return w(this)},isDSTShifted:function(){return this._a?this.isValid()&&m(this._a,(this._isUTC?bb.utc(this._a):bb(this._a)).toArray())>0:!1},parsingFlags:function(){return g({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(a){var b=D(this,a||bb.defaultFormat);return this.lang().postformat(b)},add:function(a,b){var c;return c="string"==typeof a?bb.duration(+b,a):bb.duration(a,b),j(this,c,1),this},subtract:function(a,b){var c;return c="string"==typeof a?bb.duration(+b,a):bb.duration(a,b),j(this,c,-1),this},diff:function(a,b,c){var d,e,f=this._isUTC?bb(a).zone(this._offset||0):bb(a).local(),g=6e4*(this.zone()-f.zone());return b=n(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-bb(this).startOf("month")-(f-bb(f).startOf("month")))/d,e-=6e4*(this.zone()-bb(this).startOf("month").zone()-(f.zone()-bb(f).startOf("month").zone()))/d,"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:h(e)},from:function(a,b){return bb.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!b)},fromNow:function(a){return this.from(bb(),a)},calendar:function(){var a=this.diff(bb().zone(this.zone()).startOf("day"),"days",!0),b=-6>a?"sameElse":-1>a?"lastWeek":0>a?"lastDay":1>a?"sameDay":2>a?"nextDay":7>a?"nextWeek":"sameElse";return this.format(this.lang().calendar(b,this))},isLeapYear:function(){return t(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?(a=T(a,this.lang()),this.add({d:a-b})):b},month:function(a){var b,c=this._isUTC?"UTC":"";return null!=a?"string"==typeof a&&(a=this.lang().monthsParse(a),"number"!=typeof a)?this:(b=this.date(),this.date(1),this._d["set"+c+"Month"](a),this.date(Math.min(b,this.daysInMonth())),bb.updateOffset(this),this):this._d["get"+c+"Month"]()},startOf:function(a){switch(a=n(a)){case"year":this.month(0);case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoWeek"===a&&this.isoWeekday(1),this},endOf:function(a){return a=n(a),this.startOf(a).add("isoWeek"===a?"week":a,1).subtract("ms",1)},isAfter:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)>+bb(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+bb(a).startOf(b)},isSame:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)===+bb(a).startOf(b)},min:function(a){return a=bb.apply(null,arguments),this>a?this:a},max:function(a){return a=bb.apply(null,arguments),a>this?this:a},zone:function(a){var b=this._offset||0;return null==a?this._isUTC?b:this._d.getTimezoneOffset():("string"==typeof a&&(a=G(a)),Math.abs(a)<16&&(a=60*a),this._offset=a,this._isUTC=!0,b!==a&&j(this,bb.duration(b-a,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return"string"==typeof this._i&&this.zone(this._i),this},hasAlignedHourOffset:function(a){return a=a?bb(a).zone():0,0===(this.zone()-a)%60},daysInMonth:function(){return r(this.year(),this.month())},dayOfYear:function(a){var b=eb((bb(this).startOf("day")-bb(this).startOf("year"))/864e5)+1;return null==a?b:this.add("d",a-b)},weekYear:function(a){var b=W(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==a?b:this.add("y",a-b)},isoWeekYear:function(a){var b=W(this,1,4).year;return null==a?b:this.add("y",a-b)},week:function(a){var b=this.lang().week(this);return null==a?b:this.add("d",7*(a-b))},isoWeek:function(a){var b=W(this,1,4).week;return null==a?b:this.add("d",7*(a-b))},weekday:function(a){var b=(this.day()+7-this.lang()._week.dow)%7;return null==a?b:this.add("d",a-b)},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},get:function(a){return a=n(a),this[a]()},set:function(a,b){return a=n(a),"function"==typeof this[a]&&this[a](b),this},lang:function(b){return b===a?this._lang:(this._lang=A(b),this)}}),cb=0;cb<Ib.length;cb++)Z(Ib[cb].toLowerCase().replace(/s$/,""),Ib[cb]);Z("year","FullYear"),bb.fn.days=bb.fn.day,bb.fn.months=bb.fn.month,bb.fn.weeks=bb.fn.week,bb.fn.isoWeeks=bb.fn.isoWeek,bb.fn.toJSON=bb.fn.toISOString,g(bb.duration.fn=f.prototype,{_bubble:function(){var a,b,c,d,e=this._milliseconds,f=this._days,g=this._months,i=this._data;i.milliseconds=e%1e3,a=h(e/1e3),i.seconds=a%60,b=h(a/60),i.minutes=b%60,c=h(b/60),i.hours=c%24,f+=h(c/24),i.days=f%30,g+=h(f/30),i.months=g%12,d=h(g/12),i.years=d},weeks:function(){return h(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+2592e6*(this._months%12)+31536e6*q(this._months/12)},humanize:function(a){var b=+this,c=V(b,!a,this.lang());return a&&(c=this.lang().pastFuture(b,c)),this.lang().postformat(c)},add:function(a,b){var c=bb.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=bb.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=n(a),this[a.toLowerCase()+"s"]()},as:function(a){return a=n(a),this["as"+a.charAt(0).toUpperCase()+a.slice(1)+"s"]()},lang:bb.fn.lang,toIsoString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":""):"P0D"}});for(cb in Jb)Jb.hasOwnProperty(cb)&&(_(cb,Jb[cb]),$(cb.toLowerCase()));_("Weeks",6048e5),bb.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},bb.lang("en",{ordinal:function(a){var b=a%10,c=1===q(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),nb?(module.exports=bb,ab(!0)):"function"==typeof define&&define.amd?define("moment",function(b,c,d){return d.config().noGlobal!==!0&&ab(d.config().noGlobal===a),bb}):ab()}).call(this); |
{ | ||
"name": "moment", | ||
"version": "2.3.1", | ||
"version": "2.4.0", | ||
"description": "Parse, manipulate, and display dates.", | ||
@@ -5,0 +5,0 @@ "homepage": "http://momentjs.com", |
@@ -34,2 +34,22 @@ A lightweight javascript date library for parsing, validating, manipulating, and formatting dates. | ||
### 2.4.0 | ||
* **Deprecate** globally exported moment, will be removed in next major | ||
* New languages | ||
* Farose (fo) [#1206](https://github.com/moment/moment/issues/1206) | ||
* Tagalog/Filipino (tl-ph) [#1197](https://github.com/moment/moment/issues/1197) | ||
* Welsh (cy) [#1214](https://github.com/moment/moment/issues/1214) | ||
* Bugfixes | ||
* properly handle Z at the end of iso RegExp [#1187](https://github.com/moment/moment/issues/1187) | ||
* chinese meridian time improvements [#1076](https://github.com/moment/moment/issues/1076) | ||
* fix language tests [#1177](https://github.com/moment/moment/issues/1177) | ||
* remove some failing tests (that should have never existed :)) | ||
[#1185](https://github.com/moment/moment/issues/#1185) | ||
[#1183](https://github.com/moment/moment/issues/1183) | ||
* handle russian noun cases in weird cases [#1195](https://github.com/moment/moment/issues/1195] | ||
### 2.3.1 | ||
Removed a trailing comma [1169] and fixed a bug with `months`, `weekdays` getters [1171]. | ||
### 2.3.0 [See changelog](https://gist.github.com/ichernev/6864354) | ||
@@ -36,0 +56,0 @@ |
module.exports = function (grunt) { | ||
grunt.registerTask('component', function () { | ||
var config = JSON.parse(grunt.file.read('component.json')); | ||
config.files = grunt.file.expand('lang/*.js'); | ||
@@ -5,0 +6,0 @@ config.files.unshift('moment.js'); |
@@ -345,10 +345,9 @@ // moment.js Moroccan arabic (ar-ma) tests | ||
}, | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
test.equal(require('../../lang/ar-ma'), 'ar-ma', "module should export ar-ma"); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/ar-ma'), 'ar-ma', "module should export ar-ma"); | ||
} | ||
test.done(); | ||
} | ||
}; |
@@ -349,10 +349,9 @@ // moment.js arabic (ar) tests | ||
}, | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
test.equal(require('../../lang/ar'), 'ar', "module should export ar"); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/ar'), 'ar', "module should export ar"); | ||
} | ||
test.done(); | ||
} | ||
}; |
@@ -366,8 +366,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/bg'), 'bg', "module should export bg"); | ||
} | ||
test.equal(require('../../lang/bg'), 'bg', "module should export bg"); | ||
test.done(); | ||
} | ||
}; |
@@ -273,8 +273,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/br'), 'br', "module should export br"); | ||
} | ||
test.equal(require('../../lang/br'), 'br', "module should export br"); | ||
test.done(); | ||
} | ||
}; |
@@ -387,8 +387,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/bs'), 'bs', "module should export bs"); | ||
} | ||
test.equal(require('../../lang/bs'), 'bs', "module should export bs"); | ||
test.done(); | ||
} | ||
}; |
@@ -320,8 +320,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/ca'), 'ca', "module should export ca"); | ||
} | ||
test.equal(require('../../lang/ca'), 'ca', "module should export ca"); | ||
test.done(); | ||
} | ||
}; |
@@ -443,8 +443,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/cs'), 'cs', "module should export cs"); | ||
} | ||
test.equal(require('../../lang/cs'), 'cs', "module should export cs"); | ||
test.done(); | ||
} | ||
}; |
@@ -359,8 +359,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/cv'), 'cv', "module should export cv"); | ||
} | ||
test.equal(require('../../lang/cv'), 'cv', "module should export cv"); | ||
test.done(); | ||
} | ||
}; |
@@ -291,8 +291,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/da'), 'da', "module should export da"); | ||
} | ||
test.equal(require('../../lang/da'), 'da', "module should export da"); | ||
test.done(); | ||
} | ||
}; |
@@ -352,8 +352,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/de'), 'de', "module should export de"); | ||
} | ||
test.equal(require('../../lang/de'), 'de', "module should export de"); | ||
test.done(); | ||
} | ||
}; |
@@ -383,8 +383,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/el'), 'el', "module should export el"); | ||
} | ||
test.equal(require('../../lang/el'), 'el', "module should export el"); | ||
test.done(); | ||
} | ||
}; |
@@ -354,8 +354,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/en-au'), 'en-au', "module should export en-au"); | ||
} | ||
test.equal(require('../../lang/en-au'), 'en-au', "module should export en-au"); | ||
test.done(); | ||
} | ||
}; |
@@ -380,8 +380,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/en-ca'), 'en-ca', "module should export en-ca"); | ||
} | ||
test.equal(require('../../lang/en-ca'), 'en-ca', "module should export en-ca"); | ||
test.done(); | ||
} | ||
}; |
@@ -354,8 +354,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/en-gb'), 'en-gb', "module should export en-gb"); | ||
} | ||
test.equal(require('../../lang/en-gb'), 'en-gb', "module should export en-gb"); | ||
test.done(); | ||
} | ||
}; |
@@ -361,8 +361,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/eo'), 'eo', "module should export eo"); | ||
} | ||
test.equal(require('../../lang/eo'), 'eo', "module should export eo"); | ||
test.done(); | ||
} | ||
}; |
@@ -356,8 +356,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/es'), 'es', "module should export es"); | ||
} | ||
test.equal(require('../../lang/es'), 'es', "module should export es"); | ||
test.done(); | ||
} | ||
}; |
@@ -362,8 +362,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/et'), 'et', "module should export et"); | ||
} | ||
test.equal(require('../../lang/et'), 'et', "module should export et"); | ||
test.done(); | ||
} | ||
}; |
@@ -358,8 +358,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/eu'), 'eu', "module should export eu"); | ||
} | ||
test.equal(require('../../lang/eu'), 'eu', "module should export eu"); | ||
test.done(); | ||
} | ||
}; |
@@ -340,8 +340,8 @@ // moment.js Persian (fa) tests | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/fa'), 'fa', "module should export fa"); | ||
} | ||
test.equal(require('../../lang/fa'), 'fa', "module should export fa"); | ||
test.done(); | ||
} | ||
}; |
@@ -353,8 +353,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/fi'), 'fi', "module should export fi"); | ||
} | ||
test.equal(require('../../lang/fi'), 'fi', "module should export fi"); | ||
test.done(); | ||
} | ||
}; |
@@ -373,8 +373,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/fr-ca'), 'fr-ca', "module should export fr-ca"); | ||
} | ||
test.equal(require('../../lang/fr-ca'), 'fr-ca', "module should export fr-ca"); | ||
test.done(); | ||
} | ||
}; |
@@ -356,8 +356,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/fr'), 'fr', "module should export fr"); | ||
} | ||
test.equal(require('../../lang/fr'), 'fr', "module should export fr"); | ||
test.done(); | ||
} | ||
}; |
@@ -337,8 +337,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/gl'), 'gl', "module should export gl"); | ||
} | ||
test.equal(require('../../lang/gl'), 'gl', "module should export gl"); | ||
test.done(); | ||
} | ||
}; |
@@ -316,8 +316,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/he'), 'he', "module should export he"); | ||
} | ||
test.equal(require('../../lang/he'), 'he', "module should export he"); | ||
test.done(); | ||
} | ||
}; |
@@ -379,8 +379,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/hi'), 'hi', "module should export hi"); | ||
} | ||
test.equal(require('../../lang/hi'), 'hi', "module should export hi"); | ||
test.done(); | ||
} | ||
}; |
@@ -387,8 +387,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/hr'), 'hr', "module should export hr"); | ||
} | ||
test.equal(require('../../lang/hr'), 'hr', "module should export hr"); | ||
test.done(); | ||
} | ||
}; |
@@ -358,8 +358,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/hu'), 'hu', "module should export hu"); | ||
} | ||
test.equal(require('../../lang/hu'), 'hu', "module should export hu"); | ||
test.done(); | ||
} | ||
}; |
@@ -313,8 +313,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/id'), 'id', "module should export id"); | ||
} | ||
test.equal(require('../../lang/id'), 'id', "module should export id"); | ||
test.done(); | ||
} | ||
}; |
@@ -366,5 +366,6 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/is'), 'is', "module should export is"); | ||
test.equal(require('../../lang/is'), 'is', "module should export is"); | ||
} | ||
@@ -371,0 +372,0 @@ test.done(); |
@@ -354,8 +354,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/it'), 'it', "module should export it"); | ||
} | ||
test.equal(require('../../lang/it'), 'it', "module should export it"); | ||
test.done(); | ||
} | ||
}; |
@@ -318,8 +318,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/ja'), 'ja', "module should export ja"); | ||
} | ||
test.equal(require('../../lang/ja'), 'ja', "module should export ja"); | ||
test.done(); | ||
} | ||
}; |
@@ -377,10 +377,10 @@ // moment.js language configuration | ||
}, | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
test.equal(require('../../lang/ka'), 'ka', "module should export ka"); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/ka'), 'ka', "module should export ka"); | ||
} | ||
test.done(); | ||
} | ||
}; |
@@ -365,8 +365,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/ko'), 'ko', "module should export ko"); | ||
} | ||
test.equal(require('../../lang/ko'), 'ko', "module should export ko"); | ||
test.done(); | ||
} | ||
}; |
@@ -364,8 +364,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/lt'), 'lt', "module should export lt"); | ||
} | ||
test.equal(require('../../lang/lt'), 'lt', "module should export lt"); | ||
test.done(); | ||
} | ||
}; |
@@ -357,8 +357,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/lv'), 'lv', "module should export lv"); | ||
} | ||
test.equal(require('../../lang/lv'), 'lv', "module should export lv"); | ||
test.done(); | ||
} | ||
}; |
@@ -379,8 +379,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/ml'), 'ml', "module should export ml"); | ||
} | ||
test.equal(require('../../lang/ml'), 'ml', "module should export ml"); | ||
test.done(); | ||
} | ||
}; |
@@ -379,8 +379,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/mr'), 'mr', "module should export mr"); | ||
} | ||
test.equal(require('../../lang/mr'), 'mr', "module should export mr"); | ||
test.done(); | ||
} | ||
}; |
@@ -379,8 +379,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/ms-my'), 'ms-my', "module should export ms-my"); | ||
} | ||
test.equal(require('../../lang/ms-my'), 'ms-my', "module should export ms-my"); | ||
test.done(); | ||
} | ||
}; |
@@ -358,8 +358,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/nb'), 'nb', "module should export nb"); | ||
} | ||
test.equal(require('../../lang/nb'), 'nb', "module should export nb"); | ||
test.done(); | ||
} | ||
}; |
@@ -377,8 +377,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/ne'), 'ne', "module should export ne"); | ||
} | ||
test.equal(require('../../lang/ne'), 'ne', "module should export ne"); | ||
test.done(); | ||
} | ||
}; |
@@ -368,8 +368,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/nl'), 'nl', "module should export nl"); | ||
} | ||
test.equal(require('../../lang/nl'), 'nl', "module should export nl"); | ||
test.done(); | ||
} | ||
}; |
@@ -357,8 +357,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/nn'), 'nn', "module should export nn"); | ||
} | ||
test.equal(require('../../lang/nn'), 'nn', "module should export nn"); | ||
test.done(); | ||
} | ||
}; |
@@ -376,8 +376,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/pl'), 'pl', "module should export pl"); | ||
} | ||
test.equal(require('../../lang/pl'), 'pl', "module should export pl"); | ||
test.done(); | ||
} | ||
}; |
@@ -359,8 +359,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/pt-br'), 'pt-br', "module should export pt-br"); | ||
} | ||
test.equal(require('../../lang/pt-br'), 'pt-br', "module should export pt-br"); | ||
test.done(); | ||
} | ||
}; |
@@ -349,8 +349,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/pt'), 'pt', "module should export pt"); | ||
} | ||
test.equal(require('../../lang/pt'), 'pt', "module should export pt"); | ||
test.done(); | ||
} | ||
}; |
@@ -358,8 +358,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/ro'), 'ro', "module should export ro"); | ||
} | ||
test.equal(require('../../lang/ro'), 'ro', "module should export ro"); | ||
test.done(); | ||
} | ||
}; |
@@ -173,2 +173,34 @@ var moment = require("../../moment"); | ||
"format month case with escaped symbols" : function (test) { | ||
test.expect(48); | ||
var months = { | ||
'nominative': 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'), | ||
'accusative': 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_') | ||
}, i; | ||
for (i = 0; i < 12; i++) { | ||
test.equal(moment([2013, i, 1]).format('D[] MMMM'), '1 ' + months.accusative[i], '1 ' + months.accusative[i]); | ||
test.equal(moment([2013, i, 1]).format('[<i>]D[</i>] [<b>]MMMM[</b>]'), '<i>1</i> <b>' + months.accusative[i] + '</b>', '1 <b>' + months.accusative[i] + '</b>'); | ||
test.equal(moment([2013, i, 1]).format('D[-й день] MMMM'), '1-й день ' + months.accusative[i], '1-й день ' + months.accusative[i]); | ||
test.equal(moment([2013, i, 1]).format('D, MMMM'), '1, ' + months.nominative[i], '1, ' + months.nominative[i]); | ||
} | ||
test.done(); | ||
}, | ||
"format month short case with escaped symbols" : function (test) { | ||
test.expect(48); | ||
var monthsShort = { | ||
'nominative': 'янв_фев_мар_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'), | ||
'accusative': 'янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек'.split('_') | ||
}, i; | ||
for (i = 0; i < 12; i++) { | ||
test.equal(moment([2013, i, 1]).format('D[] MMM'), '1 ' + monthsShort.accusative[i], '1 ' + monthsShort.accusative[i]); | ||
test.equal(moment([2013, i, 1]).format('[<i>]D[</i>] [<b>]MMM[</b>]'), '<i>1</i> <b>' + monthsShort.accusative[i] + '</b>', '1 <b>' + monthsShort.accusative[i] + '</b>'); | ||
test.equal(moment([2013, i, 1]).format('D[-й день] MMM'), '1-й день ' + monthsShort.accusative[i], '1-й день ' + monthsShort.accusative[i]); | ||
test.equal(moment([2013, i, 1]).format('D, MMM'), '1, ' + monthsShort.nominative[i], '1, ' + monthsShort.nominative[i]); | ||
} | ||
test.done(); | ||
}, | ||
"format week" : function (test) { | ||
@@ -423,8 +455,8 @@ test.expect(7); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/ru'), 'ru', "module should export ru"); | ||
} | ||
test.equal(require('../../lang/ru'), 'ru', "module should export ru"); | ||
test.done(); | ||
} | ||
}; |
@@ -443,8 +443,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/sk'), 'sk', "module should export sk"); | ||
} | ||
test.equal(require('../../lang/sk'), 'sk', "module should export sk"); | ||
test.done(); | ||
} | ||
}; |
@@ -386,8 +386,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/sl'), 'sl', "module should export sl"); | ||
} | ||
test.equal(require('../../lang/sl'), 'sl', "module should export sl"); | ||
test.done(); | ||
} | ||
}; |
@@ -380,8 +380,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/sq'), 'sq', "module should export sq"); | ||
} | ||
test.equal(require('../../lang/sq'), 'sq', "module should export sq"); | ||
test.done(); | ||
} | ||
}; |
@@ -351,8 +351,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/sv'), 'sv', "module should export sv"); | ||
} | ||
test.equal(require('../../lang/sv'), 'sv', "module should export sv"); | ||
test.done(); | ||
} | ||
}; |
@@ -318,8 +318,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/th'), 'th', "module should export th"); | ||
} | ||
test.equal(require('../../lang/th'), 'th', "module should export th"); | ||
test.done(); | ||
} | ||
}; |
@@ -369,8 +369,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/tr'), 'tr', "module should export tr"); | ||
} | ||
test.equal(require('../../lang/tr'), 'tr', "module should export tr"); | ||
test.done(); | ||
} | ||
}; |
@@ -357,8 +357,8 @@ // moment.js Morocco Central Atlas Tamaziɣt in Latin (tzm-la) tests | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/tzm-la'), 'tzm-la', "module should export tzm-la"); | ||
} | ||
test.equal(require('../../lang/tzm-la'), 'tzm-la', "module should export tzm-la"); | ||
test.done(); | ||
} | ||
}; |
@@ -346,8 +346,7 @@ // moment.js Morocco Central Atlas Tamaziɣt (tzm) tests | ||
}, | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
test.equal(require('../../lang/tzm'), 'tzm', "module should export tzm"); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/tzm'), 'tzm', "module should export tzm"); | ||
} | ||
test.done(); | ||
@@ -354,0 +353,0 @@ } |
@@ -388,8 +388,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/uk'), 'uk', "module should export uk"); | ||
} | ||
test.equal(require('../../lang/uk'), 'uk', "module should export uk"); | ||
test.done(); | ||
} | ||
}; |
@@ -355,8 +355,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/uz'), 'uz', "module should export uz"); | ||
} | ||
test.equal(require('../../lang/uz'), 'uz', "module should export uz"); | ||
test.done(); | ||
} | ||
}; |
@@ -381,8 +381,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/vn'), 'vn', "module should export vn"); | ||
} | ||
test.equal(require('../../lang/vn'), 'vn', "module should export vn"); | ||
test.done(); | ||
} | ||
}; |
@@ -53,3 +53,3 @@ var moment = require("../../moment"); | ||
['DDD DDDo DDDD', '45 45日 045'], | ||
['w wo ww', '8 8周 08'], | ||
['w wo ww', '6 6周 06'], | ||
['h hh', '3 03'], | ||
@@ -173,22 +173,35 @@ ['H HH', '15 15'], | ||
test.equal(moment(a).calendar(), "今天早上2点00", "today at the same time"); | ||
test.equal(moment(a).add({ m: 25 }).calendar(), "今天早上2点25", "Now plus 25 min"); | ||
test.equal(moment(a).add({ h: 1 }).calendar(), "今天早上3点00", "Now plus 1 hour"); | ||
test.equal(moment(a).add({ d: 1 }).calendar(), "明天早上2点00", "tomorrow at the same time"); | ||
test.equal(moment(a).subtract({ h: 1 }).calendar(), "今天早上1点00", "Now minus 1 hour"); | ||
test.equal(moment(a).subtract({ d: 1 }).calendar(), "昨天早上2点00", "yesterday at the same time"); | ||
test.equal(moment(a).calendar(), "今天凌晨2点整", "today at the same time"); | ||
test.equal(moment(a).add({ m: 25 }).calendar(), "今天凌晨2点25", "Now plus 25 min"); | ||
test.equal(moment(a).add({ h: 1 }).calendar(), "今天凌晨3点整", "Now plus 1 hour"); | ||
test.equal(moment(a).add({ d: 1 }).calendar(), "明天凌晨2点整", "tomorrow at the same time"); | ||
test.equal(moment(a).subtract({ h: 1 }).calendar(), "今天凌晨1点整", "Now minus 1 hour"); | ||
test.equal(moment(a).subtract({ d: 1 }).calendar(), "昨天凌晨2点整", "yesterday at the same time"); | ||
test.done(); | ||
}, | ||
"calendar current week": function (test) { | ||
var i, m, | ||
today = moment().startOf('day'); | ||
for (i = 0; i < 7; i++) { | ||
m = moment().startOf('week').add({ d: i}); | ||
if (Math.abs(m.diff(today, 'days')) <= 1) { | ||
continue; // skip today, yesterday, tomorrow | ||
} | ||
test.equal(m.calendar(), m.format('[本]ddd凌晨12点整'), "Monday + " + i + " days current time"); | ||
} | ||
test.done(); | ||
}, | ||
"calendar next week" : function (test) { | ||
test.expect(15); | ||
var i, m, | ||
today = moment().startOf('day'); | ||
var i, m; | ||
for (i = 2; i < 7; i++) { | ||
m = moment().add({ d: i }); | ||
test.equal(m.calendar(), m.format('[下]ddddLT'), "Today + " + i + " days current time"); | ||
m.hours(0).minutes(0).seconds(0).milliseconds(0); | ||
test.equal(m.calendar(), m.format('[下]ddddLT'), "Today + " + i + " days beginning of day"); | ||
m.hours(23).minutes(59).seconds(59).milliseconds(999); | ||
test.equal(m.calendar(), m.format('[下]ddddLT'), "Today + " + i + " days end of day"); | ||
for (i = 7; i < 14; i++) { | ||
m = moment().startOf('week').add({ d: i}); | ||
if (Math.abs(m.diff(today, 'days')) >= 7) { | ||
continue; | ||
} | ||
test.equal(m.calendar(), m.format('[下]ddd凌晨12点整'), "Today + " + i + " days beginning of day"); | ||
} | ||
@@ -199,13 +212,11 @@ test.done(); | ||
"calendar last week" : function (test) { | ||
test.expect(15); | ||
var i, m, | ||
today = moment().startOf('day'); | ||
var i, m; | ||
for (i = 2; i < 7; i++) { | ||
m = moment().subtract({ d: i }); | ||
test.equal(m.calendar(), m.format('[上]ddddLT'), "Today - " + i + " days current time"); | ||
m.hours(0).minutes(0).seconds(0).milliseconds(0); | ||
test.equal(m.calendar(), m.format('[上]ddddLT'), "Today - " + i + " days beginning of day"); | ||
m.hours(23).minutes(59).seconds(59).milliseconds(999); | ||
test.equal(m.calendar(), m.format('[上]ddddLT'), "Today - " + i + " days end of day"); | ||
for (i = 1; i < 8; i++) { | ||
m = moment().startOf('week').subtract({ d: i}); | ||
if ((Math.abs(m.diff(today, 'days')) >= 7) || (Math.abs(m.diff(today, 'days')) <= 1)) { | ||
continue; | ||
} | ||
test.equal(m.calendar(), m.format('[上]ddd凌晨12点整'), "Monday - " + i + " days next week"); | ||
} | ||
@@ -233,11 +244,6 @@ test.done(); | ||
"meridiem" : function (test) { | ||
test.expect(10); | ||
test.expect(6); | ||
test.equal(moment([2011, 2, 23, 0, 0]).format('a'), "早上", "morning"); | ||
test.equal(moment([2011, 2, 23, 9, 0]).format('a'), "上午", "before noon"); | ||
test.equal(moment([2011, 2, 23, 12, 0]).format('a'), "中午", "noon"); | ||
test.equal(moment([2011, 2, 23, 13, 0]).format('a'), "下午", "after noon"); | ||
test.equal(moment([2011, 2, 23, 18, 0]).format('a'), "晚上", "night"); | ||
test.equal(moment([2011, 2, 23, 0, 0]).format('A'), "早上", "morning"); | ||
test.equal(moment([2011, 2, 23, 0, 0]).format('A'), "凌晨", "before dawn"); | ||
test.equal(moment([2011, 2, 23, 6, 0]).format('A'), "早上", "morning"); | ||
test.equal(moment([2011, 2, 23, 9, 0]).format('A'), "上午", "before noon"); | ||
@@ -255,9 +261,8 @@ test.equal(moment([2011, 2, 23, 12, 0]).format('A'), "中午", "noon"); | ||
"weeks year starting sunday" : function (test) { | ||
test.expect(5); | ||
test.expect(4); | ||
test.equal(moment([2012, 0, 1]).week(), 1, "Jan 1 2012 should be week 1"); | ||
test.equal(moment([2012, 0, 1]).week(), 52, "Jan 1 2012 should be week 52"); | ||
test.equal(moment([2012, 0, 2]).week(), 1, "Jan 2 2012 should be week 52"); | ||
test.equal(moment([2012, 0, 7]).week(), 1, "Jan 7 2012 should be week 1"); | ||
test.equal(moment([2012, 0, 8]).week(), 2, "Jan 8 2012 should be week 2"); | ||
test.equal(moment([2012, 0, 14]).week(), 2, "Jan 14 2012 should be week 2"); | ||
test.equal(moment([2012, 0, 15]).week(), 3, "Jan 15 2012 should be week 3"); | ||
@@ -270,8 +275,8 @@ test.done(); | ||
test.equal(moment([2006, 11, 31]).week(), 1, "Dec 31 2006 should be week 1"); | ||
test.equal(moment([2006, 11, 31]).week(), 52, "Dec 31 2006 should be week 52"); | ||
test.equal(moment([2007, 0, 1]).week(), 1, "Jan 1 2007 should be week 1"); | ||
test.equal(moment([2007, 0, 6]).week(), 1, "Jan 6 2007 should be week 1"); | ||
test.equal(moment([2007, 0, 7]).week(), 2, "Jan 7 2007 should be week 2"); | ||
test.equal(moment([2007, 0, 7]).week(), 1, "Jan 7 2007 should be week 1"); | ||
test.equal(moment([2007, 0, 13]).week(), 2, "Jan 13 2007 should be week 2"); | ||
test.equal(moment([2007, 0, 14]).week(), 3, "Jan 14 2007 should be week 3"); | ||
test.equal(moment([2007, 0, 14]).week(), 2, "Jan 14 2007 should be week 2"); | ||
@@ -287,5 +292,5 @@ test.done(); | ||
test.equal(moment([2008, 0, 5]).week(), 1, "Jan 5 2008 should be week 1"); | ||
test.equal(moment([2008, 0, 6]).week(), 2, "Jan 6 2008 should be week 2"); | ||
test.equal(moment([2008, 0, 6]).week(), 1, "Jan 6 2008 should be week 1"); | ||
test.equal(moment([2008, 0, 12]).week(), 2, "Jan 12 2008 should be week 2"); | ||
test.equal(moment([2008, 0, 13]).week(), 3, "Jan 13 2008 should be week 3"); | ||
test.equal(moment([2008, 0, 13]).week(), 2, "Jan 13 2008 should be week 2"); | ||
@@ -298,8 +303,8 @@ test.done(); | ||
test.equal(moment([2002, 11, 29]).week(), 1, "Dec 29 2002 should be week 1"); | ||
test.equal(moment([2002, 11, 29]).week(), 52, "Dec 29 2002 should be week 52"); | ||
test.equal(moment([2003, 0, 1]).week(), 1, "Jan 1 2003 should be week 1"); | ||
test.equal(moment([2003, 0, 4]).week(), 1, "Jan 4 2003 should be week 1"); | ||
test.equal(moment([2003, 0, 5]).week(), 2, "Jan 5 2003 should be week 2"); | ||
test.equal(moment([2003, 0, 5]).week(), 1, "Jan 5 2003 should be week 1"); | ||
test.equal(moment([2003, 0, 11]).week(), 2, "Jan 11 2003 should be week 2"); | ||
test.equal(moment([2003, 0, 12]).week(), 3, "Jan 12 2003 should be week 3"); | ||
test.equal(moment([2003, 0, 12]).week(), 2, "Jan 12 2003 should be week 2"); | ||
@@ -310,10 +315,9 @@ test.done(); | ||
"weeks year starting thursday" : function (test) { | ||
test.expect(6); | ||
test.expect(5); | ||
test.equal(moment([2008, 11, 28]).week(), 1, "Dec 28 2008 should be week 1"); | ||
test.equal(moment([2009, 0, 1]).week(), 1, "Jan 1 2009 should be week 1"); | ||
test.equal(moment([2009, 0, 3]).week(), 1, "Jan 3 2009 should be week 1"); | ||
test.equal(moment([2009, 0, 4]).week(), 2, "Jan 4 2009 should be week 2"); | ||
test.equal(moment([2009, 0, 4]).week(), 1, "Jan 4 2009 should be week 1"); | ||
test.equal(moment([2009, 0, 10]).week(), 2, "Jan 10 2009 should be week 2"); | ||
test.equal(moment([2009, 0, 11]).week(), 3, "Jan 11 2009 should be week 3"); | ||
test.equal(moment([2009, 0, 11]).week(), 2, "Jan 11 2009 should be week 2"); | ||
@@ -324,10 +328,6 @@ test.done(); | ||
"weeks year starting friday" : function (test) { | ||
test.expect(6); | ||
test.expect(2); | ||
test.equal(moment([2009, 11, 27]).week(), 1, "Dec 27 2009 should be week 1"); | ||
test.equal(moment([2010, 0, 1]).week(), 1, "Jan 1 2010 should be week 1"); | ||
test.equal(moment([2010, 0, 2]).week(), 1, "Jan 2 2010 should be week 1"); | ||
test.equal(moment([2010, 0, 3]).week(), 2, "Jan 3 2010 should be week 2"); | ||
test.equal(moment([2010, 0, 9]).week(), 2, "Jan 9 2010 should be week 2"); | ||
test.equal(moment([2010, 0, 10]).week(), 3, "Jan 10 2010 should be week 3"); | ||
test.equal(moment([2010, 0, 2]).week(), 53, "Jan 2 2010 should be week 53"); | ||
test.equal(moment([2010, 0, 10]).week(), 1, "Jan 10 2010 should be week 1"); | ||
@@ -338,9 +338,7 @@ test.done(); | ||
"weeks year starting saturday" : function (test) { | ||
test.expect(5); | ||
test.expect(3); | ||
test.equal(moment([2010, 11, 26]).week(), 1, "Dec 26 2010 should be week 1"); | ||
test.equal(moment([2011, 0, 1]).week(), 1, "Jan 1 2011 should be week 1"); | ||
test.equal(moment([2011, 0, 2]).week(), 2, "Jan 2 2011 should be week 2"); | ||
test.equal(moment([2011, 0, 8]).week(), 2, "Jan 8 2011 should be week 2"); | ||
test.equal(moment([2011, 0, 9]).week(), 3, "Jan 9 2011 should be week 3"); | ||
test.equal(moment([2011, 0, 2]).week(), 52, "Jan 2 2011 should be week 52"); | ||
test.equal(moment([2011, 0, 8]).week(), 1, "Jan 8 2011 should be week 1"); | ||
test.equal(moment([2011, 0, 9]).week(), 1, "Jan 9 2011 should be week 1"); | ||
@@ -351,20 +349,18 @@ test.done(); | ||
"weeks year starting sunday format" : function (test) { | ||
test.expect(5); | ||
test.expect(3); | ||
test.equal(moment([2012, 0, 1]).format('w ww wo'), '1 01 1周', "Jan 1 2012 应该是第 1周"); | ||
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52周', "Jan 1 2012 应该是第52周"); | ||
test.equal(moment([2012, 0, 7]).format('w ww wo'), '1 01 1周', "Jan 7 2012 应该是第 1周"); | ||
test.equal(moment([2012, 0, 8]).format('w ww wo'), '2 02 2周', "Jan 8 2012 应该是第 2周"); | ||
test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2周', "Jan 14 2012 应该是第 2周"); | ||
test.equal(moment([2012, 0, 15]).format('w ww wo'), '3 03 3周', "Jan 15 2012 应该是第 3周"); | ||
test.done(); | ||
}, | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
test.equal(require('../../lang/zh-cn'), 'zh-cn', "module should export zh-cn"); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/zh-cn'), 'zh-cn', "module should export zh-cn"); | ||
} | ||
test.done(); | ||
} | ||
}; |
@@ -353,8 +353,8 @@ var moment = require("../../moment"); | ||
"returns the name of the language" : function (test) { | ||
test.expect(1); | ||
if (typeof module !== 'undefined' && module.exports) { | ||
test.equal(require('../../lang/zh-tw'), 'zh-tw', "module should export zh-tw"); | ||
} | ||
test.equal(require('../../lang/zh-tw'), 'zh-tw', "module should export zh-tw"); | ||
test.done(); | ||
} | ||
}; |
@@ -115,6 +115,5 @@ var moment = require("../../moment"); | ||
"string without format" : function (test) { | ||
test.expect(3); | ||
test.expect(2); | ||
test.ok(moment("Aug 9, 1995").toDate() instanceof Date, "Aug 9, 1995"); | ||
test.ok(moment("Mon, 25 Dec 1995 13:30:00 GMT").toDate() instanceof Date, "Mon, 25 Dec 1995 13:30:00 GMT"); | ||
test.equal(new Date(2013, 8, 13, 7, 26).valueOf(), moment("2013-09-13 7:26 am").valueOf(), "2013-09-13 7:26 am"); | ||
test.done(); | ||
@@ -274,2 +273,15 @@ }, | ||
"milliseconds format" : function (test) { | ||
test.expect(5); | ||
test.equal(moment('1', 'S').get('ms'), 100, 'deciseconds'); | ||
// test.equal(moment('10', 'S', true).isValid(), false, 'deciseconds with two digits'); | ||
// test.equal(moment('1', 'SS', true).isValid(), false, 'centiseconds with one digits'); | ||
test.equal(moment('12', 'SS').get('ms'), 120, 'centiseconds'); | ||
// test.equal(moment('123', 'SS', true).isValid(), false, 'centiseconds with three digits'); | ||
test.equal(moment('123', 'SSS').get('ms'), 123, 'milliseconds'); | ||
test.equal(moment('1234', 'SSSS').get('ms'), 123, 'milliseconds with SSSS'); | ||
test.equal(moment('123456789101112', 'SSSS').get('ms'), 123, 'milliseconds with SSSS'); | ||
test.done(); | ||
}, | ||
"string with format no separators" : function (test) { | ||
@@ -491,4 +503,33 @@ moment.lang('en'); | ||
"parsing ISO with Z" : function (test) { | ||
var i, mom, formats = [ | ||
['2011-10-08T18:04Z', '2011-10-08T18:04:00.000'], | ||
['2011-10-08T18:04:20Z', '2011-10-08T18:04:20.000'], | ||
['2011-10-08T18:04:20.1Z', '2011-10-08T18:04:20.100'], | ||
['2011-10-08T18:04:20.11Z', '2011-10-08T18:04:20.110'], | ||
['2011-10-08T18:04:20.111Z', '2011-10-08T18:04:20.111'], | ||
['2011-W40-6T18Z', '2011-10-08T18:00:00.000'], | ||
['2011-W40-6T18:04Z', '2011-10-08T18:04:00.000'], | ||
['2011-W40-6T18:04:20Z', '2011-10-08T18:04:20.000'], | ||
['2011-W40-6T18:04:20.1Z', '2011-10-08T18:04:20.100'], | ||
['2011-W40-6T18:04:20.11Z', '2011-10-08T18:04:20.110'], | ||
['2011-W40-6T18:04:20.111Z', '2011-10-08T18:04:20.111'], | ||
['2011-281T18Z', '2011-10-08T18:00:00.000'], | ||
['2011-281T18:04Z', '2011-10-08T18:04:00.000'], | ||
['2011-281T18:04:20Z', '2011-10-08T18:04:20.000'], | ||
['2011-281T18:04:20Z', '2011-10-08T18:04:20.000'], | ||
['2011-281T18:04:20.1Z', '2011-10-08T18:04:20.100'], | ||
['2011-281T18:04:20.11Z', '2011-10-08T18:04:20.110'], | ||
['2011-281T18:04:20.111Z', '2011-10-08T18:04:20.111'] | ||
]; | ||
for (i = 0; i < formats.length; i++) { | ||
mom = moment(formats[i][0]).utc(); | ||
test.equal(mom.format('YYYY-MM-DDTHH:mm:ss.SSS'), formats[i][1], "moment should be able to parse ISO in UTC " + formats[i][0]); | ||
} | ||
test.done(); | ||
}, | ||
"parsing iso with T" : function (test) { | ||
test.expect(9); | ||
test.expect(8); | ||
@@ -498,3 +539,3 @@ test.equal(moment('2011-10-08T18')._f, "YYYY-MM-DDTHH", "should include 'T' in the format"); | ||
test.equal(moment('2011-10-08T18:20:13')._f, "YYYY-MM-DDTHH:mm:ss", "should include 'T' in the format"); | ||
test.equal(moment('2011-10-08T18:20:13.321')._f, "YYYY-MM-DDTHH:mm:ss.S", "should include 'T' in the format"); | ||
test.equal(moment('2011-10-08T18:20:13.321')._f, "YYYY-MM-DDTHH:mm:ss.SSSS", "should include 'T' in the format"); | ||
@@ -504,6 +545,4 @@ test.equal(moment('2011-10-08 18')._f, "YYYY-MM-DD HH", "should not include 'T' in the format"); | ||
test.equal(moment('2011-10-08 18:20:13')._f, "YYYY-MM-DD HH:mm:ss", "should not include 'T' in the format"); | ||
test.equal(moment('2011-10-08 18:20:13.321')._f, "YYYY-MM-DD HH:mm:ss.S", "should not include 'T' in the format"); | ||
test.equal(moment('2011-10-08 18:20:13.321')._f, "YYYY-MM-DD HH:mm:ss.SSSS", "should not include 'T' in the format"); | ||
test.ok(moment("2013-04-23 15:23:47 UTC").isValid(), "including a trailing UTC in the input should work"); | ||
test.done(); | ||
@@ -510,0 +549,0 @@ }, |
@@ -317,10 +317,13 @@ var moment = require("../../moment"); | ||
moment.lang('en'); | ||
var zones = [60, -60, 90, -90, 360, -360, 720, -720], | ||
b = moment().utc().startOf('day').subtract({ m : 1 }), | ||
c = moment().local().startOf('day').subtract({ m : 1 }); | ||
c = moment().local().startOf('day').subtract({ m : 1 }), | ||
i, z, a; | ||
zones.forEach(function (z) { | ||
var a = moment().zone(z).startOf('day').subtract({ m: 1 }); | ||
for (i = 0; i < zones.length; ++i) { | ||
z = zones[i]; | ||
a = moment().zone(z).startOf('day').subtract({ m: 1 }); | ||
test.equal(moment(a).zone(z).calendar(), "Yesterday at 11:59 PM", "Yesterday at 11:59 PM, not Today, or the wrong time"); | ||
}); | ||
} | ||
@@ -327,0 +330,0 @@ test.equal(moment(b).utc().calendar(), "Yesterday at 11:59 PM", "Yesterday at 11:59 PM, not Today, or the wrong time"); |
@@ -131,5 +131,5 @@ var moment = require("../../moment"); | ||
var tests = [ | ||
'2010-00-00+00:00', | ||
'2010-01-00+00:00', | ||
'2010-01-40+00:00', | ||
'2010-00-00T+00:00', | ||
'2010-01-00T+00:00', | ||
'2010-01-40T+00:00', | ||
'2010-01-40T24+00:00', | ||
@@ -136,0 +136,0 @@ '2010-01-40T23:60+00:00', |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2455347
179
43700
300