Socket
Socket
Sign inDemoInstall

moment

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moment - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

lang/es.js

115

build.js
var fs = require('fs'),
uglify = require('uglify-js'),
jshint = require('jshint'),
gzip = require('gzip');
gzip = require('gzip'),
jade = require('jade'),
clean = require('clean-css');

@@ -39,7 +41,10 @@

};
var LANG_MINIFY = "fr it pt".split(" ");
var LANG_TEST = "en fr it pt".split(" ");
var LANG_PREFIX = "var moment;if (typeof window === 'undefined') {moment = require('../moment.js');module = QUnit.module;}";
var VERSION = '1.1.0';
var LANG_MINIFY = "fr it pt es nl".split(" ");
var LANG_TEST = "en fr it pt es nl".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 MINIFY_COMMENT = '/* Moment.js | version : ' + VERSION + ' | author : Tim Wood | license : MIT */\n';
var MINSIZE = 0;
var SRCSIZE = 0;

@@ -57,3 +62,3 @@

*/
function makeFile(filename, contents) {
function makeFile(filename, contents, callback) {
fs.writeFile(filename, contents, 'utf8', function(err) {

@@ -64,2 +69,5 @@ console.log('saved : ' + filename);

});
if (callback) {
callback();
}
});

@@ -78,3 +86,3 @@ }

*/
function minifyToFile(source, dest, prefix) {
function minifyToFile(source, dest, prefix, callback) {
var ast,

@@ -88,2 +96,6 @@ ugly;

makeFile('./' + dest + '.min.js', (prefix || '') + ugly);
if (callback) {
callback((prefix || '') + ugly);
}
}

@@ -140,2 +152,3 @@

minifyToFile(allSource, 'lang/all');
minifyToFile(allSource, 'site/js/lang-all');
}

@@ -153,5 +166,8 @@ })();

for (i = 0; i < LANG_TEST.length; i++) {
source += fs.readFileSync('./test/lang/' + LANG_TEST[i] + '.js', 'utf8');
source += fs.readFileSync('./lang/test/' + LANG_TEST[i] + '.js', 'utf8');
}
makeFile('./test/lang.js', source);
source += LANG_SUFFIX;
makeFile('./sitesrc/js/lang-tests.js', source, function(){
makeUnitTests();
});
})();

@@ -168,5 +184,13 @@

if (hint(source, 'moment')) {
minifyToFile(source, 'moment', MINIFY_COMMENT);
minifyToFile(source, 'moment', MINIFY_COMMENT, function(src){
gzip(src, function(err, data) {
MINSIZE = data.length;
makeDocs();
});
});
minifyToFile(source, 'site/js/moment', MINIFY_COMMENT);
}
gzip(source, function(err, data) {
SRCSIZE = source.length;
makeDocs();
console.log('size : ./moment.js ' + source.length + ' b (' + data.length + ' b)');

@@ -178,3 +202,3 @@ });

/*********************************************
Docs
JS
*********************************************/

@@ -184,5 +208,66 @@

(function(){
var snippet = fs.readFileSync('./docs/snippet.js', 'utf8');
var docs = fs.readFileSync('./docs/docs.js', 'utf8');
minifyToFile(snippet + docs, 'docs/docs');
})();
var snippet = fs.readFileSync('./sitesrc/js/snippet.js', 'utf8');
var docs = fs.readFileSync('./sitesrc/js/docs.js', 'utf8');
minifyToFile(snippet + docs, 'site/js/docs');
})();
(function(){
var moment = fs.readFileSync('./moment.js', 'utf8');
var fr = fs.readFileSync('./lang/fr.js', 'utf8');
var snippet = fs.readFileSync('./sitesrc/js/snippet.js', 'utf8');
var home = fs.readFileSync('./sitesrc/js/home.js', 'utf8');
minifyToFile(moment + fr + snippet + home, 'site/js/home');
})();
function makeUnitTests(){
var q = fs.readFileSync('./sitesrc/js/qunit.js', 'utf8');
var u = fs.readFileSync('./sitesrc/js/unit-tests.js', 'utf8');
var l = fs.readFileSync('./sitesrc/js/lang-tests.js', 'utf8');
minifyToFile(q + u + l, 'site/js/test');
}
/*********************************************
Jade
*********************************************/
function toKb(input){
var num = Math.round(input / 100) / 10;
return num + 'kb';
}
function jadeToHtml(jadePath, htmlPath) {
var args = {
version : VERSION,
minsize : toKb(MINSIZE),
srcsize : toKb(SRCSIZE)
};
var snippet = fs.readFile(jadePath, 'utf8', function(err, data){
var compile = jade.compile(data, {
filename : 'sitesrc/html.jade'
});
makeFile(htmlPath, compile(args));
});
}
function makeDocs() {
if (SRCSIZE === 0 || MINSIZE === 0) {
return;
}
jadeToHtml('./sitesrc/home.jade', './site/index.html');
jadeToHtml('./sitesrc/docs.jade', './site/docs/index.html');
jadeToHtml('./sitesrc/test.jade', './site/test/index.html');
}
/*********************************************
CSS
*********************************************/
(function(){
fs.readFile('./sitesrc/css/style.css', 'utf8', function(err, data){
makeFile('./site/css/style.css', clean.process(data));
});
})();

