Comparing version 1.1.1 to 1.2.0
21
build.js
@@ -6,3 +6,4 @@ var fs = require('fs'), | ||
jade = require('jade'), | ||
clean = require('clean-css'); | ||
clean = require('clean-css'), | ||
moment = require('./moment'); | ||
@@ -42,10 +43,11 @@ | ||
}; | ||
var LANG_MINIFY = "fr it pt es nl".split(" "); | ||
var LANG_TEST = "en fr it pt es nl".split(" "); | ||
var LANG_MINIFY = "de en-gb es fr it kr nb nl pl pt ru sv".split(" "); | ||
var LANG_TEST = "de en en-gb es fr it kr nb nl pl pt ru sv".split(" "); | ||
var LANG_PREFIX = "(function() { var moment; if (typeof window === 'undefined') { moment = require('../../moment'); module = QUnit.module; } else { moment = window.moment; }"; | ||
var LANG_SUFFIX = "})();"; | ||
var VERSION = '1.1.1'; | ||
var VERSION = '1.2.0'; | ||
var MINIFY_COMMENT = '/* Moment.js | version : ' + VERSION + ' | author : Tim Wood | license : MIT */\n'; | ||
var MINSIZE = 0; | ||
var SRCSIZE = 0; | ||
var BUILD_DATE = moment().format('YYMMDD_HHmmss'); | ||
@@ -140,4 +142,4 @@ | ||
source = fs.readFileSync('./lang/' + LANG_MINIFY[i] + '.js', 'utf8'); | ||
if (hint(source, 'lang/' + LANG_MINIFY[i])) { | ||
minifyToFile(source, 'lang/' + LANG_MINIFY[i]); | ||
if (hint(source, 'lang/min/' + LANG_MINIFY[i])) { | ||
minifyToFile(source, 'lang/min/' + LANG_MINIFY[i]); | ||
allSource += source; | ||
@@ -149,3 +151,3 @@ } else { | ||
if (failures === 0) { | ||
minifyToFile(allSource, 'lang/all'); | ||
minifyToFile(allSource, 'lang/min/all'); | ||
minifyToFile(allSource, 'site/js/lang-all'); | ||
@@ -220,3 +222,3 @@ } | ||
var l = fs.readFileSync('./sitesrc/js/lang-tests.js', 'utf8'); | ||
minifyToFile(q + u + l, 'site/js/test'); | ||
makeFile('site/js/test.min.js', q + u + l); | ||
} | ||
@@ -239,3 +241,4 @@ | ||
minsize : toKb(MINSIZE), | ||
srcsize : toKb(SRCSIZE) | ||
srcsize : toKb(SRCSIZE), | ||
builddate : BUILD_DATE | ||
}; | ||
@@ -242,0 +245,0 @@ var snippet = fs.readFile(jadePath, 'utf8', function(err, data){ |
@@ -13,2 +13,8 @@ (function () { | ||
}, | ||
meridiem : { | ||
AM : 'AM', | ||
am : 'am', | ||
PM : 'PM', | ||
pm : 'pm' | ||
}, | ||
relativeTime : { | ||
@@ -15,0 +21,0 @@ future : "en %s", |
@@ -13,2 +13,8 @@ (function () { | ||
}, | ||
meridiem : { | ||
AM : 'AM', | ||
am : 'am', | ||
PM : 'PM', | ||
pm : 'pm' | ||
}, | ||
relativeTime : { | ||
@@ -15,0 +21,0 @@ future : "dans %s", |
@@ -7,3 +7,2 @@ (function () { | ||
weekdaysShort : "Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"), | ||
// copied from french, needs revision from italian speakers | ||
longDateFormat : { | ||
@@ -15,2 +14,8 @@ L : "DD/MM/YYYY", | ||
}, | ||
meridiem : { | ||
AM : 'AM', | ||
am : 'am', | ||
PM : 'PM', | ||
pm : 'pm' | ||
}, | ||
relativeTime : { | ||
@@ -17,0 +22,0 @@ future : "in %s", |
@@ -9,6 +9,12 @@ (function () { | ||
L : "DD-MM-YYYY", | ||
LL : "MMMM D YYYY", | ||
LLL : "MMMM D YYYY HH:mm", | ||
LLLL : "dddd, D MMMM YYYY HH:mm" | ||
LL : "D MMMM YYYY", | ||
LLL : "D MMMM YYYY HH:mm", | ||
LLLL : "dddd D MMMM YYYY HH:mm" | ||
}, | ||
meridiem : { | ||
AM : 'AM', | ||
am : 'am', | ||
PM : 'PM', | ||
pm : 'pm' | ||
}, | ||
relativeTime : { | ||
@@ -18,6 +24,6 @@ future : "over %s", | ||
s : "een paar seconden", | ||
m : "één minuutje", | ||
m : "één minuut", | ||
mm : "%d minuten", | ||
h : "één uur", | ||
hh : "%d uren", | ||
hh : "%d uur", | ||
d : "één dag", | ||
@@ -28,3 +34,3 @@ dd : "%d dagen", | ||
y : "één jaar", | ||
yy : "%d jaren" | ||
yy : "%d jaar" | ||
}, | ||
@@ -31,0 +37,0 @@ ordinal : function (number) { |
(function () { | ||
var lang = { | ||
months : "Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"), | ||
monthsShort : "Jan_Feb_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"), | ||
monthsShort : "Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"), | ||
weekdays : "Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"), | ||
@@ -13,2 +13,8 @@ weekdaysShort : "Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"), | ||
}, | ||
meridiem : { | ||
AM : 'AM', | ||
am : 'am', | ||
PM : 'PM', | ||
pm : 'pm' | ||
}, | ||
relativeTime : { | ||
@@ -15,0 +21,0 @@ future : "em %s", |
@@ -37,13 +37,2 @@ | ||
test("format YY", 1, function() { | ||
var b = moment(new Date(2009, 1, 14, 15, 25, 50, 125)); | ||
equal(b.format('YY'), '09', 'YY ---> 09'); | ||
}); | ||
test("format timezone", 2, function() { | ||
var b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)); | ||
ok(b.format('z').match(/^[A-Z]{3,4}$/), 'z ---> Something like "PST"'); | ||
ok(b.format('zz').match(/^[A-Z]{3,4}$/), 'zz ---> Something like "PST"'); | ||
}); | ||
test("format ordinal", 31, function() { | ||
@@ -50,0 +39,0 @@ moment.lang('en'); |
@@ -37,13 +37,2 @@ | ||
test("format YY", 1, function() { | ||
var b = moment(new Date(2009, 1, 14, 15, 25, 50, 125)); | ||
equal(b.format('YY'), '09', 'YY ---> 09'); | ||
}); | ||
test("format timezone", 2, function() { | ||
var b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)); | ||
ok(b.format('z').match(/^[A-Z]{3,4}$/), 'z ---> Something like "PST"'); | ||
ok(b.format('zz').match(/^[A-Z]{3,4}$/), 'zz ---> Something like "PST"'); | ||
}); | ||
test("format ordinal", 31, function() { | ||
@@ -50,0 +39,0 @@ moment.lang('es'); |
@@ -37,13 +37,2 @@ | ||
test("format YY", 1, function() { | ||
var b = moment(new Date(2009, 1, 14, 15, 25, 50, 125)); | ||
equal(b.format('YY'), '09', 'YY ---> 09'); | ||
}); | ||
test("format timezone", 2, function() { | ||
var b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)); | ||
ok(b.format('z').match(/^[A-Z]{3,4}$/), 'z ---> Something like "PST"'); | ||
ok(b.format('zz').match(/^[A-Z]{3,4}$/), 'zz ---> Something like "PST"'); | ||
}); | ||
test("format ordinal", 31, function() { | ||
@@ -50,0 +39,0 @@ moment.lang('fr'); |
@@ -37,13 +37,2 @@ | ||
test("format YY", 1, function() { | ||
var b = moment(new Date(2009, 1, 14, 15, 25, 50, 125)); | ||
equal(b.format('YY'), '09', 'YY ---> 09'); | ||
}); | ||
test("format timezone", 2, function() { | ||
var b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)); | ||
ok(b.format('z').match(/^[A-Z]{3,4}$/), 'z ---> Something like "PST"'); | ||
ok(b.format('zz').match(/^[A-Z]{3,4}$/), 'zz ---> Something like "PST"'); | ||
}); | ||
test("format ordinal", 31, function() { | ||
@@ -50,0 +39,0 @@ moment.lang('it'); |
@@ -26,5 +26,5 @@ | ||
['L', '14-02-2010'], | ||
['LL', 'februari 14 2010'], | ||
['LLL', 'februari 14 2010 15:25'], | ||
['LLLL', 'zondag, 14 februari 2010 15:25'] | ||
['LL', '14 februari 2010'], | ||
['LLL', '14 februari 2010 15:25'], | ||
['LLLL', 'zondag 14 februari 2010 15:25'] | ||
], | ||
@@ -38,13 +38,2 @@ b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)), | ||
test("format YY", 1, function() { | ||
var b = moment(new Date(2009, 1, 14, 15, 25, 50, 125)); | ||
equal(b.format('YY'), '09', 'YY ---> 09'); | ||
}); | ||
test("format timezone", 2, function() { | ||
var b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)); | ||
ok(b.format('z').match(/^[A-Z]{3,4}$/), 'z ---> Something like "PST"'); | ||
ok(b.format('zz').match(/^[A-Z]{3,4}$/), 'zz ---> Something like "PST"'); | ||
}); | ||
test("format ordinal", 31, function() { | ||
@@ -110,4 +99,4 @@ moment.lang('nl'); | ||
equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "een paar seconden", "44 seconds = a few seconds"); | ||
equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "één minuutje", "45 seconds = a minute"); | ||
equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "één minuutje", "89 seconds = a minute"); | ||
equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "één minuut", "45 seconds = a minute"); | ||
equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "één minuut", "89 seconds = a minute"); | ||
equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuten", "90 seconds = 2 minutes"); | ||
@@ -117,5 +106,5 @@ equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuten", "44 minutes = 44 minutes"); | ||
equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "één uur", "89 minutes = an hour"); | ||
equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 uren", "90 minutes = 2 hours"); | ||
equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 uren", "5 hours = 5 hours"); | ||
equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 uren", "21 hours = 21 hours"); | ||
equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 uur", "90 minutes = 2 hours"); | ||
equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 uur", "5 hours = 5 hours"); | ||
equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 uur", "21 hours = 21 hours"); | ||
equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "één dag", "22 hours = a day"); | ||
@@ -138,5 +127,5 @@ equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "één dag", "35 hours = a day"); | ||
equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "één jaar", "547 days = a year"); | ||
equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 jaren", "548 days = 2 years"); | ||
equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 jaar", "548 days = 2 years"); | ||
equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "één jaar", "1 year = a year"); | ||
equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 jaren", "5 years = 5 years"); | ||
equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 jaar", "5 years = 5 years"); | ||
}); | ||
@@ -143,0 +132,0 @@ |
@@ -13,3 +13,3 @@ | ||
['ddd, hA', 'Dom, 3PM'], | ||
['M Mo MM MMMM MMM', '2 2º 02 Fevereiro Feb'], | ||
['M Mo MM MMMM MMM', '2 2º 02 Fevereiro Fev'], | ||
['YYYY YY', '2010 10'], | ||
@@ -38,13 +38,2 @@ ['D Do DD', '14 14º 14'], | ||
test("format YY", 1, function() { | ||
var b = moment(new Date(2009, 1, 14, 15, 25, 50, 125)); | ||
equal(b.format('YY'), '09', 'YY ---> 09'); | ||
}); | ||
test("format timezone", 2, function() { | ||
var b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)); | ||
ok(b.format('z').match(/^[A-Z]{3,4}$/), 'z ---> Something like "PST"'); | ||
ok(b.format('zz').match(/^[A-Z]{3,4}$/), 'zz ---> Something like "PST"'); | ||
}); | ||
test("format ordinal", 31, function() { | ||
@@ -90,3 +79,3 @@ moment.lang('pt'); | ||
moment.lang('pt'); | ||
var expected = 'Janeiro Jan_Fevereiro Feb_Março Mar_Abril Abr_Maio Mai_Junho Jun_Julho Jul_Agosto Ago_Setembro Set_Outubro Out_Novembro Nov_Dezembro Dez'.split("_"); | ||
var expected = 'Janeiro Jan_Fevereiro Fev_Março Mar_Abril Abr_Maio Mai_Junho Jun_Julho Jul_Agosto Ago_Setembro Set_Outubro Out_Novembro Nov_Dezembro Dez'.split("_"); | ||
var i; | ||
@@ -93,0 +82,0 @@ for (i = 0; i < expected.length; i++) { |
158
moment.js
@@ -6,3 +6,3 @@ // Moment.js | ||
// | ||
// Version 1.1.1 | ||
// Version 1.2.0 | ||
@@ -15,5 +15,5 @@ (function (Date, undefined) { | ||
hasModule = (typeof module !== 'undefined'), | ||
paramsToParse = 'months|monthsShort|weekdays|weekdaysShort|longDateFormat|relativeTime|ordinal'.split('|'), | ||
paramsToParse = 'months|monthsShort|weekdays|weekdaysShort|longDateFormat|relativeTime|ordinal|meridiem'.split('|'), | ||
i, | ||
VERSION = "1.1.1", | ||
VERSION = "1.2.0", | ||
shortcuts = 'Month|Date|Hours|Minutes|Seconds'.split('|'); | ||
@@ -35,3 +35,3 @@ | ||
input = isString ? {} : _input, | ||
ms, M, currentDate; | ||
ms, d, M, currentDate; | ||
if (isString && val) { | ||
@@ -43,5 +43,5 @@ input[_input] = val; | ||
(input.m || input.minutes || 0) * 6e4 + // 1000 * 60 | ||
(input.h || input.hours || 0) * 36e5 + // 1000 * 60 * 60 | ||
(input.d || input.days || 0) * 864e5 + // 1000 * 60 * 60 * 24 | ||
(input.w || input.weeks || 0) * 6048e5; // 1000 * 60 * 60 * 24 * 7 | ||
(input.h || input.hours || 0) * 36e5; // 1000 * 60 * 60 | ||
d = (input.d || input.days || 0) + | ||
(input.w || input.weeks || 0) * 7; | ||
M = (input.M || input.months || 0) + | ||
@@ -52,2 +52,5 @@ (input.y || input.years || 0) * 12; | ||
} | ||
if (d) { | ||
date.setDate(date.getDate() + d * adding); | ||
} | ||
if (M) { | ||
@@ -84,6 +87,8 @@ currentDate = date.getDate(); | ||
currentSeconds = date.getSeconds(), | ||
charactersToReplace = /(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|zz?|LL?L?L?)/g, | ||
currentZone = date.getTimezoneOffset(), | ||
charactersToReplace = /(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|zz?|ZZ?|LL?L?L?)/g, | ||
nonuppercaseLetters = /[^A-Z]/g, | ||
timezoneRegex = /\([A-Za-z ]+\)|:[0-9]{2} [A-Z]{3} /g, | ||
ordinal = moment.ordinal; | ||
ordinal = moment.ordinal, | ||
meridiem = moment.meridiem; | ||
// check if the character is a format | ||
@@ -153,5 +158,5 @@ // return formatted string or non string. | ||
case 'a' : | ||
return currentHours > 11 ? 'pm' : 'am'; | ||
return currentHours > 11 ? meridiem.pm : meridiem.am; | ||
case 'A' : | ||
return currentHours > 11 ? 'PM' : 'AM'; | ||
return currentHours > 11 ? meridiem.PM : meridiem.AM; | ||
// 24 HOUR | ||
@@ -182,2 +187,6 @@ case 'H' : | ||
return (date.toString().match(timezoneRegex) || [''])[0].replace(nonuppercaseLetters, ''); | ||
case 'Z' : | ||
return (currentZone > 0 ? '+' : '-') + leftZeroFill(~~(currentZone / 60), 2) + ':' + leftZeroFill(~~(currentZone % 60), 2); | ||
case 'ZZ' : | ||
return (currentZone > 0 ? '+' : '-') + leftZeroFill(~~(10 * currentZone / 6), 4); | ||
// LONG DATES | ||
@@ -199,5 +208,9 @@ case 'L' : | ||
function makeDateFromStringAndFormat(string, format) { | ||
var inArray = [0], | ||
tokenCharacters = /(\\)?(MM?|DD?D?D?|YYYY|YY|a|A|hh?|HH?|mm?|ss?)/g, | ||
inputCharacters = /(\\)?([0-9]+|am|pm)/gi, | ||
var inArray = [0, 0, 1, 0, 0, 0, 0], | ||
timezoneHours = 0, | ||
timezoneMinutes = 0, | ||
isUsingUTC = false, | ||
tokenCharacters = /(\\)?(MM?|DD?D?D?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|ZZ?)/g, | ||
inputCharacters = /(\\)?([0-9]+|am|pm|([\+\-]\d\d:?\d\d))/gi, | ||
timezoneParseRegex = /([\+\-]|\d\d)/gi, | ||
inputParts = string.match(inputCharacters), | ||
@@ -210,2 +223,3 @@ formatParts = format.match(tokenCharacters), | ||
function addTime(format, input) { | ||
var a; | ||
switch (format) { | ||
@@ -234,3 +248,3 @@ // MONTH | ||
case 'YYYY' : | ||
inArray[0] = ~~input; | ||
inArray[0] = ~~Math.abs(input); | ||
break; | ||
@@ -265,2 +279,20 @@ // AM / PM | ||
break; | ||
// TIMEZONE | ||
case 'Z' : | ||
// fall through to ZZ | ||
case 'ZZ' : | ||
isUsingUTC = true; | ||
a = input.match(timezoneParseRegex); | ||
if (a[1]) { | ||
timezoneHours = ~~a[1]; | ||
} | ||
if (a[2]) { | ||
timezoneMinutes = ~~a[2]; | ||
} | ||
// reverse offsets | ||
if (a[0] === '-') { | ||
timezoneHours = -timezoneHours; | ||
timezoneMinutes = -timezoneMinutes; | ||
} | ||
break; | ||
} | ||
@@ -275,3 +307,11 @@ } | ||
} | ||
return dateFromArray(inArray); | ||
// if is 12 am, change hours to 0 | ||
if (! isPm && inArray[3] === 12) { | ||
inArray[3] = 0; | ||
} | ||
// handle timezone | ||
inArray[3] += timezoneHours; | ||
inArray[4] += timezoneMinutes; | ||
// return | ||
return isUsingUTC ? new Date(Date.UTC.apply({}, inArray)) : dateFromArray(inArray); | ||
} | ||
@@ -296,3 +336,3 @@ | ||
var output, | ||
inputCharacters = /(\\)?([0-9]+|am|pm)/gi, | ||
inputCharacters = /(\\)?([0-9]+|am|pm|([\+\-]\d\d:?\d\d))/gi, | ||
inputParts = string.match(inputCharacters), | ||
@@ -321,6 +361,9 @@ scores = [], | ||
moment = function (input, format) { | ||
if (input === null) { | ||
return null; | ||
} | ||
var date; | ||
// parse UnderscoreDate object | ||
if (input && input._d instanceof Date) { | ||
date = input._d; | ||
date = new Date(+input._d); | ||
// parse string and format | ||
@@ -377,2 +420,8 @@ } else if (format) { | ||
}, | ||
meridiem : { | ||
AM : 'AM', | ||
am : 'am', | ||
PM : 'PM', | ||
pm : 'pm' | ||
}, | ||
relativeTime : { | ||
@@ -403,23 +452,27 @@ future : "in %s", | ||
// helper function for _date.from() and _date.fromNow() | ||
function substituteTimeAgo(string, number) { | ||
return moment.relativeTime[string].replace(/%d/i, number || 1); | ||
function substituteTimeAgo(string, number, withoutSuffix) { | ||
var rt = moment.relativeTime[string]; | ||
return (typeof rt === 'function') ? | ||
rt(number || 1, !!withoutSuffix, string) : | ||
rt.replace(/%d/i, number || 1); | ||
} | ||
function relativeTime(milliseconds) { | ||
var seconds = Math.abs(milliseconds) / 1000, | ||
minutes = seconds / 60, | ||
hours = minutes / 60, | ||
days = hours / 24, | ||
years = days / 365; | ||
return seconds < 45 && substituteTimeAgo('s', round(seconds)) || | ||
round(minutes) === 1 && substituteTimeAgo('m') || | ||
minutes < 45 && substituteTimeAgo('mm', round(minutes)) || | ||
round(hours) === 1 && substituteTimeAgo('h') || | ||
hours < 22 && substituteTimeAgo('hh', round(hours)) || | ||
round(days) === 1 && substituteTimeAgo('d') || | ||
days <= 25 && substituteTimeAgo('dd', round(days)) || | ||
days <= 45 && substituteTimeAgo('M') || | ||
days < 345 && substituteTimeAgo('MM', round(days / 30)) || | ||
round(years) === 1 && substituteTimeAgo('y') || | ||
substituteTimeAgo('yy', round(years)); | ||
function relativeTime(milliseconds, withoutSuffix) { | ||
var seconds = round(Math.abs(milliseconds) / 1000), | ||
minutes = round(seconds / 60), | ||
hours = round(minutes / 60), | ||
days = round(hours / 24), | ||
years = round(days / 365), | ||
args = seconds < 45 && ['s', seconds] || | ||
minutes === 1 && ['m'] || | ||
minutes < 45 && ['mm', minutes] || | ||
hours === 1 && ['h'] || | ||
hours < 22 && ['hh', hours] || | ||
days === 1 && ['d'] || | ||
days <= 25 && ['dd', days] || | ||
days <= 45 && ['M'] || | ||
days < 345 && ['MM', round(days / 30)] || | ||
years === 1 && ['y'] || ['yy', years]; | ||
args[2] = withoutSuffix; | ||
return substituteTimeAgo.apply({}, args); | ||
} | ||
@@ -430,2 +483,6 @@ | ||
clone : function () { | ||
return moment(this); | ||
}, | ||
valueOf : function () { | ||
@@ -439,2 +496,10 @@ return +this._d; | ||
toString : function () { | ||
return this._d.toString(); | ||
}, | ||
toDate : function () { | ||
return this._d; | ||
}, | ||
format : function (inputString) { | ||
@@ -454,3 +519,3 @@ return formatDate(this._d, inputString); | ||
diff : function (input, val, float) { | ||
diff : function (input, val, asFloat) { | ||
var inputMoment = moment(input), | ||
@@ -474,3 +539,3 @@ diff = this._d - inputMoment._d, | ||
} | ||
return float ? output : round(output); | ||
return asFloat ? output : round(output); | ||
}, | ||
@@ -481,3 +546,3 @@ | ||
rel = moment.relativeTime, | ||
output = relativeTime(difference); | ||
output = relativeTime(difference, withoutSuffix); | ||
return withoutSuffix ? output : (difference <= 0 ? rel.past : rel.future).replace(/%s/i, output); | ||
@@ -491,4 +556,8 @@ }, | ||
isLeapYear : function () { | ||
var year = this._d.getFullYear(); | ||
var year = this.year(); | ||
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; | ||
}, | ||
isDST : function () { | ||
return this.zone() !== moment([this.year()]).zone(); | ||
} | ||
@@ -509,3 +578,3 @@ }; | ||
// loop through and add shortcuts | ||
// loop through and add shortcuts (Month, Date, Hours, Minutes, Seconds) | ||
for (i = 0; i < shortcuts.length; i ++) { | ||
@@ -523,2 +592,7 @@ makeShortcut(shortcuts[i].toLowerCase(), shortcuts[i]); | ||
// add shortcut for timezone offset (no setter) | ||
moment.fn.zone = function () { | ||
return this._d.getTimezoneOffset(); | ||
}; | ||
// CommonJS module is defined | ||
@@ -525,0 +599,0 @@ if (hasModule) { |
@@ -1,2 +0,2 @@ | ||
/* Moment.js | version : 1.1.1 | author : Tim Wood | license : MIT */ | ||
(function(a,b){function k(a,b){var c=a+"";while(c.length<b)c="0"+c;return c}function l(b,c,d,e){var f=typeof c=="string",g=f?{}:c,h,i,j;return f&&e&&(g[c]=e),h=(g.ms||g.milliseconds||0)+(g.s||g.seconds||0)*1e3+(g.m||g.minutes||0)*6e4+(g.h||g.hours||0)*36e5+(g.d||g.days||0)*864e5+(g.w||g.weeks||0)*6048e5,i=(g.M||g.months||0)+(g.y||g.years||0)*12,h&&b.setTime(+b+h*d),i&&(j=b.getDate(),b.setDate(1),b.setMonth(b.getMonth()+i*d),b.setDate(Math.min((new a(b.getFullYear(),b.getMonth()+1,0)).getDate(),j))),b}function m(a){return Object.prototype.toString.call(a)==="[object Array]"}function n(b){return new a(b[0],b[1]||0,b[2]||1,b[3]||0,b[4]||0,b[5]||0,b[6]||0)}function o(b,d){function r(d){var m,s;switch(d){case"M":return e+1;case"Mo":return e+1+q(e+1);case"MM":return k(e+1,2);case"MMM":return c.monthsShort[e];case"MMMM":return c.months[e];case"D":return f;case"Do":return f+q(f);case"DD":return k(f,2);case"DDD":return m=new a(g,e,f),s=new a(g,0,1),~~((m-s)/864e5+1.5);case"DDDo":return m=r("DDD"),m+q(m);case"DDDD":return k(r("DDD"),3);case"d":return h;case"do":return h+q(h);case"ddd":return c.weekdaysShort[h];case"dddd":return c.weekdays[h];case"w":return m=new a(g,e,f-h+5),s=new a(m.getFullYear(),0,4),~~((m-s)/864e5/7+1.5);case"wo":return m=r("w"),m+q(m);case"ww":return k(r("w"),2);case"YY":return k(g%100,2);case"YYYY":return g;case"a":return i>11?"pm":"am";case"A":return i>11?"PM":"AM";case"H":return i;case"HH":return k(i,2);case"h":return i%12||12;case"hh":return k(i%12||12,2);case"m":return j;case"mm":return k(j,2);case"s":return l;case"ss":return k(l,2);case"zz":case"z":return(b.toString().match(p)||[""])[0].replace(n,"");case"L":case"LL":case"LLL":case"LLLL":return o(b,c.longDateFormat[d]);default:return d.replace("\\","")}}var e=b.getMonth(),f=b.getDate(),g=b.getFullYear(),h=b.getDay(),i=b.getHours(),j=b.getMinutes(),l=b.getSeconds(),m=/(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|zz?|LL?L?L?)/g,n=/[^A-Z]/g,p=/\([A-Za-z ]+\)|:[0-9]{2} [A-Z]{3} /g,q=c.ordinal;return d.replace(m,r)}function p(a,b){function j(a,b){switch(a){case"M":case"MM":c[1]=~~b-1;break;case"D":case"DD":case"DDD":case"DDDD":c[2]=~~b;break;case"YY":b=~~b,c[0]=b+(b>70?1900:2e3);break;case"YYYY":c[0]=~~b;break;case"a":case"A":i=b.toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":c[3]=~~b;break;case"m":case"mm":c[4]=~~b;break;case"s":case"ss":c[5]=~~b}}var c=[0],d=/(\\)?(MM?|DD?D?D?|YYYY|YY|a|A|hh?|HH?|mm?|ss?)/g,e=/(\\)?([0-9]+|am|pm)/gi,f=a.match(e),g=b.match(d),h,i;for(h=0;h<g.length;h++)j(g[h],f[h]);return i&&c[3]<12&&(c[3]+=12),n(c)}function q(a,b){var c=Math.min(a.length,b.length),d=Math.abs(a.length-b.length),e=0,f;for(f=0;f<c;f++)~~a[f]!==~~b[f]&&e++;return e+d}function r(a,b){var c,d=/(\\)?([0-9]+|am|pm)/gi,e=a.match(d),f=[],g=99,h,i,j;for(h=0;h<b.length;h++)i=p(a,b[h]),j=q(e,o(i,b[h]).match(d)),j<g&&(g=j,c=i);return c}function s(a){this._d=a}function t(a,b){return c.relativeTime[a].replace(/%d/i,b||1)}function u(a){var b=Math.abs(a)/1e3,c=b/60,e=c/60,f=e/24,g=f/365;return b<45&&t("s",d(b))||d(c)===1&&t("m")||c<45&&t("mm",d(c))||d(e)===1&&t("h")||e<22&&t("hh",d(e))||d(f)===1&&t("d")||f<=25&&t("dd",d(f))||f<=45&&t("M")||f<345&&t("MM",d(f/30))||d(g)===1&&t("y")||t("yy",d(g))}function v(a,b){c.fn[a]=function(a){return a!=null?(this._d["set"+b](a),this):this._d["get"+b]()}}var c,d=Math.round,e={},f=typeof module!="undefined",g="months|monthsShort|weekdays|weekdaysShort|longDateFormat|relativeTime|ordinal".split("|"),h,i="1.1.1",j="Month|Date|Hours|Minutes|Seconds".split("|");c=function(c,d){var e;return c&&c._d instanceof a?e=c._d:d?m(d)?e=r(c,d):e=p(c,d):e=c===b?new a:c instanceof a?c:m(c)?n(c):new a(c),new s(e)},c.version=i,c.lang=function(a,b){var d,h,i;b&&(e[a]=b);if(e[a])for(d=0;d<g.length;d++)h=g[d],c[h]=e[a][h]||c[h];else f&&(i=require("./lang/"+a),c.lang(a,i))},c.lang("en",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),longDateFormat:{L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY h:mm A",LLLL:"dddd, MMMM D YYYY h:mm A"},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"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}}),c.fn=s.prototype={valueOf:function(){return+this._d},"native":function(){return this._d},format:function(a){return o(this._d,a)},add:function(a,b){return this._d=l(this._d,a,1,b),this},subtract:function(a,b){return this._d=l(this._d,a,-1,b),this},diff:function(a,b,e){var f=c(a),g=this._d-f._d,h=this.year()-f.year(),i=this.month()-f.month(),j=this.day()-f.day(),k;return b==="months"?k=h*12+i+j/30:b==="years"?k=h+i/12:k=b==="seconds"?g/1e3:b==="minutes"?g/6e4:b==="hours"?g/36e5:b==="days"?g/864e5:b==="weeks"?g/6048e5:b==="days"?g/3600:g,e?k:d(k)},from:function(a,b){var d=this.diff(a),e=c.relativeTime,f=u(d);return b?f:(d<=0?e.past:e.future).replace(/%s/i,f)},fromNow:function(a){return this.from(c(),a)},isLeapYear:function(){var a=this._d.getFullYear();return a%4===0&&a%100!==0||a%400===0}};for(h=0;h<j.length;h++)v(j[h].toLowerCase(),j[h]);v("year","FullYear"),c.fn.day=function(){return this._d.getDay()},f&&(module.exports=c),typeof window!="undefined"&&(window.moment=c)})(Date) | ||
/* Moment.js | version : 1.2.0 | author : Tim Wood | license : MIT */ | ||
(function(a,b){function k(a,b){var c=a+"";while(c.length<b)c="0"+c;return c}function l(b,c,d,e){var f=typeof c=="string",g=f?{}:c,h,i,j,k;return f&&e&&(g[c]=e),h=(g.ms||g.milliseconds||0)+(g.s||g.seconds||0)*1e3+(g.m||g.minutes||0)*6e4+(g.h||g.hours||0)*36e5,i=(g.d||g.days||0)+(g.w||g.weeks||0)*7,j=(g.M||g.months||0)+(g.y||g.years||0)*12,h&&b.setTime(+b+h*d),i&&b.setDate(b.getDate()+i*d),j&&(k=b.getDate(),b.setDate(1),b.setMonth(b.getMonth()+j*d),b.setDate(Math.min((new a(b.getFullYear(),b.getMonth()+1,0)).getDate(),k))),b}function m(a){return Object.prototype.toString.call(a)==="[object Array]"}function n(b){return new a(b[0],b[1]||0,b[2]||1,b[3]||0,b[4]||0,b[5]||0,b[6]||0)}function o(b,d){function t(d){var n,u;switch(d){case"M":return e+1;case"Mo":return e+1+r(e+1);case"MM":return k(e+1,2);case"MMM":return c.monthsShort[e];case"MMMM":return c.months[e];case"D":return f;case"Do":return f+r(f);case"DD":return k(f,2);case"DDD":return n=new a(g,e,f),u=new a(g,0,1),~~((n-u)/864e5+1.5);case"DDDo":return n=t("DDD"),n+r(n);case"DDDD":return k(t("DDD"),3);case"d":return h;case"do":return h+r(h);case"ddd":return c.weekdaysShort[h];case"dddd":return c.weekdays[h];case"w":return n=new a(g,e,f-h+5),u=new a(n.getFullYear(),0,4),~~((n-u)/864e5/7+1.5);case"wo":return n=t("w"),n+r(n);case"ww":return k(t("w"),2);case"YY":return k(g%100,2);case"YYYY":return g;case"a":return i>11?s.pm:s.am;case"A":return i>11?s.PM:s.AM;case"H":return i;case"HH":return k(i,2);case"h":return i%12||12;case"hh":return k(i%12||12,2);case"m":return j;case"mm":return k(j,2);case"s":return l;case"ss":return k(l,2);case"zz":case"z":return(b.toString().match(q)||[""])[0].replace(p,"");case"Z":return(m>0?"+":"-")+k(~~(m/60),2)+":"+k(~~(m%60),2);case"ZZ":return(m>0?"+":"-")+k(~~(10*m/6),4);case"L":case"LL":case"LLL":case"LLLL":return o(b,c.longDateFormat[d]);default:return d.replace("\\","")}}var e=b.getMonth(),f=b.getDate(),g=b.getFullYear(),h=b.getDay(),i=b.getHours(),j=b.getMinutes(),l=b.getSeconds(),m=b.getTimezoneOffset(),n=/(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|zz?|ZZ?|LL?L?L?)/g,p=/[^A-Z]/g,q=/\([A-Za-z ]+\)|:[0-9]{2} [A-Z]{3} /g,r=c.ordinal,s=c.meridiem;return d.replace(n,t)}function p(b,c){function p(a,b){var c;switch(a){case"M":case"MM":d[1]=~~b-1;break;case"D":case"DD":case"DDD":case"DDDD":d[2]=~~b;break;case"YY":b=~~b,d[0]=b+(b>70?1900:2e3);break;case"YYYY":d[0]=~~Math.abs(b);break;case"a":case"A":o=b.toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":d[3]=~~b;break;case"m":case"mm":d[4]=~~b;break;case"s":case"ss":d[5]=~~b;break;case"Z":case"ZZ":g=!0,c=b.match(j),c[1]&&(e=~~c[1]),c[2]&&(f=~~c[2]),c[0]==="-"&&(e=-e,f=-f)}}var d=[0,0,1,0,0,0,0],e=0,f=0,g=!1,h=/(\\)?(MM?|DD?D?D?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|ZZ?)/g,i=/(\\)?([0-9]+|am|pm|([\+\-]\d\d:?\d\d))/gi,j=/([\+\-]|\d\d)/gi,k=b.match(i),l=c.match(h),m,o;for(m=0;m<l.length;m++)p(l[m],k[m]);return o&&d[3]<12&&(d[3]+=12),!o&&d[3]===12&&(d[3]=0),d[3]+=e,d[4]+=f,g?new a(a.UTC.apply({},d)):n(d)}function q(a,b){var c=Math.min(a.length,b.length),d=Math.abs(a.length-b.length),e=0,f;for(f=0;f<c;f++)~~a[f]!==~~b[f]&&e++;return e+d}function r(a,b){var c,d=/(\\)?([0-9]+|am|pm|([\+\-]\d\d:?\d\d))/gi,e=a.match(d),f=[],g=99,h,i,j;for(h=0;h<b.length;h++)i=p(a,b[h]),j=q(e,o(i,b[h]).match(d)),j<g&&(g=j,c=i);return c}function s(a){this._d=a}function t(a,b,d){var e=c.relativeTime[a];return typeof e=="function"?e(b||1,!!d,a):e.replace(/%d/i,b||1)}function u(a,b){var c=d(Math.abs(a)/1e3),e=d(c/60),f=d(e/60),g=d(f/24),h=d(g/365),i=c<45&&["s",c]||e===1&&["m"]||e<45&&["mm",e]||f===1&&["h"]||f<22&&["hh",f]||g===1&&["d"]||g<=25&&["dd",g]||g<=45&&["M"]||g<345&&["MM",d(g/30)]||h===1&&["y"]||["yy",h];return i[2]=b,t.apply({},i)}function v(a,b){c.fn[a]=function(a){return a!=null?(this._d["set"+b](a),this):this._d["get"+b]()}}var c,d=Math.round,e={},f=typeof module!="undefined",g="months|monthsShort|weekdays|weekdaysShort|longDateFormat|relativeTime|ordinal|meridiem".split("|"),h,i="1.2.0",j="Month|Date|Hours|Minutes|Seconds".split("|");c=function(c,d){if(c===null)return null;var e;return c&&c._d instanceof a?e=new a(+c._d):d?m(d)?e=r(c,d):e=p(c,d):e=c===b?new a:c instanceof a?c:m(c)?n(c):new a(c),new s(e)},c.version=i,c.lang=function(a,b){var d,h,i;b&&(e[a]=b);if(e[a])for(d=0;d<g.length;d++)h=g[d],c[h]=e[a][h]||c[h];else f&&(i=require("./lang/"+a),c.lang(a,i))},c.lang("en",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),longDateFormat:{L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY h:mm A",LLLL:"dddd, MMMM D YYYY h:mm A"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},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"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}}),c.fn=s.prototype={clone:function(){return c(this)},valueOf:function(){return+this._d},"native":function(){return this._d},toString:function(){return this._d.toString()},toDate:function(){return this._d},format:function(a){return o(this._d,a)},add:function(a,b){return this._d=l(this._d,a,1,b),this},subtract:function(a,b){return this._d=l(this._d,a,-1,b),this},diff:function(a,b,e){var f=c(a),g=this._d-f._d,h=this.year()-f.year(),i=this.month()-f.month(),j=this.day()-f.day(),k;return b==="months"?k=h*12+i+j/30:b==="years"?k=h+i/12:k=b==="seconds"?g/1e3:b==="minutes"?g/6e4:b==="hours"?g/36e5:b==="days"?g/864e5:b==="weeks"?g/6048e5:b==="days"?g/3600:g,e?k:d(k)},from:function(a,b){var d=this.diff(a),e=c.relativeTime,f=u(d,b);return b?f:(d<=0?e.past:e.future).replace(/%s/i,f)},fromNow:function(a){return this.from(c(),a)},isLeapYear:function(){var a=this.year();return a%4===0&&a%100!==0||a%400===0},isDST:function(){return this.zone()!==c([this.year()]).zone()}};for(h=0;h<j.length;h++)v(j[h].toLowerCase(),j[h]);v("year","FullYear"),c.fn.day=function(){return this._d.getDay()},c.fn.zone=function(){return this._d.getTimezoneOffset()},f&&(module.exports=c),typeof window!="undefined"&&(window.moment=c)})(Date) |
{ | ||
"name": "moment", | ||
"version": "1.1.1", | ||
"version": "1.2.0", | ||
"description": "Moment.js is a javascript date library that helps create, manipulate, and format dates without extending the `Date` prototype.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/timrwood/moment", |
@@ -1,1 +0,1 @@ | ||
(function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),longDateFormat:{L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)})(),function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),longDateFormat:{L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"in %s",past:"%s fa",s:"secondi",m:"un minuto",mm:"%d minuti",h:"un ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)}(),function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Feb_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),longDateFormat:{L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY HH:mm",LLLL:"dddd, D \\de MMMM \\de YYYY HH:mm"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)}(),function(){var a={months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:"Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),longDateFormat:{L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)}(),function(){var a={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._mei._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),longDateFormat:{L:"DD-MM-YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuutje",mm:"%d minuten",h:"één uur",hh:"%d uren",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaren"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",a)}() | ||
(function(){var a={months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Apr._Mai_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),longDateFormat:{L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm U\\hr",LLLL:"dddd, D. MMMM YYYY HH:mm U\\hr"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",m:"einer Minute",mm:"%d Minuten",h:"einer Stunde",hh:"%d Stunden",d:"einem Tag",dd:"%d Tagen",M:"einem Monat",MM:"%d Monaten",y:"einem Jahr",yy:"%d Jahren"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("de",a)})(),function(){var a={months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),longDateFormat:{L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},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"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)}(),function(){var a={months:"Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre".split("_"),monthsShort:"Ene._Feb._Mar._Abr._May._Jun._Jul._Ago._Sep._Oct._Nov._Dic.".split("_"),weekdays:"Domingo_Lunes_Martes_Miércoles_Jueves_Viernes_Sábado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mié._Jue._Vie._Sáb.".split("_"),longDateFormat:{L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)}(),function(){var a={months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),longDateFormat:{L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"une année",yy:"%d années"},ordinal:function(a){return a===1?"er":"ème"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)}(),function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settebre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Lunedi_Martedi_Mercoledi_Giovedi_Venerdi_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),longDateFormat:{L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},relativeTime:{future:"in %s",past:"%s fa",s:"secondi",m:"un minuto",mm:"%d minuti",h:"un ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},ordinal:function(){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)}(),function(){var a={months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),longDateFormat:{L:"YYYY.MM.DD",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h시 mm분",LLLL:"YYYY년 MMMM D일 dddd A h시 mm분"},meridiem:{AM:"오전",am:"오전",PM:"오후",pm:"오후"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇초",ss:"%d초",m:"일분",mm:"%d분",h:"한시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한달",MM:"%d달",y:"일년",yy:"%d년"},ordinal:function(a){return"일"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("kr",a)}(),function(){var a={months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),longDateFormat:{L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},relativeTime:{future:"om %s",past:"for %s siden",s:"noen sekunder",m:"ett minutt",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dager",M:"en måned",MM:"%d måneder",y:"ett år",yy:"%d år"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nb",a)}(),function(){var a={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._mei._jun._jul._aug._sep._okt._nov._dec.".split("_"),weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),longDateFormat:{L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",a)}(),function(){var a=function(a){return a%10<5&&a%10>1&&~~(a/10)!==1},b=function(b,c,d){var e=b+" ";switch(d){case"m":return c?"minuta":"minutę";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzinę";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesiące":"miesięcy");case"yy":return e+(a(b)?"lata":"lat")}},c={months:"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"nie_pon_wt_śr_czw_pt_sb".split("_"),longDateFormat:{L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:b,mm:b,h:b,hh:b,d:"1 dzień",dd:"%d dni",M:"miesiąc",MM:b,y:"rok",yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pl",c)}(),function(){var a={months:"Janeiro_Fevereiro_Março_Abril_Maio_Junho_Julho_Agosto_Setembro_Outubro_Novembro_Dezembro".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),longDateFormat:{L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY HH:mm",LLLL:"dddd, D \\de MMMM \\de YYYY HH:mm"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},relativeTime:{future:"em %s",past:"%s atrás",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"º"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)}(),function(){var a={months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),weekdaysShort:"вск_пнд_втр_срд_чтв_птн_суб".split("_"),longDateFormat:{L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",m:"минут",mm:"%d минут",h:"часа",hh:"%d часов",d:"1 день",dd:"%d дней",M:"месяц",MM:"%d месяцев",y:"год",yy:"%d лет"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ru",a)}(),function(){var a={months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),longDateFormat:{L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},relativeTime:{future:"om %s",past:"för %s sen",s:"några sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"e":b===1?"a":b===2?"a":b===3?"e":"e"}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("sv",a)}() |
@@ -1,2 +0,2 @@ | ||
/* Moment.js | version : 1.1.1 | author : Tim Wood | license : MIT */ | ||
(function(a,b){function k(a,b){var c=a+"";while(c.length<b)c="0"+c;return c}function l(b,c,d,e){var f=typeof c=="string",g=f?{}:c,h,i,j;return f&&e&&(g[c]=e),h=(g.ms||g.milliseconds||0)+(g.s||g.seconds||0)*1e3+(g.m||g.minutes||0)*6e4+(g.h||g.hours||0)*36e5+(g.d||g.days||0)*864e5+(g.w||g.weeks||0)*6048e5,i=(g.M||g.months||0)+(g.y||g.years||0)*12,h&&b.setTime(+b+h*d),i&&(j=b.getDate(),b.setDate(1),b.setMonth(b.getMonth()+i*d),b.setDate(Math.min((new a(b.getFullYear(),b.getMonth()+1,0)).getDate(),j))),b}function m(a){return Object.prototype.toString.call(a)==="[object Array]"}function n(b){return new a(b[0],b[1]||0,b[2]||1,b[3]||0,b[4]||0,b[5]||0,b[6]||0)}function o(b,d){function r(d){var m,s;switch(d){case"M":return e+1;case"Mo":return e+1+q(e+1);case"MM":return k(e+1,2);case"MMM":return c.monthsShort[e];case"MMMM":return c.months[e];case"D":return f;case"Do":return f+q(f);case"DD":return k(f,2);case"DDD":return m=new a(g,e,f),s=new a(g,0,1),~~((m-s)/864e5+1.5);case"DDDo":return m=r("DDD"),m+q(m);case"DDDD":return k(r("DDD"),3);case"d":return h;case"do":return h+q(h);case"ddd":return c.weekdaysShort[h];case"dddd":return c.weekdays[h];case"w":return m=new a(g,e,f-h+5),s=new a(m.getFullYear(),0,4),~~((m-s)/864e5/7+1.5);case"wo":return m=r("w"),m+q(m);case"ww":return k(r("w"),2);case"YY":return k(g%100,2);case"YYYY":return g;case"a":return i>11?"pm":"am";case"A":return i>11?"PM":"AM";case"H":return i;case"HH":return k(i,2);case"h":return i%12||12;case"hh":return k(i%12||12,2);case"m":return j;case"mm":return k(j,2);case"s":return l;case"ss":return k(l,2);case"zz":case"z":return(b.toString().match(p)||[""])[0].replace(n,"");case"L":case"LL":case"LLL":case"LLLL":return o(b,c.longDateFormat[d]);default:return d.replace("\\","")}}var e=b.getMonth(),f=b.getDate(),g=b.getFullYear(),h=b.getDay(),i=b.getHours(),j=b.getMinutes(),l=b.getSeconds(),m=/(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|zz?|LL?L?L?)/g,n=/[^A-Z]/g,p=/\([A-Za-z ]+\)|:[0-9]{2} [A-Z]{3} /g,q=c.ordinal;return d.replace(m,r)}function p(a,b){function j(a,b){switch(a){case"M":case"MM":c[1]=~~b-1;break;case"D":case"DD":case"DDD":case"DDDD":c[2]=~~b;break;case"YY":b=~~b,c[0]=b+(b>70?1900:2e3);break;case"YYYY":c[0]=~~b;break;case"a":case"A":i=b.toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":c[3]=~~b;break;case"m":case"mm":c[4]=~~b;break;case"s":case"ss":c[5]=~~b}}var c=[0],d=/(\\)?(MM?|DD?D?D?|YYYY|YY|a|A|hh?|HH?|mm?|ss?)/g,e=/(\\)?([0-9]+|am|pm)/gi,f=a.match(e),g=b.match(d),h,i;for(h=0;h<g.length;h++)j(g[h],f[h]);return i&&c[3]<12&&(c[3]+=12),n(c)}function q(a,b){var c=Math.min(a.length,b.length),d=Math.abs(a.length-b.length),e=0,f;for(f=0;f<c;f++)~~a[f]!==~~b[f]&&e++;return e+d}function r(a,b){var c,d=/(\\)?([0-9]+|am|pm)/gi,e=a.match(d),f=[],g=99,h,i,j;for(h=0;h<b.length;h++)i=p(a,b[h]),j=q(e,o(i,b[h]).match(d)),j<g&&(g=j,c=i);return c}function s(a){this._d=a}function t(a,b){return c.relativeTime[a].replace(/%d/i,b||1)}function u(a){var b=Math.abs(a)/1e3,c=b/60,e=c/60,f=e/24,g=f/365;return b<45&&t("s",d(b))||d(c)===1&&t("m")||c<45&&t("mm",d(c))||d(e)===1&&t("h")||e<22&&t("hh",d(e))||d(f)===1&&t("d")||f<=25&&t("dd",d(f))||f<=45&&t("M")||f<345&&t("MM",d(f/30))||d(g)===1&&t("y")||t("yy",d(g))}function v(a,b){c.fn[a]=function(a){return a!=null?(this._d["set"+b](a),this):this._d["get"+b]()}}var c,d=Math.round,e={},f=typeof module!="undefined",g="months|monthsShort|weekdays|weekdaysShort|longDateFormat|relativeTime|ordinal".split("|"),h,i="1.1.1",j="Month|Date|Hours|Minutes|Seconds".split("|");c=function(c,d){var e;return c&&c._d instanceof a?e=c._d:d?m(d)?e=r(c,d):e=p(c,d):e=c===b?new a:c instanceof a?c:m(c)?n(c):new a(c),new s(e)},c.version=i,c.lang=function(a,b){var d,h,i;b&&(e[a]=b);if(e[a])for(d=0;d<g.length;d++)h=g[d],c[h]=e[a][h]||c[h];else f&&(i=require("./lang/"+a),c.lang(a,i))},c.lang("en",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),longDateFormat:{L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY h:mm A",LLLL:"dddd, MMMM D YYYY h:mm A"},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"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}}),c.fn=s.prototype={valueOf:function(){return+this._d},"native":function(){return this._d},format:function(a){return o(this._d,a)},add:function(a,b){return this._d=l(this._d,a,1,b),this},subtract:function(a,b){return this._d=l(this._d,a,-1,b),this},diff:function(a,b,e){var f=c(a),g=this._d-f._d,h=this.year()-f.year(),i=this.month()-f.month(),j=this.day()-f.day(),k;return b==="months"?k=h*12+i+j/30:b==="years"?k=h+i/12:k=b==="seconds"?g/1e3:b==="minutes"?g/6e4:b==="hours"?g/36e5:b==="days"?g/864e5:b==="weeks"?g/6048e5:b==="days"?g/3600:g,e?k:d(k)},from:function(a,b){var d=this.diff(a),e=c.relativeTime,f=u(d);return b?f:(d<=0?e.past:e.future).replace(/%s/i,f)},fromNow:function(a){return this.from(c(),a)},isLeapYear:function(){var a=this._d.getFullYear();return a%4===0&&a%100!==0||a%400===0}};for(h=0;h<j.length;h++)v(j[h].toLowerCase(),j[h]);v("year","FullYear"),c.fn.day=function(){return this._d.getDay()},f&&(module.exports=c),typeof window!="undefined"&&(window.moment=c)})(Date) | ||
/* Moment.js | version : 1.2.0 | author : Tim Wood | license : MIT */ | ||
(function(a,b){function k(a,b){var c=a+"";while(c.length<b)c="0"+c;return c}function l(b,c,d,e){var f=typeof c=="string",g=f?{}:c,h,i,j,k;return f&&e&&(g[c]=e),h=(g.ms||g.milliseconds||0)+(g.s||g.seconds||0)*1e3+(g.m||g.minutes||0)*6e4+(g.h||g.hours||0)*36e5,i=(g.d||g.days||0)+(g.w||g.weeks||0)*7,j=(g.M||g.months||0)+(g.y||g.years||0)*12,h&&b.setTime(+b+h*d),i&&b.setDate(b.getDate()+i*d),j&&(k=b.getDate(),b.setDate(1),b.setMonth(b.getMonth()+j*d),b.setDate(Math.min((new a(b.getFullYear(),b.getMonth()+1,0)).getDate(),k))),b}function m(a){return Object.prototype.toString.call(a)==="[object Array]"}function n(b){return new a(b[0],b[1]||0,b[2]||1,b[3]||0,b[4]||0,b[5]||0,b[6]||0)}function o(b,d){function t(d){var n,u;switch(d){case"M":return e+1;case"Mo":return e+1+r(e+1);case"MM":return k(e+1,2);case"MMM":return c.monthsShort[e];case"MMMM":return c.months[e];case"D":return f;case"Do":return f+r(f);case"DD":return k(f,2);case"DDD":return n=new a(g,e,f),u=new a(g,0,1),~~((n-u)/864e5+1.5);case"DDDo":return n=t("DDD"),n+r(n);case"DDDD":return k(t("DDD"),3);case"d":return h;case"do":return h+r(h);case"ddd":return c.weekdaysShort[h];case"dddd":return c.weekdays[h];case"w":return n=new a(g,e,f-h+5),u=new a(n.getFullYear(),0,4),~~((n-u)/864e5/7+1.5);case"wo":return n=t("w"),n+r(n);case"ww":return k(t("w"),2);case"YY":return k(g%100,2);case"YYYY":return g;case"a":return i>11?s.pm:s.am;case"A":return i>11?s.PM:s.AM;case"H":return i;case"HH":return k(i,2);case"h":return i%12||12;case"hh":return k(i%12||12,2);case"m":return j;case"mm":return k(j,2);case"s":return l;case"ss":return k(l,2);case"zz":case"z":return(b.toString().match(q)||[""])[0].replace(p,"");case"Z":return(m>0?"+":"-")+k(~~(m/60),2)+":"+k(~~(m%60),2);case"ZZ":return(m>0?"+":"-")+k(~~(10*m/6),4);case"L":case"LL":case"LLL":case"LLLL":return o(b,c.longDateFormat[d]);default:return d.replace("\\","")}}var e=b.getMonth(),f=b.getDate(),g=b.getFullYear(),h=b.getDay(),i=b.getHours(),j=b.getMinutes(),l=b.getSeconds(),m=b.getTimezoneOffset(),n=/(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|dddd?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|zz?|ZZ?|LL?L?L?)/g,p=/[^A-Z]/g,q=/\([A-Za-z ]+\)|:[0-9]{2} [A-Z]{3} /g,r=c.ordinal,s=c.meridiem;return d.replace(n,t)}function p(b,c){function p(a,b){var c;switch(a){case"M":case"MM":d[1]=~~b-1;break;case"D":case"DD":case"DDD":case"DDDD":d[2]=~~b;break;case"YY":b=~~b,d[0]=b+(b>70?1900:2e3);break;case"YYYY":d[0]=~~Math.abs(b);break;case"a":case"A":o=b.toLowerCase()==="pm";break;case"H":case"HH":case"h":case"hh":d[3]=~~b;break;case"m":case"mm":d[4]=~~b;break;case"s":case"ss":d[5]=~~b;break;case"Z":case"ZZ":g=!0,c=b.match(j),c[1]&&(e=~~c[1]),c[2]&&(f=~~c[2]),c[0]==="-"&&(e=-e,f=-f)}}var d=[0,0,1,0,0,0,0],e=0,f=0,g=!1,h=/(\\)?(MM?|DD?D?D?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|ZZ?)/g,i=/(\\)?([0-9]+|am|pm|([\+\-]\d\d:?\d\d))/gi,j=/([\+\-]|\d\d)/gi,k=b.match(i),l=c.match(h),m,o;for(m=0;m<l.length;m++)p(l[m],k[m]);return o&&d[3]<12&&(d[3]+=12),!o&&d[3]===12&&(d[3]=0),d[3]+=e,d[4]+=f,g?new a(a.UTC.apply({},d)):n(d)}function q(a,b){var c=Math.min(a.length,b.length),d=Math.abs(a.length-b.length),e=0,f;for(f=0;f<c;f++)~~a[f]!==~~b[f]&&e++;return e+d}function r(a,b){var c,d=/(\\)?([0-9]+|am|pm|([\+\-]\d\d:?\d\d))/gi,e=a.match(d),f=[],g=99,h,i,j;for(h=0;h<b.length;h++)i=p(a,b[h]),j=q(e,o(i,b[h]).match(d)),j<g&&(g=j,c=i);return c}function s(a){this._d=a}function t(a,b,d){var e=c.relativeTime[a];return typeof e=="function"?e(b||1,!!d,a):e.replace(/%d/i,b||1)}function u(a,b){var c=d(Math.abs(a)/1e3),e=d(c/60),f=d(e/60),g=d(f/24),h=d(g/365),i=c<45&&["s",c]||e===1&&["m"]||e<45&&["mm",e]||f===1&&["h"]||f<22&&["hh",f]||g===1&&["d"]||g<=25&&["dd",g]||g<=45&&["M"]||g<345&&["MM",d(g/30)]||h===1&&["y"]||["yy",h];return i[2]=b,t.apply({},i)}function v(a,b){c.fn[a]=function(a){return a!=null?(this._d["set"+b](a),this):this._d["get"+b]()}}var c,d=Math.round,e={},f=typeof module!="undefined",g="months|monthsShort|weekdays|weekdaysShort|longDateFormat|relativeTime|ordinal|meridiem".split("|"),h,i="1.2.0",j="Month|Date|Hours|Minutes|Seconds".split("|");c=function(c,d){if(c===null)return null;var e;return c&&c._d instanceof a?e=new a(+c._d):d?m(d)?e=r(c,d):e=p(c,d):e=c===b?new a:c instanceof a?c:m(c)?n(c):new a(c),new s(e)},c.version=i,c.lang=function(a,b){var d,h,i;b&&(e[a]=b);if(e[a])for(d=0;d<g.length;d++)h=g[d],c[h]=e[a][h]||c[h];else f&&(i=require("./lang/"+a),c.lang(a,i))},c.lang("en",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),longDateFormat:{L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY h:mm A",LLLL:"dddd, MMMM D YYYY h:mm A"},meridiem:{AM:"AM",am:"am",PM:"PM",pm:"pm"},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"},ordinal:function(a){var b=a%10;return~~(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th"}}),c.fn=s.prototype={clone:function(){return c(this)},valueOf:function(){return+this._d},"native":function(){return this._d},toString:function(){return this._d.toString()},toDate:function(){return this._d},format:function(a){return o(this._d,a)},add:function(a,b){return this._d=l(this._d,a,1,b),this},subtract:function(a,b){return this._d=l(this._d,a,-1,b),this},diff:function(a,b,e){var f=c(a),g=this._d-f._d,h=this.year()-f.year(),i=this.month()-f.month(),j=this.day()-f.day(),k;return b==="months"?k=h*12+i+j/30:b==="years"?k=h+i/12:k=b==="seconds"?g/1e3:b==="minutes"?g/6e4:b==="hours"?g/36e5:b==="days"?g/864e5:b==="weeks"?g/6048e5:b==="days"?g/3600:g,e?k:d(k)},from:function(a,b){var d=this.diff(a),e=c.relativeTime,f=u(d,b);return b?f:(d<=0?e.past:e.future).replace(/%s/i,f)},fromNow:function(a){return this.from(c(),a)},isLeapYear:function(){var a=this.year();return a%4===0&&a%100!==0||a%400===0},isDST:function(){return this.zone()!==c([this.year()]).zone()}};for(h=0;h<j.length;h++)v(j[h].toLowerCase(),j[h]);v("year","FullYear"),c.fn.day=function(){return this._d.getDay()},c.fn.zone=function(){return this._d.getTimezoneOffset()},f&&(module.exports=c),typeof window!="undefined"&&(window.moment=c)})(Date) |
$("pre.js").snippet("javascript", {style:"typical",showNum:false}); | ||
moment.lang('en'); | ||
$('#js-format-now').html('"' + moment().format('dddd, MMMM Do YYYY, h:mm:ss a') + '"'); | ||
$('#js-from-now').html('"' + moment([2011, 10, 30]).fromNow() + '"'); | ||
$('#js-from-now').html('"' + moment([2011, 9, 31]).fromNow() + '"'); | ||
$('#js-add').html('"' + moment().add('days', 9).format('dddd, MMMM Do YYYY') + '"'); | ||
@@ -6,0 +6,0 @@ moment.lang('fr'); |
@@ -8,6 +8,7 @@ (function() { | ||
var moment; | ||
if (typeof window === 'undefined') { moment = require('../../moment'); | ||
module = QUnit.module; | ||
if (typeof window === 'undefined') { | ||
moment = require('../../moment'); | ||
module = QUnit.module; | ||
} else { | ||
moment = window.moment; | ||
moment = window.moment; | ||
} | ||
@@ -61,3 +62,3 @@ | ||
test("string with format", 13, function() { | ||
test("string with format", 17, function() { | ||
var a = [ | ||
@@ -75,2 +76,6 @@ ['MM-DD-YYYY', '12-02-1999'], | ||
['DD-MM-YYYY h:m:s a', '12-02-1999 2:45:10 pm'], | ||
['h:mm a', '12:00 pm'], | ||
['h:mm a', '12:30 pm'], | ||
['h:mm a', '12:00 am'], | ||
['h:mm a', '12:30 am'], | ||
['YYYY-MM-DDTHH:mm:ss', '2011-11-11T11:11:11'], | ||
@@ -85,2 +90,23 @@ ['MM-DD-YYYY \\M', '12-02-1999 M'] | ||
test("string with format (timezone)", 8, function() { | ||
equal(moment('5 +0700', 'H ZZ').native().getUTCHours(), 12, 'parse hours "5 +0700" ---> "H ZZ"'); | ||
equal(moment('5 +07:00', 'H Z').native().getUTCHours(), 12, 'parse hours "5 +07:00" ---> "H Z"'); | ||
equal(moment('5 +0730', 'H ZZ').native().getUTCMinutes(), 30, 'parse hours "5 +0730" ---> "H ZZ"'); | ||
equal(moment('5 +07:30', 'H Z').native().getUTCMinutes(), 30, 'parse hours "5 +07:30" ---> "H Z"'); | ||
equal(moment('5 -0100', 'H ZZ').native().getUTCHours(), 4, 'parse hours "5 -0100" ---> "H ZZ"'); | ||
equal(moment('5 -01:00', 'H Z').native().getUTCHours(), 4, 'parse hours "5 -01:00" ---> "H Z"'); | ||
equal(moment('5 -0130', 'H ZZ').native().getUTCMinutes(), 30, 'parse hours "5 -0130" ---> "H ZZ"'); | ||
equal(moment('5 -01:30', 'H Z').native().getUTCMinutes(), 30, 'parse hours "5 -01:30" ---> "H Z"'); | ||
}); | ||
test("string with format (timezone offset)", 3, function() { | ||
var a = new Date(Date.UTC(2011, 0, 1, 1)); | ||
var b = moment('2011 1 1 0 +01:00', 'YYYY MM DD HH Z'); | ||
equal(a.getHours(), b.hours(), 'date created with utc == parsed string with timezone offset'); | ||
equal(+a, +b, 'date created with utc == parsed string with timezone offset'); | ||
var c = moment('2011 2 1 10 +05:00', 'YYYY MM DD HH Z'); | ||
var d = moment('2011 2 1 8 +07:00', 'YYYY MM DD HH Z'); | ||
equal(c.hours(), d.hours(), '10 am central time == 8 am pacific time'); | ||
}); | ||
test("string with array of formats", 3, function() { | ||
@@ -97,3 +123,18 @@ equal(moment('13-02-1999', ['MM-DD-YYYY', 'DD-MM-YYYY']).format('MM DD YYYY'), '02 13 1999', 'switching month and day'); | ||
test("implicit cloning", 2, function() { | ||
var momentA = moment([2011, 10, 10]); | ||
var momentB = moment(momentA); | ||
momentA.month(5); | ||
equal(momentB.month(), 10, "Calling moment() on a moment will create a clone"); | ||
equal(momentA.month(), 5, "Calling moment() on a moment will create a clone"); | ||
}); | ||
test("explicit cloning", 2, function() { | ||
var momentA = moment([2011, 10, 10]); | ||
var momentB = momentA.clone(); | ||
momentA.month(5); | ||
equal(momentB.month(), 10, "Calling moment() on a moment will create a clone"); | ||
equal(momentA.month(), 5, "Calling moment() on a moment will create a clone"); | ||
}); | ||
module("add and subtract"); | ||
@@ -186,2 +227,14 @@ | ||
test("adding across DST", 3, function(){ | ||
var a = moment(new Date(2011, 2, 12, 5, 0, 0)); | ||
var b = moment(new Date(2011, 2, 12, 5, 0, 0)); | ||
var c = moment(new Date(2011, 2, 12, 5, 0, 0)); | ||
a.add('days', 1); | ||
b.add('hours', 24); | ||
c.add('months', 1); | ||
equal(a.hours(), 5, 'adding days over DST difference should result in the same hour'); | ||
equal(b.hours(), 6, 'adding hours over DST difference should result in a different hour'); | ||
equal(c.hours(), 5, 'adding months over DST difference should result in the same hour'); | ||
}); | ||
module("diff"); | ||
@@ -300,3 +353,33 @@ | ||
module("format"); | ||
test("format YY", 1, function() { | ||
var b = moment(new Date(2009, 1, 14, 15, 25, 50, 125)); | ||
equal(b.format('YY'), '09', 'YY ---> 09'); | ||
}); | ||
test("format timezone", 4, function() { | ||
var b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)); | ||
ok(b.format('z').match(/^[A-Z]{3,5}$/), b.format('z') + ' ---> Something like "PST"'); | ||
ok(b.format('zz').match(/^[A-Z]{3,5}$/), b.format('zz') + ' ---> Something like "PST"'); | ||
ok(b.format('Z').match(/^[\+\-]\d\d:\d\d$/), b.format('Z') + ' ---> Something like "+07:30"'); | ||
ok(b.format('ZZ').match(/^[\+\-]\d{4}$/), b.format('ZZ') + ' ---> Something like "+0700"'); | ||
}); | ||
test("isDST", 2, function() { | ||
// In the US 2011 March 13 is Daylight Savings Day | ||
var a = moment(new Date(2011, 2, 12, 0, 0, 0)), | ||
b = moment(new Date(2011, 2, 14, 0, 0, 0)); | ||
ok(!a.isDST(), '2011 March 12 is not DST'); | ||
ok(b.isDST(), '2011 March 14 is DST'); | ||
}); | ||
test("zone", 2, function() { | ||
ok(moment().zone() % 30 === 0, 'moment.fn.zone should be a multiple of 30 (was ' + moment().zone() + ')'); | ||
equal(moment().zone(), new Date().getTimezoneOffset(), 'zone should equal getTimezoneOffset'); | ||
}); | ||
})(); | ||
var testrunner = require('qunit'); | ||
testrunner.options.errorsOnly = true; | ||
testrunner.options.coverage = false; | ||
@@ -5,0 +6,0 @@ testrunner.run({ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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 not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
885419
70
10751
3
1
114