2

lang/all.min.js

@@ -1,1 +0,1 @@

(function(){var a={months:"Janvier_Février_Mars_Avril_Mai_Juin_Juillet_Aout_Septembre_Octobre_Novembre_Décembre".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Juin_Juil_Aou_Sep_Oct_Nov_Dec".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%100/10)===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:"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 lang = {
months : "Janvier_Février_Mars_Avril_Mai_Juin_Juillet_Aout_Septembre_Octobre_Novembre_Décembre".split("_"),
monthsShort : "Jan_Fev_Mar_Avr_Mai_Juin_Juil_Aou_Sep_Oct_Nov_Dec".split("_"),
weekdays : "Dimanche_Lundi_Mardi_Mercredi_Jeudi_Vendredi_Samedi".split("_"),
weekdaysShort : "Dim_Lun_Mar_Mer_Jeu_Ven_Sam".split("_"),
// based on this article on writing dates in french:
// http://www.btb.gc.ca/btb.php?lang=fra&cont=868
longDateFormat : {
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"
LLLL : "dddd D MMMM YYYY HH:mm"
},

@@ -31,3 +29,3 @@ relativeTime : {

ordinal : function (number) {
return (~~ (number % 100 / 10) === 1) ? 'er' : 'ème';
return number === 1 ? 'er' : 'ème';
}

@@ -34,0 +32,0 @@ };

@@ -1,1 +0,1 @@

(function(){var a={months:"Janvier_Février_Mars_Avril_Mai_Juin_Juillet_Aout_Septembre_Octobre_Novembre_Décembre".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Juin_Juil_Aou_Sep_Oct_Nov_Dec".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%100/10)===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:"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)})()

@@ -6,3 +6,3 @@ // Moment.js

//
// Version 1.1.0
// Version 1.1.1

@@ -17,3 +17,3 @@ (function (Date, undefined) {

i,
VERSION = "1.1.0",
VERSION = "1.1.1",
shortcuts = 'Month|Date|Hours|Minutes|Seconds'.split('|');

@@ -144,3 +144,3 @@

case 'YY' :
return currentYear % 100;
return leftZeroFill(currentYear % 100, 2);
case 'YYYY' :

@@ -195,5 +195,6 @@ return currentYear;

var inArray = [0],
charactersToPutInArray = /[0-9a-zA-Z]+/g,
inputParts = string.match(charactersToPutInArray),
formatParts = format.match(charactersToPutInArray),
tokenCharacters = /(\\)?(MM?|DD?D?D?|YYYY|YY|a|A|hh?|HH?|mm?|ss?)/g,
inputCharacters = /(\\)?([0-9]+|am|pm)/gi,
inputParts = string.match(inputCharacters),
formatParts = format.match(tokenCharacters),
i,

@@ -286,4 +287,4 @@ isPm;

var output,
charactersToPutInArray = /[0-9a-zA-Z]+/g,
inputParts = string.match(charactersToPutInArray),
inputCharacters = /(\\)?([0-9]+|am|pm)/gi,
inputParts = string.match(inputCharacters),
scores = [],

@@ -296,3 +297,3 @@ scoreToBeat = 99,

curDate = makeDateFromStringAndFormat(string, formats[i]);
curScore = compareArrays(inputParts, formatDate(curDate, formats[i]).match(charactersToPutInArray));
curScore = compareArrays(inputParts, formatDate(curDate, formats[i]).match(inputCharacters));
if (curScore < scoreToBeat) {

@@ -422,3 +423,3 @@ scoreToBeat = curScore;

native : function () {
'native' : function () {
return this._d;

@@ -467,3 +468,3 @@ },

output = relativeTime(difference);
return withoutSuffix ? output : (difference < 0 ? rel.past : rel.future).replace(/%s/i, output);
return withoutSuffix ? output : (difference <= 0 ? rel.past : rel.future).replace(/%s/i, output);
},

@@ -470,0 +471,0 @@

@@ -1,2 +0,2 @@

/* Moment.js | version : 1.1.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;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 g%100;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 i(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":h=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=/[0-9a-zA-Z]+/g,e=a.match(d),f=b.match(d),g,h;for(g=0;g<f.length;g++)i(f[g],e[g]);return h&&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-9a-zA-Z]+/g,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.0",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.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)
{
"name": "moment",
"version": "1.1.0",
"version": "1.1.1",
"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",

@@ -7,3 +7,3 @@ var testrunner = require('qunit');

code: "./moment.js",
tests: ["./test/date.js", "./test/lang.js"]
tests: "./site/js/test.min.js"
});

@@ -13,3 +13,3 @@

code: "./moment.min.js",
tests: ["./test/date.js", "./test/lang.js"]
tests: "./site/js/test.min.js"
});

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc