can read and display workouts

This commit is contained in:
2013-01-19 15:01:03 -05:00
parent 4ea082330b
commit 651a534523
140 changed files with 14677 additions and 29 deletions

26
node_modules/moment/.jshintrc generated vendored Normal file
View File

@@ -0,0 +1,26 @@
{
"node" : true,
"es5" : true,
"browser" : true,
"boss" : false,
"curly": true,
"debug": false,
"devel": false,
"eqeqeq": true,
"eqnull": true,
"evil": false,
"forin": false,
"immed": false,
"laxbreak": false,
"newcap": true,
"noarg": true,
"noempty": false,
"nonew": false,
"onevar": true,
"plusplus": false,
"regexp": false,
"undef": true,
"sub": true,
"strict": false,
"white": true
}

2
node_modules/moment/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,2 @@
node_modules/
.DS_Store

5
node_modules/moment/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,5 @@
language: node_js
node_js:
- 0.4
- 0.6
- 0.8

34
node_modules/moment/CONTRIBUTING.md generated vendored Normal file
View File

@@ -0,0 +1,34 @@
Submitting Issues
=================
If you are submitting a bug with moment, please create a [jsfiddle](http://jsfiddle.net/) demonstrating the issue.
Contributing
============
To contribute, fork the library and install these npm packages.
npm install jshint uglify-js nodeunit
You can add tests to the files in `/test/moment` or add a new test file if you are adding a new feature.
To run the tests, do `make test` to run all tests, `make test-moment` to test the core library, and `make test-lang` to test all the languages.
To check the filesize, you can use `make size`.
To minify all the files, use `make moment` to minify moment, `make langs` to minify all the lang files, or just `make` to minfy everything.
If your code passes the unit tests (including the ones you wrote), submit a pull request.
Submitting pull requests
========================
Moment.js now uses [git-flow](https://github.com/nvie/gitflow). If you're not familiar with git-flow, please read up on it, you'll be glad you did.
When submitting new features, please create a new feature branch using `git flow feature start <name>` and submit the pull request to the `develop` branch.
Pull requests for enhancements for features should be submitted to the `develop` branch as well.
When submitting a bugfix, please check if there is an existing bugfix branch. If the latest stable version is `1.5.0`, the bugfix branch would be `hotfix/1.5.1`. All pull requests for bug fixes should be on a `hotfix` branch, unless the bug fix depends on a new feature.
The `master` branch should always have the latest stable version. When bugfix or minor releases are needed, the develop/hotfix branch will be merged into master and released.

22
node_modules/moment/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
Copyright (c) 2011-2012 Tim Wood
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

71
node_modules/moment/Makefile generated vendored Normal file
View File

@@ -0,0 +1,71 @@
LANG_ALL = $(wildcard lang/*.js)
MIN_LANG_ALL = $(addprefix min/,$(LANG_ALL))
.PHONY: all
all: moment langs
min/:
mkdir min/
min/lang/:
mkdir -p min/lang/
.PHONY: moment pretty
moment: min/ min/moment.min.js pretty
pretty: min/ min/moment.min.pretty.js
min/moment.min.js: moment.js
node_modules/.bin/uglifyjs -o $@ $<
min/moment.min.pretty.js: moment.js
node_modules/.bin/uglifyjs -b -o $@ $<
min/lang/%: lang/%
node_modules/.bin/uglifyjs --ascii -o $@ $<
min/lang-all.min.js: $(LANG_ALL)
cat $^ | node_modules/.bin/uglifyjs --ascii -o $@
.PHONY: langs
langs: min/lang/ $(MIN_LANG_ALL) min/lang-all.min.js
.PHONY: size
size: moment langs
# FILESIZE FOR ALL LANGS
cp min/lang-all.min.js min/lang-all.min.gzip.js
gzip min/lang-all.min.gzip.js
gzip -l min/lang-all.min.gzip.js.gz
rm min/lang-all.min.gzip.js.gz
# FILESIZE FOR LIBRARY
cp min/moment.min.js min/moment.min.gzip.js
gzip min/moment.min.gzip.js
gzip -l min/moment.min.gzip.js.gz
rm min/moment.min.gzip.js.gz
.PHONY: size-history
size-history: moment
node test/filesize-history.js
size-diff: moment
node test/filesize-diff.js
.PHONY: test hint test-moment test-lang
test: hint test-moment test-lang
test-zone:
node test/zone
hint:
node_modules/.bin/jshint moment.js
test-moment:
node_modules/.bin/nodeunit ./test/moment
test-lang:
node_modules/.bin/nodeunit ./test/lang
.PHONY: clean
clean:
rm -rf min/

1
node_modules/moment/ender.js generated vendored Normal file
View File

@@ -0,0 +1 @@
$.ender({ moment: require('moment') })

66
node_modules/moment/lang/bg.js generated vendored Normal file
View File

@@ -0,0 +1,66 @@
// moment.js language configuration
// language : bulgarian (bg)
// author : Krasen Borisov : https://github.com/kraz
(function () {
var lang = {
months : "януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),
monthsShort : "янрев_мар_апрай_юни_юли_авг_сеп_окт_ноеек".split("_"),
weekdays : еделя_понеделник_вторник_срядаетвъртък_петък_събота".split("_"),
weekdaysShort : ед_пон_вто_сря_чет_пет_съб".split("_"),
weekdaysMin : "нд_пн_вт_ср_чт_пт_сб".split("_"),
longDateFormat : {
LT : "h:mm",
L : "D.MM.YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendar : {
sameDay : '[Днес в] LT',
nextDay : '[Утре в] LT',
nextWeek : 'dddd [в] LT',
lastDay : '[Вчера в] LT',
lastWeek : function () {
switch (this.day()) {
case 0:
case 3:
case 6:
return '[В изминалата] dddd [в] LT';
case 1:
case 2:
case 4:
case 5:
return '[В изминалия] dddd [в] LT';
}
},
sameElse : 'L'
},
relativeTime : {
future : "след %s",
past : "преди %s",
s : "няколко секунди",
m : "минута",
mm : "%d минути",
h : "час",
hh : "%d часа",
d : "ден",
dd : "%d дни",
M : "месец",
MM : "%d месеца",
y : "година",
yy : "%d години"
},
ordinal : function (number) {
return '.';
}
};
// Node
if (typeof module !== 'undefined') {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('bg', lang);
}
}());

64
node_modules/moment/lang/ca.js generated vendored Normal file
View File

@@ -0,0 +1,64 @@
// moment.js language configuration
// language : catalan (ca)
// author : Juan G. Hurtado : https://github.com/juanghurtado
(function () {
var lang = {
months : "Gener_Febrer_Març_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),
monthsShort : "Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),
weekdays : "Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),
weekdaysShort : "Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),
weekdaysMin : "Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay : function () {
return '[avui a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
nextDay : function () {
return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
nextWeek : function () {
return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
lastDay : function () {
return '[ahir a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
lastWeek : function () {
return '[el] dddd [passat a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
},
sameElse : 'L'
},
relativeTime : {
future : "en %s",
past : "fa %s",
s : "uns segons",
m : "un minut",
mm : "%d minuts",
h : "una hora",
hh : "%d hores",
d : "un dia",
dd : "%d dies",
M : "un mes",
MM : "%d mesos",
y : "un any",
yy : "%d anys"
},
ordinal : function (number) {
return 'º';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('ca', lang);
}
}());

58
node_modules/moment/lang/cv.js generated vendored Normal file
View File

@@ -0,0 +1,58 @@
// moment.js language configuration
// language : chuvash (cv)
// author : Anatoly Mironov : https://github.com/mirontoli
(function () {
var lang = {
months : "кăрлач_нарăс_пуш_акаай_çĕртме_утă_çурла_авăн_юпа_чӳк_раштав".split("_"),
monthsShort : "кăрар_пуш_акаай_çĕр_утă_çур_ав_юпа_чӳк_раш".split("_"),
weekdays : "вырсарникун_тунтикун_ытларикун_юнкун_кĕçнерникун_эрнекун_шăматкун".split("_"),
weekdaysShort : "вырун_ытл_юн_кĕç_эрн_шăм".split("_"),
weekdaysMin : р_тн_ыт_юн_кç_эр_шм".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD-MM-YYYY",
LL : "YYYY çулхи MMMM уйăхĕн D-мĕшĕ",
LLL : "YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT",
LLLL : "dddd, YYYY çулхи MMMM уйăхĕн D-мĕшĕ, LT"
},
calendar : {
sameDay: '[Паян] LT [сехетре]',
nextDay: '[Ыран] LT [сехетре]',
lastDay: '[Ĕнер] LT [сехетре]',
nextWeek: '[Çитес] dddd LT [сехетре]',
lastWeek: '[Иртнĕ] dddd LT [сехетре]',
sameElse: 'L'
},
relativeTime : {
future : function(output) {
var affix = /сехет$/i.exec(output)
? "рен" : /çул$/i.exec(output) ? "тан" : "ран";
return output + affix;
},
past : "%s каялла",
s : "пĕр-ик çеккунт",
m : "пĕр минут",
mm : "%d минут",
h : "пĕр сехет",
hh : "%d сехет",
d : "пĕр кун",
dd : "%d кун",
M : "пĕр уйăх",
MM : "%d уйăх",
y : "пĕр çул",
yy : "%d çул"
},
ordinal : function (number) {
return '-мĕш';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('cv', lang);
}
}());

54
node_modules/moment/lang/da.js generated vendored Normal file
View File

@@ -0,0 +1,54 @@
// moment.js language configuration
// language : danish (da)
// author : Ulrik Nielsen : https://github.com/mrbase
(function () {
var lang = {
months : "Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"),
monthsShort : "Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),
weekdays : "Søndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_Lørdag".split("_"),
weekdaysShort : "Søn_Man_Tir_Ons_Tor_Fre_Lør".split("_"),
weekdaysMin : "Sø_Ma_Ti_On_To_Fr_Lø".split("_"),
longDateFormat : {
LT : "h:mm A",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY h:mm A",
LLLL : "dddd D. MMMM, YYYY h:mm A"
},
calendar : {
sameDay : '[I dag kl.] LT',
nextDay : '[I morgen kl.] LT',
nextWeek : 'dddd [kl.] LT',
lastDay : '[I går kl.] LT',
lastWeek : '[sidste] dddd [kl] LT',
sameElse : 'L'
},
relativeTime : {
future : "om %s",
past : "%s siden",
s : "få sekunder",
m : "minut",
mm : "%d minutter",
h : "time",
hh : "%d timer",
d : "dag",
dd : "%d dage",
M : "månede",
MM : "%d måneder",
y : "år",
yy : "%d år"
},
ordinal : function (number) {
return '.';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('da', lang);
}
}());

54
node_modules/moment/lang/de.js generated vendored Normal file
View File

@@ -0,0 +1,54 @@
// moment.js language configuration
// language : german (de)
// author : lluchs : https://github.com/lluchs
(function () {
var lang = {
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("_"),
weekdaysMin : "So_Mo_Di_Mi_Do_Fr_Sa".split("_"),
longDateFormat : {
LT: "H:mm U\\hr",
L : "DD.MM.YYYY",
LL : "D. MMMM YYYY",
LLL : "D. MMMM YYYY LT",
LLLL : "dddd, D. MMMM YYYY LT"
},
calendar : {
sameDay: "[Heute um] LT",
sameElse: "L",
nextDay: '[Morgen um] LT',
nextWeek: 'dddd [um] LT',
lastDay: '[Gestern um] LT',
lastWeek: '[letzten] dddd [um] LT'
},
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 (number) {
return '.';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('de', lang);
}
}());

58
node_modules/moment/lang/en-ca.js generated vendored Normal file
View File

@@ -0,0 +1,58 @@
// moment.js language configuration
// language : canadian english (en-ca)
// author : Jonathan Abourbih : https://github.com/jonbca
(function () {
var lang = {
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("_"),
weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
longDateFormat : {
LT : "h:mm A",
L : "YYYY-MM-DD",
LL : "D MMMM, YYYY",
LLL : "D MMMM, YYYY LT",
LLLL : "dddd, D MMMM, YYYY LT"
},
calendar : {
sameDay : '[Today at] LT',
nextDay : '[Tomorrow at] LT',
nextWeek : 'dddd [at] LT',
lastDay : '[Yesterday at] LT',
lastWeek : '[last] dddd [at] LT',
sameElse : 'L'
},
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 (number) {
var b = number % 10;
return (~~ (number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('en-ca', lang);
}
}());

58
node_modules/moment/lang/en-gb.js generated vendored Normal file
View File

@@ -0,0 +1,58 @@
// moment.js language configuration
// language : great britain english (en-gb)
// author : Chris Gedrim : https://github.com/chrisgedrim
(function () {
var lang = {
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("_"),
weekdaysMin : "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
longDateFormat : {
LT : "h:mm A",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendar : {
sameDay : '[Today at] LT',
nextDay : '[Tomorrow at] LT',
nextWeek : 'dddd [at] LT',
lastDay : '[Yesterday at] LT',
lastWeek : '[last] dddd [at] LT',
sameElse : 'L'
},
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 (number) {
var b = number % 10;
return (~~ (number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('en-gb', lang);
}
}());

64
node_modules/moment/lang/es.js generated vendored Normal file
View File

@@ -0,0 +1,64 @@
// moment.js language configuration
// language : spanish (es)
// author : Julio Napurí : https://github.com/julionc
(function () {
var lang = {
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("_"),
weekdaysMin : "Do_Lu_Ma_Mi_Ju_Vi_Sá".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay : function () {
return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
nextDay : function () {
return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
nextWeek : function () {
return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
lastDay : function () {
return '[ayer a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
lastWeek : function () {
return '[el] dddd [pasado a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
},
sameElse : 'L'
},
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 (number) {
return 'º';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('es', lang);
}
}());

67
node_modules/moment/lang/et.js generated vendored Normal file
View File

@@ -0,0 +1,67 @@
// moment.js language configuration
// language : estonian (et)
// author : Henry Kehlmann : https://github.com/madhenry
(function () {
function translate(number, withoutSuffix, key, isFuture) {
var num = number;
switch (key) {
case 's':
return (isFuture || withoutSuffix) ? 'paari sekundi' : 'paar sekundit';
default:
}
return '';
}
var lang = {
months : "jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),
monthsShort : "jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),
weekdays : "pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),
weekdaysShort : "P_E_T_K_N_R_L".split("_"),
weekdaysMin : "P_E_T_K_N_R_L".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD.MM.YYYY",
LL : "D. MMMM YYYY",
LLL : "D. MMMM YYYY LT",
LLLL : "dddd, D. MMMM YYYY LT"
},
calendar : {
sameDay : '[Täna,] LT',
nextDay : '[Homme,] LT',
nextWeek : '[Järgmine] dddd LT',
lastDay : '[Eile,] LT',
lastWeek : '[Eelmine] dddd LT',
sameElse : 'L'
},
relativeTime : {
future : "%s pärast",
past : "%s tagasi",
s : translate,
m : "minut",
mm : "%d minutit",
h : "tund",
hh : "%d tundi",
d : "päev",
dd : "%d päeva",
M : "kuu",
MM : "%d kuud",
y : "aasta",
yy : "%d aastat"
},
ordinal : function (number) {
return '.';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('et', lang);
}
}());

54
node_modules/moment/lang/eu.js generated vendored Normal file
View File

@@ -0,0 +1,54 @@
// moment.js language configuration
// language : euskara (eu)
// author : Eneko Illarramendi : https://github.com/eillarra
(function () {
var lang = {
months : "urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),
monthsShort : "urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),
weekdays : "igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),
weekdaysShort : "ig._al._ar._az._og._ol._lr.".split("_"),
weekdaysMin : "ig_al_ar_az_og_ol_lr".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "YYYY-MM-DD",
LL : "YYYYko MMMMren D[a]",
LLL : "YYYYko MMMMren D[a] LT",
LLLL : "dddd, YYYYko MMMMren D[a] LT"
},
calendar : {
sameDay : '[gaur] LT[etan]',
nextDay : '[bihar] LT[etan]',
nextWeek : 'dddd LT[etan]',
lastDay : '[atzo] LT[etan]',
lastWeek : '[aurreko] dddd LT[etan]',
sameElse : 'L'
},
relativeTime : {
future : "%s barru",
past : "duela %s",
s : "segundo batzuk",
m : "minutu bat",
mm : "%d minutu",
h : "ordu bat",
hh : "%d ordu",
d : "egun bat",
dd : "%d egun",
M : "hilabete bat",
MM : "%d hilabete",
y : "urte bat",
yy : "%d urte"
},
ordinal : function (number) {
return '.';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('eu', lang);
}
}());

98
node_modules/moment/lang/fi.js generated vendored Normal file
View File

@@ -0,0 +1,98 @@
// moment.js language configuration
// language : finnish (fi)
// author : Tarmo Aidantausta : https://github.com/bleadof
(function () {
var numbers_past = ['nolla', 'yksi', 'kaksi', 'kolme', 'neljä', 'viisi',
'kuusi', 'seitsemän', 'kahdeksan', 'yhdeksän'];
var numbers_future = ['nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden',
'kuuden', numbers_past[7], numbers_past[8], numbers_past[9]];
function translate(number, withoutSuffix, key, isFuture) {
var result = "";
switch (key) {
case 's':
return isFuture ? 'muutaman sekunnin' : 'muutama sekunti';
case 'm':
return isFuture ? 'minuutin' : 'minuutti';
case 'mm':
result = isFuture ? 'minuutin' : 'minuuttia';
break;
case 'h':
return isFuture ? 'tunnin' : 'tunti';
case 'hh':
result = isFuture ? 'tunnin' : 'tuntia';
break;
case 'd':
return isFuture ? 'päivän' : 'päivä';
case 'dd':
result = isFuture ? 'päivän' : 'päivää';
break;
case 'M':
return isFuture ? 'kuukauden' : 'kuukausi';
case 'MM':
result = isFuture ? 'kuukauden' : 'kuukautta';
break;
case 'y':
return isFuture ? 'vuoden' : 'vuosi';
case 'yy':
result = isFuture ? 'vuoden' : 'vuotta';
break;
}
result = verbal_number(number, isFuture) + " " + result;
return result;
}
function verbal_number(number, isFuture) {
return number < 10 ? (isFuture ? numbers_future[number] : numbers_past[number]) : number;
}
var lang = {
months : "tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),
monthsShort : "tam_hel_maa_huh_tou_kes_hei_elo_syy_lok_mar_jou".split("_"),
weekdays : "sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),
weekdaysShort : "su_ma_ti_ke_to_pe_la".split("_"),
weekdaysMin : "su_ma_ti_ke_to_pe_la".split("_"),
longDateFormat : {
LT : "HH.mm",
L : "DD.MM.YYYY",
LL : "Do MMMMt\\a YYYY",
LLL : "Do MMMMt\\a YYYY, klo LT",
LLLL : "dddd, Do MMMMt\\a YYYY, klo LT"
},
calendar : {
sameDay : '[tänään] [klo] LT',
nextDay : '[huomenna] [klo] LT',
nextWeek : 'dddd [klo] LT',
lastDay : '[eilen] [klo] LT',
lastWeek : '[viime] dddd[na] [klo] LT',
sameElse : 'L'
},
relativeTime : {
future : "%s päästä",
past : "%s sitten",
s : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
ordinal : function (number) {
return ".";
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('fi', lang);
}
}());

54
node_modules/moment/lang/fr-ca.js generated vendored Normal file
View File

@@ -0,0 +1,54 @@
// moment.js language configuration
// language : canadian french (fr-ca)
// author : Jonathan Abourbih : https://github.com/jonbca
(function () {
var lang = {
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("_"),
weekdaysMin : "Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "YYYY-MM-DD",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay: "[Aujourd'hui à] LT",
nextDay: '[Demain à] LT',
nextWeek: 'dddd [à] LT',
lastDay: '[Hier à] LT',
lastWeek: 'dddd [dernier à] LT',
sameElse: 'L'
},
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 (number) {
return number === 1 ? 'er' : 'ème';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('fr-ca', lang);
}
}());

54
node_modules/moment/lang/fr.js generated vendored Normal file
View File

@@ -0,0 +1,54 @@
// moment.js language configuration
// language : french (fr)
// author : John Fischer : https://github.com/jfroffice
(function () {
var lang = {
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("_"),
weekdaysMin : "Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay: "[Aujourd'hui à] LT",
nextDay: '[Demain à] LT',
nextWeek: 'dddd [à] LT',
lastDay: '[Hier à] LT',
lastWeek: 'dddd [dernier à] LT',
sameElse: 'L'
},
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 (number) {
return number === 1 ? 'er' : 'ème';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('fr', lang);
}
}());

64
node_modules/moment/lang/gl.js generated vendored Normal file
View File

@@ -0,0 +1,64 @@
// moment.js language configuration
// language : galician (gl)
// author : Juan G. Hurtado : https://github.com/juanghurtado
(function () {
var lang = {
months : "Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"),
monthsShort : "Xan._Feb._Mar._Abr._Mai._Xuñ._Xul._Ago._Set._Out._Nov._Dec.".split("_"),
weekdays : "Domingo_Luns_Martes_Mércores_Xoves_Venres_Sábado".split("_"),
weekdaysShort : "Dom._Lun._Mar._Mér._Xov._Ven._Sáb.".split("_"),
weekdaysMin : "Do_Lu_Ma_Mé_Xo_Ve_Sá".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay : function () {
return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
},
nextDay : function () {
return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
},
nextWeek : function () {
return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
},
lastDay : function () {
return '[onte ' + ((this.hours() !== 1) ? 'á' : 'a') + '] LT';
},
lastWeek : function () {
return '[o] dddd [pasado ' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
},
sameElse : 'L'
},
relativeTime : {
future : "en %s",
past : "fai %s",
s : "uns segundo",
m : "un minuto",
mm : "%d minutos",
h : "unha hora",
hh : "%d horas",
d : "un día",
dd : "%d días",
M : "un mes",
MM : "%d meses",
y : "un ano",
yy : "%d anos"
},
ordinal : function (number) {
return 'º';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('gl', lang);
}
}());

108
node_modules/moment/lang/hu.js generated vendored Normal file
View File

@@ -0,0 +1,108 @@
// moment.js language configuration
// language : hungarian (hu)
// author : Adam Brunner : https://github.com/adambrunner
(function()
{
function translate(number, withoutSuffix, key, isFuture) {
var num = number;
switch (key) {
case 's':
return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
case 'm':
num = 'egy';
case 'mm':
return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
break;
case 'h':
num = 'egy';
case 'hh':
return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
case 'd':
num = 'egy';
case 'dd':
return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
case 'M':
num = 'egy';
case 'MM':
return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
case 'y':
num = 'egy';
case 'yy':
return num + (isFuture || withoutSuffix ? ' év' : ' éve');
default:
}
return '';
}
function week(isFuture) {
var ending = '';
switch (this.day()) {
case 0: ending = 'vasárnap'; break;
case 1: ending = 'hétfőn'; break;
case 2: ending = 'kedden'; break;
case 3: ending = 'szerdán'; break;
case 4: ending = 'csütörtökön'; break;
case 5: ending = 'pénteken'; break;
case 6: ending = 'szombaton'; break;
}
return (isFuture ? '' : 'múlt ')+'['+ending+'] LT[-kor]';
}
var lang = {
months : "január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),
monthsShort : "jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec".split("_"),
weekdays : "vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),
weekdaysShort : "v_h_k_sze_cs_p_szo".split("_"),
longDateFormat : {
LT : "H:mm",
L : "YYYY.MM.DD.",
LL : "YYYY. MMMM D.",
LLL : "YYYY. MMMM D., LT",
LLLL : "YYYY. MMMM D., dddd LT"
},
calendar : {
sameDay : '[ma] LT[-kor]',
nextDay : '[holnap] LT[-kor]',
nextWeek : function(){return week.call(this, true);},
lastDay : '[tegnap] LT[-kor]',
lastWeek : function(){return week.call(this, false);},
sameElse : 'L'
},
relativeTime : {
future : "%s múlva",
past : "%s",
s : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
ordinal : function(number) {
return '.';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('hu', lang);
}
}());

132
node_modules/moment/lang/is.js generated vendored Normal file
View File

@@ -0,0 +1,132 @@
// moment.js language configuration
// language : icelandic (is)
// author : Hinrik Örn Sigurðsson : https://github.com/hinrik
(function () {
var plural = function (n) {
if (n % 100 == 11) {
return true;
} else if (n % 10 == 1) {
return false;
} else {
return true;
}
},
translate = function (number, withoutSuffix, key, isFuture) {
var result = number + " ";
switch (key) {
case 's':
return withoutSuffix || isFuture ? 'nokkrar sekúndur' : 'nokkrum sekúndum';
case 'm':
return withoutSuffix ? 'mínúta' : 'mínútu';
case 'mm':
if (plural(number)) {
return result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum');
} else if (withoutSuffix) {
return result + 'mínúta';
} else {
return result + 'mínútu';
}
case 'hh':
if (plural(number)) {
return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');
} else {
return result + 'klukkustund';
}
case 'd':
if (withoutSuffix) {
return 'dagur'
} else {
return isFuture ? 'dag' : 'degi';
}
case 'dd':
if (plural(number)) {
if (withoutSuffix) {
return result + 'dagar'
} else {
return result + (isFuture ? 'daga' : 'dögum');
}
} else if (withoutSuffix) {
return result + 'dagur'
} else {
return result + (isFuture ? 'dag' : 'degi');
}
case 'M':
if (withoutSuffix) {
return 'mánuður'
} else {
return isFuture ? 'mánuð' : 'mánuði';
}
case 'MM':
if (plural(number)) {
if (withoutSuffix) {
return result + 'mánuðir'
} else {
return result + (isFuture ? 'mánuði' : 'mánuðum');
}
} else if (withoutSuffix) {
return result + 'mánuður';
} else {
return result + (isFuture ? 'mánuð' : 'mánuði');
}
case 'y':
return withoutSuffix || isFuture ? 'ár' : 'ári';
case 'yy':
if (plural(number)) {
return result + (withoutSuffix || isFuture ? 'ár' : 'árum');
} else {
return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
}
}
},
lang = {
months : "janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),
monthsShort : "jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),
weekdays : "sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),
weekdaysShort : "sun_mán_þri_mið_fim_fös_lau".split("_"),
weekdaysMin : "Su_Má_Þr_Mi_Fi_Fö_La".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD/MM/YYYY",
LL : "D. MMMM YYYY",
LLL : "D. MMMM YYYY kl. LT",
LLLL : "dddd, D. MMMM YYYY kl. LT"
},
calendar : {
sameDay : '[í dag kl.] LT',
nextDay : '[á morgun kl.] LT',
nextWeek : 'dddd [kl.] LT',
lastDay : '[í gær kl.] LT',
lastWeek : '[síðasta] dddd [kl.] LT',
sameElse : 'L'
},
relativeTime : {
future : "eftir %s",
past : "fyrir %s síðan",
s : translate,
m : translate,
mm : translate,
h : "klukkustund",
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate,
},
ordinal : function (number) {
return '.';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('is', lang);
}
}());

54
node_modules/moment/lang/it.js generated vendored Normal file
View File

@@ -0,0 +1,54 @@
// moment.js language configuration
// language : italian (it)
// author : Lorenzo : https://github.com/aliem
(function () {
var lang = {
months : "Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settembre_Ottobre_Novembre_Dicembre".split("_"),
monthsShort : "Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),
weekdays : "Domenica_Lunedì_Martedì_Mercoledì_Giovedì_Venerdì_Sabato".split("_"),
weekdaysShort : "Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),
weekdaysMin : "D_L_Ma_Me_G_V_S".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendar : {
sameDay: '[Oggi alle] LT',
nextDay: '[Domani alle] LT',
nextWeek: 'dddd [alle] LT',
lastDay: '[Ieri alle] LT',
lastWeek: '[lo scorso] dddd [alle] LT',
sameElse: 'L'
},
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 'º';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('it', lang);
}
}());

61
node_modules/moment/lang/ja.js generated vendored Normal file
View File

@@ -0,0 +1,61 @@
// moment.js language configuration
// language : japanese (ja)
// author : LI Long : https://github.com/baryon
(function () {
var lang = {
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("_"),
weekdaysMin : "日_月_火_水_木_金_土".split("_"),
longDateFormat : {
LT : "Ah時m分",
L : "YYYY/MM/DD",
LL : "YYYY年M月D日",
LLL : "YYYY年M月D日LT",
LLLL : "YYYY年M月D日LT dddd"
},
meridiem : function (hour, minute, isLower) {
if (hour < 12) {
return "午前";
} else {
return "午後";
}
},
calendar : {
sameDay : '[今日] LT',
nextDay : '[明日] LT',
nextWeek : '[来週]dddd LT',
lastDay : '[昨日] LT',
lastWeek : '[前週]dddd LT',
sameElse : 'L'
},
relativeTime : {
future : "%s後",
past : "%s前",
s : "数秒",
m : "1分",
mm : "%d分",
h : "1時間",
hh : "%d時間",
d : "1日",
dd : "%d日",
M : "1ヶ月",
MM : "%dヶ月",
y : "1年",
yy : "%d年"
},
ordinal : function (number) {
return '';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('ja', lang);
}
}());

64
node_modules/moment/lang/jp.js generated vendored Normal file
View File

@@ -0,0 +1,64 @@
// moment.js language configuration
// language : japanese (jp)
// author : LI Long : https://github.com/baryon
// This language config was incorrectly named 'jp' instead of 'ja'.
// In version 2.0.0, this will be deprecated and you should use 'ja' instead.
(function () {
var lang = {
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("_"),
weekdaysMin : "日_月_火_水_木_金_土".split("_"),
longDateFormat : {
LT : "Ah時m分",
L : "YYYY/MM/DD",
LL : "YYYY年M月D日",
LLL : "YYYY年M月D日LT",
LLLL : "YYYY年M月D日LT dddd"
},
meridiem : function (hour, minute, isLower) {
if (hour < 12) {
return "午前";
} else {
return "午後";
}
},
calendar : {
sameDay : '[今日] LT',
nextDay : '[明日] LT',
nextWeek : '[来週]dddd LT',
lastDay : '[昨日] LT',
lastWeek : '[前週]dddd LT',
sameElse : 'L'
},
relativeTime : {
future : "%s後",
past : "%s前",
s : "数秒",
m : "1分",
mm : "%d分",
h : "1時間",
hh : "%d時間",
d : "1日",
dd : "%d日",
M : "1ヶ月",
MM : "%dヶ月",
y : "1年",
yy : "%d年"
},
ordinal : function (number) {
return '';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('jp', lang);
}
}());

58
node_modules/moment/lang/ko.js generated vendored Normal file
View File

@@ -0,0 +1,58 @@
// moment.js language configuration
// language : korean (ko)
// author : Kyungwook, Park : https://github.com/kyungw00k
(function () {
var lang = {
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("_"),
weekdaysMin : "일_월_화_수_목_금_토".split("_"),
longDateFormat : {
LT : "A h시 mm분",
L : "YYYY.MM.DD",
LL : "YYYY년 MMMM D일",
LLL : "YYYY년 MMMM D일 LT",
LLLL : "YYYY년 MMMM D일 dddd LT"
},
meridiem : function (hour, minute, isUpper) {
return hour < 12 ? '오전' : '오후';
},
calendar : {
sameDay : '오늘 LT',
nextDay : '내일 LT',
nextWeek : 'dddd LT',
lastDay : '어제 LT',
lastWeek : '지난주 dddd LT',
sameElse : 'L'
},
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 (number) {
return '일';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('ko', lang);
}
}());

61
node_modules/moment/lang/kr.js generated vendored Normal file
View File

@@ -0,0 +1,61 @@
// moment.js language configuration
// language : korean (kr)
// author : Kyungwook, Park : https://github.com/kyungw00k
// This language config was incorrectly named 'kr' instead of 'ko'.
// In version 2.0.0, this will be deprecated and you should use 'ko' instead.
(function () {
var lang = {
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("_"),
weekdaysMin : "일_월_화_수_목_금_토".split("_"),
longDateFormat : {
LT : "A h시 mm분",
L : "YYYY.MM.DD",
LL : "YYYY년 MMMM D일",
LLL : "YYYY년 MMMM D일 LT",
LLLL : "YYYY년 MMMM D일 dddd LT"
},
meridiem : function (hour, minute, isUpper) {
return hour < 12 ? '오전' : '오후';
},
calendar : {
sameDay : '오늘 LT',
nextDay : '내일 LT',
nextWeek : 'dddd LT',
lastDay : '어제 LT',
lastWeek : '지난주 dddd LT',
sameElse : 'L'
},
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 (number) {
return '일';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('kr', lang);
}
}());

54
node_modules/moment/lang/nb.js generated vendored Normal file
View File

@@ -0,0 +1,54 @@
// moment.js language configuration
// language : norwegian bokmål (nb)
// author : Espen Hovlandsdal : https://github.com/rexxars
(function () {
var lang = {
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("_"),
weekdaysMin : "sø_ma_ti_on_to_fr_lø".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "YYYY-MM-DD",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay: '[I dag klokken] LT',
nextDay: '[I morgen klokken] LT',
nextWeek: 'dddd [klokken] LT',
lastDay: '[I går klokken] LT',
lastWeek: '[Forrige] dddd [klokken] LT',
sameElse: 'L'
},
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 (number) {
return '.';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('nb', lang);
}
}());

62
node_modules/moment/lang/nl.js generated vendored Normal file
View File

@@ -0,0 +1,62 @@
// moment.js language configuration
// language : dutch (nl)
// author : Joris Röling : https://github.com/jjupiter
(function () {
var monthsShortWithDots = "jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_");
var monthsShortWithoutDots = "jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_");
var lang = {
months : "januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),
monthsShort : function (m, format) {
if (/-MMM-/.test(format)) {
return monthsShortWithoutDots[m.month()];
} else {
return monthsShortWithDots[m.month()];
}
},
weekdays : "zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),
weekdaysShort : "zo._ma._di._wo._do._vr._za.".split("_"),
weekdaysMin : "Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD-MM-YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay: '[Vandaag om] LT',
nextDay: '[Morgen om] LT',
nextWeek: 'dddd [om] LT',
lastDay: '[Gisteren om] LT',
lastWeek: '[afgelopen] dddd [om] LT',
sameElse: 'L'
},
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 (number) {
return (number === 1 || number === 8 || number >= 20) ? 'ste' : 'de';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('nl', lang);
}
}());

76
node_modules/moment/lang/pl.js generated vendored Normal file
View File

@@ -0,0 +1,76 @@
// moment.js language configuration
// language : polish (pl)
// author : Rafal Hirsz : https://github.com/evoL
(function () {
var plural = function (n) {
return (n % 10 < 5) && (n % 10 > 1) && (~~(n / 10) !== 1);
},
translate = function (number, withoutSuffix, key) {
var result = number + " ";
switch (key) {
case 'm':
return withoutSuffix ? 'minuta' : 'minutę';
case 'mm':
return result + (plural(number) ? 'minuty' : 'minut');
case 'h':
return withoutSuffix ? 'godzina' : 'godzinę';
case 'hh':
return result + (plural(number) ? 'godziny' : 'godzin');
case 'MM':
return result + (plural(number) ? 'miesiące' : 'miesięcy');
case 'yy':
return result + (plural(number) ? 'lata' : 'lat');
}
},
lang = {
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("_"),
weekdaysMin : "N_Pn_Wt_Śr_Cz_Pt_So".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD-MM-YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendar : {
sameDay: '[Dziś o] LT',
nextDay: '[Jutro o] LT',
nextWeek: '[W] dddd [o] LT',
lastDay: '[Wczoraj o] LT',
lastWeek: '[W zeszły/łą] dddd [o] LT',
sameElse: 'L'
},
relativeTime : {
future : "za %s",
past : "%s temu",
s : "kilka sekund",
m : translate,
mm : translate,
h : translate,
hh : translate,
d : "1 dzień",
dd : '%d dni',
M : "miesiąc",
MM : translate,
y : "rok",
yy : translate
},
ordinal : function (number) {
return '.';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('pl', lang);
}
}());

58
node_modules/moment/lang/pt-br.js generated vendored Normal file
View File

@@ -0,0 +1,58 @@
// moment.js language configuration
// language : brazilian portuguese (pt-br)
// author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
(function () {
var lang = {
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("_"),
weekdaysMin : "Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D \\de MMMM \\de YYYY",
LLL : "D \\de MMMM \\de YYYY LT",
LLLL : "dddd, D \\de MMMM \\de YYYY LT"
},
calendar : {
sameDay: '[Hoje às] LT',
nextDay: '[Amanhã às] LT',
nextWeek: 'dddd [às] LT',
lastDay: '[Ontem às] LT',
lastWeek: function () {
return (this.day() === 0 || this.day() === 6) ?
'[Último] dddd [às] LT' : // Saturday + Sunday
'[Última] dddd [às] LT'; // Monday - Friday
},
sameElse: 'L'
},
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 (number) {
return 'º';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('pt-br', lang);
}
}());

58
node_modules/moment/lang/pt.js generated vendored Normal file
View File

@@ -0,0 +1,58 @@
// moment.js language configuration
// language : portuguese (pt)
// author : Jefferson : https://github.com/jalex79
(function () {
var lang = {
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("_"),
weekdaysMin : "Dom_2ª_3ª_4ª_5ª_6ª_Sáb".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD/MM/YYYY",
LL : "D \\de MMMM \\de YYYY",
LLL : "D \\de MMMM \\de YYYY LT",
LLLL : "dddd, D \\de MMMM \\de YYYY LT"
},
calendar : {
sameDay: '[Hoje às] LT',
nextDay: '[Amanhã às] LT',
nextWeek: 'dddd [às] LT',
lastDay: '[Ontem às] LT',
lastWeek: function () {
return (this.day() === 0 || this.day() === 6) ?
'[Último] dddd [às] LT' : // Saturday + Sunday
'[Última] dddd [às] LT'; // Monday - Friday
},
sameElse: 'L'
},
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 (number) {
return 'º';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('pt', lang);
}
}());

55
node_modules/moment/lang/ro.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
// moment.js language configuration
// language : romanian (ro)
// author : Vlad Gurdiga : https://github.com/gurdiga
// author : Valentin Agachi : https://github.com/avaly
(function () {
var lang = {
months : "Ianuarie_Februarie_Martie_Aprilie_Mai_Iunie_Iulie_August_Septembrie_Octombrie_Noiembrie_Decembrie".split("_"),
monthsShort : "Ian_Feb_Mar_Apr_Mai_Iun_Iul_Aug_Sep_Oct_Noi_Dec".split("_"),
weekdays : "Duminică_Luni_Marţi_Miercuri_Joi_Vineri_Sâmbătă".split("_"),
weekdaysShort : "Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),
weekdaysMin : "Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),
longDateFormat : {
LT : "H:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY H:mm",
LLLL : "dddd, D MMMM YYYY H:mm"
},
calendar : {
sameDay: "[azi la] LT",
nextDay: '[mâine la] LT',
nextWeek: 'dddd [la] LT',
lastDay: '[ieri la] LT',
lastWeek: '[fosta] dddd [la] LT',
sameElse: 'L'
},
relativeTime : {
future : "peste %s",
past : "%s în urmă",
s : "câteva secunde",
m : "un minut",
mm : "%d minute",
h : "o oră",
hh : "%d ore",
d : "o zi",
dd : "%d zile",
M : "o lună",
MM : "%d luni",
y : "un an",
yy : "%d ani"
},
ordinal : function (number) {
return '';
}
};
// Node
if (typeof module !== 'undefined') {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('ro', lang);
}
}());

133
node_modules/moment/lang/ru.js generated vendored Normal file
View File

@@ -0,0 +1,133 @@
// moment.js language configuration
// language : russian (ru)
// author : Viktorminator : https://github.com/Viktorminator
(function () {
var pluralRules = [
function (n) { return ((n % 10 === 1) && (n % 100 !== 11)); },
function (n) { return ((n % 10) >= 2 && (n % 10) <= 4 && ((n % 10) % 1) === 0) && ((n % 100) < 12 || (n % 100) > 14); },
function (n) { return ((n % 10) === 0 || ((n % 10) >= 5 && (n % 10) <= 9 && ((n % 10) % 1) === 0) || ((n % 100) >= 11 && (n % 100) <= 14 && ((n % 100) % 1) === 0)); },
function (n) { return true; }
],
plural = function (word, num) {
var forms = word.split('_'),
minCount = Math.min(pluralRules.length, forms.length),
i = -1;
while (++i < minCount) {
if (pluralRules[i](num)) {
return forms[i];
}
}
return forms[minCount - 1];
},
relativeTimeWithPlural = function (number, withoutSuffix, key) {
var format = {
'mm': 'минута_минуты_минут_минуты',
'hh': асасаасов_часа',
'dd': ень_дня_дней_дня',
'MM': есяц_месяцаесяцев_месяца',
'yy': 'год_годает_года'
};
if (key === 'm') {
return withoutSuffix ? 'минута' : 'минуту';
}
else {
return number + ' ' + plural(format[key], +number);
}
},
monthsCaseReplace = function (m, format) {
var months = {
'nominative': 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),
'accusative': 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_')
},
nounCase = (/D[oD]? *MMMM?/).test(format) ?
'accusative' :
'nominative';
return months[nounCase][m.month()];
},
weekdaysCaseReplace = function (m, format) {
var weekdays = {
'nominative': оскресенье_понедельник_вторник_средаетверг_пятница_суббота'.split('_'),
'accusative': оскресенье_понедельник_вторник_средуетверг_пятницу_субботу'.split('_')
},
nounCase = (/\[ ?[Вв] ?(?:прошлую|следующую)? ?\] ?dddd/).test(format) ?
'accusative' :
'nominative';
return weekdays[nounCase][m.day()];
},
lang = {
months : monthsCaseReplace,
monthsShort : "янв_фев_мар_апрай_июн_июл_авг_сен_окт_ноя_дек".split("_"),
weekdays : weekdaysCaseReplace,
weekdaysShort : ск_пнд_втр_срд_чтв_птн_сбт".split("_"),
weekdaysMin : с_пн_вт_ср_чт_пт_сб".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD.MM.YYYY",
LL : "D MMMM YYYY г.",
LLL : "D MMMM YYYY г., LT",
LLLL : "dddd, D MMMM YYYY г., LT"
},
calendar : {
sameDay: '[Сегодня в] LT',
nextDay: '[Завтра в] LT',
lastDay: '[Вчера в] LT',
nextWeek: function () {
return this.day() === 2 ? '[Во] dddd [в] LT' : '[В] dddd [в] LT';
},
lastWeek: function () {
switch (this.day()) {
case 0:
return '[В прошлое] dddd [в] LT';
case 1:
case 2:
case 4:
return '[В прошлый] dddd [в] LT';
case 3:
case 5:
case 6:
return '[В прошлую] dddd [в] LT';
}
},
sameElse: 'L'
},
// It needs checking (adding) russian plurals and cases.
relativeTime : {
future : "через %s",
past : "%s назад",
s : "несколько секунд",
m : relativeTimeWithPlural,
mm : relativeTimeWithPlural,
h : "час",
hh : relativeTimeWithPlural,
d : "день",
dd : relativeTimeWithPlural,
M : "месяц",
MM : relativeTimeWithPlural,
y : "год",
yy : relativeTimeWithPlural
},
ordinal : function (number) {
return '.';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('ru', lang);
}
}());

58
node_modules/moment/lang/sv.js generated vendored Normal file
View File

@@ -0,0 +1,58 @@
// moment.js language configuration
// language : swedish (sv)
// author : Jens Alm : https://github.com/ulmus
(function () {
var lang = {
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("_"),
weekdaysMin : "sö_må_ti_on_to_fr_lö".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "YYYY-MM-DD",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D MMMM YYYY LT"
},
calendar : {
sameDay: '[Idag klockan] LT',
nextDay: '[Imorgon klockan] LT',
lastDay: '[Igår klockan] LT',
nextWeek: 'dddd [klockan] LT',
lastWeek: '[Förra] dddd[en klockan] LT',
sameElse: 'L'
},
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 (number) {
var b = number % 10;
return (~~ (number % 100 / 10) === 1) ? 'e' :
(b === 1) ? 'a' :
(b === 2) ? 'a' :
(b === 3) ? 'e' : 'e';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('sv', lang);
}
}());

88
node_modules/moment/lang/tr.js generated vendored Normal file
View File

@@ -0,0 +1,88 @@
// moment.js language configuration
// language : turkish (tr)
// authors : Erhan Gundogan : https://github.com/erhangundogan,
// Burak Yiğit Kaya: https://github.com/BYK
(function () {
var suffixes = {
1: "'inci",
5: "'inci",
8: "'inci",
70: "'inci",
80: "'inci",
2: "'nci",
7: "'nci",
20: "'nci",
50: "'nci",
3: "'üncü",
4: "'üncü",
100: "'üncü",
6: "'ncı",
9: "'uncu",
10: "'uncu",
30: "'uncu",
60: "'ıncı",
90: "'ıncı"
};
var lang = {
months : "Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),
monthsShort : "Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),
weekdays : "Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),
weekdaysShort : "Paz_Pts_Sal_Çar_Per_Cum_Cts".split("_"),
weekdaysMin : "Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD.MM.YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendar : {
sameDay : '[bugün saat] LT',
nextDay : '[yarın saat] LT',
nextWeek : '[haftaya] dddd [saat] LT',
lastDay : '[dün] LT',
lastWeek : '[geçen hafta] dddd [saat] LT',
sameElse : 'L'
},
relativeTime : {
future : "%s sonra",
past : "%s önce",
s : "birkaç saniye",
m : "bir dakika",
mm : "%d dakika",
h : "bir saat",
hh : "%d saat",
d : "bir gün",
dd : "%d gün",
M : "bir ay",
MM : "%d ay",
y : "bir yıl",
yy : "%d yıl"
},
ordinal : function (number) {
if (number === 0) { // special case for zero
return "'ıncı";
}
var a = number % 10;
var b = number % 100 - a;
var c = number >= 100 ? 100 : null;
return suffixes[a] || suffixes[b] || suffixes[c];
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('tr', lang);
}
}());

67
node_modules/moment/lang/zh-cn.js generated vendored Normal file
View File

@@ -0,0 +1,67 @@
// moment.js language configuration
// language : chinese
// author : suupic : https://github.com/suupic
(function () {
var lang = {
months : "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
weekdays : "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
weekdaysShort : "周日_周一_周二_周三_周四_周五_周六".split("_"),
weekdaysMin : "日_一_二_三_四_五_六".split("_"),
longDateFormat : {
LT : "Ah点mm",
L : "YYYY年MMMD日",
LL : "YYYY年MMMD日",
LLL : "YYYY年MMMD日LT",
LLLL : "YYYY年MMMD日ddddLT"
},
meridiem : function (hour, minute, isLower) {
if (hour < 9) {
return "早上";
} else if (hour < 11 && minute < 30) {
return "上午";
} else if (hour < 13 && minute < 30) {
return "中午";
} else if (hour < 18) {
return "下午";
} else {
return "晚上";
}
},
calendar : {
sameDay : '[今天]LT',
nextDay : '[明天]LT',
nextWeek : '[下]ddddLT',
lastDay : '[昨天]LT',
lastWeek : '[上]ddddLT',
sameElse : 'L'
},
relativeTime : {
future : "%s内",
past : "%s前",
s : "几秒",
m : "1分钟",
mm : "%d分钟",
h : "1小时",
hh : "%d小时",
d : "1天",
dd : "%d天",
M : "1个月",
MM : "%d个月",
y : "1年",
yy : "%d年"
},
ordinal : function (number) {
return '';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('zh-cn', lang);
}
}());

67
node_modules/moment/lang/zh-tw.js generated vendored Normal file
View File

@@ -0,0 +1,67 @@
// moment.js language configuration
// language : traditional chinese (zh-tw)
// author : Ben : https://github.com/ben-lin
(function () {
var lang = {
months : "一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),
monthsShort : "1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),
weekdays : "星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),
weekdaysShort : "週日_週一_週二_週三_週四_週五_週六".split("_"),
weekdaysMin : "日_一_二_三_四_五_六".split("_"),
longDateFormat : {
LT : "Ah點mm",
L : "YYYY年MMMD日",
LL : "YYYY年MMMD日",
LLL : "YYYY年MMMD日LT",
LLLL : "YYYY年MMMD日ddddLT"
},
meridiem : function (hour, minute, isLower) {
if (hour < 9) {
return "早上";
} else if (hour < 11 && minute < 30) {
return "上午";
} else if (hour < 13 && minute < 30) {
return "中午";
} else if (hour < 18) {
return "下午";
} else {
return "晚上";
}
},
calendar : {
sameDay : '[今天]LT',
nextDay : '[明天]LT',
nextWeek : '[下]ddddLT',
lastDay : '[昨天]LT',
lastWeek : '[上]ddddLT',
sameElse : 'L'
},
relativeTime : {
future : "%s內",
past : "%s前",
s : "幾秒",
m : "一分鐘",
mm : "%d分鐘",
h : "一小時",
hh : "%d小時",
d : "一天",
dd : "%d天",
M : "一個月",
MM : "%d個月",
y : "一年",
yy : "%d年"
},
ordinal : function (number) {
return '';
}
};
// Node
if (typeof module !== 'undefined' && module.exports) {
module.exports = lang;
}
// Browser
if (typeof window !== 'undefined' && this.moment && this.moment.lang) {
this.moment.lang('zh-tw', lang);
}
}());

5
node_modules/moment/min/lang-all.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

4
node_modules/moment/min/lang/bg.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : bulgarian (bg)
// author : Krasen Borisov : https://github.com/kraz
(function(){var a={months:"\u044f\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u044f\u043d\u0440_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u044f\u0434\u0430_\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a_\u043f\u0435\u0442\u044a\u043a_\u0441\u044a\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u044f_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u044a\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"h:mm",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[\u0414\u043d\u0435\u0441 \u0432] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432] LT",nextWeek:"dddd [\u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u0412 \u0438\u0437\u043c\u0438\u043d\u0430\u043b\u0430\u0442\u0430] dddd [\u0432] LT";case 1:case 2:case 4:case 5:return"[\u0412 \u0438\u0437\u043c\u0438\u043d\u0430\u043b\u0438\u044f] dddd [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0441\u043b\u0435\u0434 %s",past:"\u043f\u0440\u0435\u0434\u0438 %s",s:"\u043d\u044f\u043a\u043e\u043b\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0434\u0435\u043d",dd:"%d \u0434\u043d\u0438",M:"\u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0430",y:"\u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},ordinal:function(a){return"."}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("bg",a)})();

4
node_modules/moment/min/lang/ca.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : catalan (ca)
// author : Juan G. Hurtado : https://github.com/juanghurtado
(function(){var a={months:"Gener_Febrer_Mar\u00e7_Abril_Maig_Juny_Juliol_Agost_Setembre_Octubre_Novembre_Desembre".split("_"),monthsShort:"Gen._Febr._Mar._Abr._Mai._Jun._Jul._Ag._Set._Oct._Nov._Des.".split("_"),weekdays:"Diumenge_Dilluns_Dimarts_Dimecres_Dijous_Divendres_Dissabte".split("_"),weekdaysShort:"Dg._Dl._Dt._Dc._Dj._Dv._Ds.".split("_"),weekdaysMin:"Dg_Dl_Dt_Dc_Dj_Dv_Ds".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[avui a "+(this.hours()!==1?"les":"la")+"] LT"},nextDay:function(){return"[dem\u00e0 a "+(this.hours()!==1?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(this.hours()!==1?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(this.hours()!==1?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(this.hours()!==1?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fa %s",s:"uns segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},ordinal:function(a){return"\u00ba"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ca",a)})();

4
node_modules/moment/min/lang/cv.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : chuvash (cv)
// author : Anatoly Mironov : https://github.com/mirontoli
(function(){var a={months:"\u043a\u0103\u0440\u043b\u0430\u0447_\u043d\u0430\u0440\u0103\u0441_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u00e7\u0115\u0440\u0442\u043c\u0435_\u0443\u0442\u0103_\u00e7\u0443\u0440\u043b\u0430_\u0430\u0432\u0103\u043d_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448\u0442\u0430\u0432".split("_"),monthsShort:"\u043a\u0103\u0440_\u043d\u0430\u0440_\u043f\u0443\u0448_\u0430\u043a\u0430_\u043c\u0430\u0439_\u00e7\u0115\u0440_\u0443\u0442\u0103_\u00e7\u0443\u0440_\u0430\u0432_\u044e\u043f\u0430_\u0447\u04f3\u043a_\u0440\u0430\u0448".split("_"),weekdays:"\u0432\u044b\u0440\u0441\u0430\u0440\u043d\u0438\u043a\u0443\u043d_\u0442\u0443\u043d\u0442\u0438\u043a\u0443\u043d_\u044b\u0442\u043b\u0430\u0440\u0438\u043a\u0443\u043d_\u044e\u043d\u043a\u0443\u043d_\u043a\u0115\u00e7\u043d\u0435\u0440\u043d\u0438\u043a\u0443\u043d_\u044d\u0440\u043d\u0435\u043a\u0443\u043d_\u0448\u0103\u043c\u0430\u0442\u043a\u0443\u043d".split("_"),weekdaysShort:"\u0432\u044b\u0440_\u0442\u0443\u043d_\u044b\u0442\u043b_\u044e\u043d_\u043a\u0115\u00e7_\u044d\u0440\u043d_\u0448\u0103\u043c".split("_"),weekdaysMin:"\u0432\u0440_\u0442\u043d_\u044b\u0442_\u044e\u043d_\u043a\u00e7_\u044d\u0440_\u0448\u043c".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"YYYY \u00e7\u0443\u043b\u0445\u0438 MMMM \u0443\u0439\u0103\u0445\u0115\u043d D-\u043c\u0115\u0448\u0115",LLL:"YYYY \u00e7\u0443\u043b\u0445\u0438 MMMM \u0443\u0439\u0103\u0445\u0115\u043d D-\u043c\u0115\u0448\u0115, LT",LLLL:"dddd, YYYY \u00e7\u0443\u043b\u0445\u0438 MMMM \u0443\u0439\u0103\u0445\u0115\u043d D-\u043c\u0115\u0448\u0115, LT"},calendar:{sameDay:"[\u041f\u0430\u044f\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextDay:"[\u042b\u0440\u0430\u043d] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastDay:"[\u0114\u043d\u0435\u0440] LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",nextWeek:"[\u00c7\u0438\u0442\u0435\u0441] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",lastWeek:"[\u0418\u0440\u0442\u043d\u0115] dddd LT [\u0441\u0435\u0445\u0435\u0442\u0440\u0435]",sameElse:"L"},relativeTime:{future:function(a){var b=/сехет$/i.exec(a)?"\u0440\u0435\u043d":/çул$/i.exec(a)?"\u0442\u0430\u043d":"\u0440\u0430\u043d";return a+b},past:"%s \u043a\u0430\u044f\u043b\u043b\u0430",s:"\u043f\u0115\u0440-\u0438\u043a \u00e7\u0435\u043a\u043a\u0443\u043d\u0442",m:"\u043f\u0115\u0440 \u043c\u0438\u043d\u0443\u0442",mm:"%d \u043c\u0438\u043d\u0443\u0442",h:"\u043f\u0115\u0440 \u0441\u0435\u0445\u0435\u0442",hh:"%d \u0441\u0435\u0445\u0435\u0442",d:"\u043f\u0115\u0440 \u043a\u0443\u043d",dd:"%d \u043a\u0443\u043d",M:"\u043f\u0115\u0440 \u0443\u0439\u0103\u0445",MM:"%d \u0443\u0439\u0103\u0445",y:"\u043f\u0115\u0440 \u00e7\u0443\u043b",yy:"%d \u00e7\u0443\u043b"},ordinal:function(a){return"-\u043c\u0115\u0448"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("cv",a)})();

4
node_modules/moment/min/lang/da.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : danish (da)
// author : Ulrik Nielsen : https://github.com/mrbase
(function(){var a={months:"Januar_Februar_Marts_April_Maj_Juni_Juli_August_September_Oktober_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Maj_Jun_Jul_Aug_Sep_Okt_Nov_Dec".split("_"),weekdays:"S\u00f8ndag_Mandag_Tirsdag_Onsdag_Torsdag_Fredag_L\u00f8rdag".split("_"),weekdaysShort:"S\u00f8n_Man_Tir_Ons_Tor_Fre_L\u00f8r".split("_"),weekdaysMin:"S\u00f8_Ma_Ti_On_To_Fr_L\u00f8".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd D. MMMM, YYYY h:mm A"},calendar:{sameDay:"[I dag kl.] LT",nextDay:"[I morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[I g\u00e5r kl.] LT",lastWeek:"[sidste] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"f\u00e5 sekunder",m:"minut",mm:"%d minutter",h:"time",hh:"%d timer",d:"dag",dd:"%d dage",M:"m\u00e5nede",MM:"%d m\u00e5neder",y:"\u00e5r",yy:"%d \u00e5r"},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("da",a)})();

4
node_modules/moment/min/lang/de.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : german (de)
// author : lluchs : https://github.com/lluchs
(function(){var a={months:"Januar_Februar_M\u00e4rz_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("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),longDateFormat:{LT:"H:mm U\\hr",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[Heute um] LT",sameElse:"L",nextDay:"[Morgen um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gestern um] LT",lastWeek:"[letzten] dddd [um] LT"},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&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("de",a)})();

4
node_modules/moment/min/lang/en-ca.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : canadian english (en-ca)
// author : Jonathan Abourbih : https://github.com/jonbca
(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("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"YYYY-MM-DD",LL:"D MMMM, YYYY",LLL:"D MMMM, YYYY LT",LLLL:"dddd, D MMMM, YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},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&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-ca",a)})();

4
node_modules/moment/min/lang/en-gb.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : great britain english (en-gb)
// author : Chris Gedrim : https://github.com/chrisgedrim
(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("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[last] dddd [at] LT",sameElse:"L"},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&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("en-gb",a)})();

4
node_modules/moment/min/lang/es.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : spanish (es)
// author : Julio Napurí : https://github.com/julionc
(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\u00e9rcoles_Jueves_Viernes_S\u00e1bado".split("_"),weekdaysShort:"Dom._Lun._Mar._Mi\u00e9._Jue._Vie._S\u00e1b.".split("_"),weekdaysMin:"Do_Lu_Ma_Mi_Ju_Vi_S\u00e1".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoy a la"+(this.hours()!==1?"s":"")+"] LT"},nextDay:function(){return"[ma\u00f1ana a la"+(this.hours()!==1?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(this.hours()!==1?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(this.hours()!==1?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(this.hours()!==1?"s":"")+"] LT"},sameElse:"L"},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\u00eda",dd:"%d d\u00edas",M:"un mes",MM:"%d meses",y:"un a\u00f1o",yy:"%d a\u00f1os"},ordinal:function(a){return"\u00ba"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("es",a)})();

4
node_modules/moment/min/lang/et.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : estonian (et)
// author : Henry Kehlmann : https://github.com/madhenry
(function(){function a(a,b,c,d){var e=a;switch(c){case"s":return d||b?"paari sekundi":"paar sekundit";default:}return""}var b={months:"jaanuar_veebruar_m\u00e4rts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_m\u00e4rts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"p\u00fchap\u00e4ev_esmasp\u00e4ev_teisip\u00e4ev_kolmap\u00e4ev_neljap\u00e4ev_reede_laup\u00e4ev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY LT",LLLL:"dddd, D. MMMM YYYY LT"},calendar:{sameDay:"[T\u00e4na,] LT",nextDay:"[Homme,] LT",nextWeek:"[J\u00e4rgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s p\u00e4rast",past:"%s tagasi",s:a,m:"minut",mm:"%d minutit",h:"tund",hh:"%d tundi",d:"p\u00e4ev",dd:"%d p\u00e4eva",M:"kuu",MM:"%d kuud",y:"aasta",yy:"%d aastat"},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=b),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("et",b)})();

4
node_modules/moment/min/lang/eu.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : euskara (eu)
// author : Eneko Illarramendi : https://github.com/eillarra
(function(){var a={months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"YYYYko MMMMren D[a]",LLL:"YYYYko MMMMren D[a] LT",LLLL:"dddd, YYYYko MMMMren D[a] LT"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("eu",a)})();

4
node_modules/moment/min/lang/fi.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : finnish (fi)
// author : Tarmo Aidantausta : https://github.com/bleadof
(function(){function c(a,b,c,e){var f="";switch(c){case"s":return e?"muutaman sekunnin":"muutama sekunti";case"m":return e?"minuutin":"minuutti";case"mm":f=e?"minuutin":"minuuttia";break;case"h":return e?"tunnin":"tunti";case"hh":f=e?"tunnin":"tuntia";break;case"d":return e?"p\u00e4iv\u00e4n":"p\u00e4iv\u00e4";case"dd":f=e?"p\u00e4iv\u00e4n":"p\u00e4iv\u00e4\u00e4";break;case"M":return e?"kuukauden":"kuukausi";case"MM":f=e?"kuukauden":"kuukautta";break;case"y":return e?"vuoden":"vuosi";case"yy":f=e?"vuoden":"vuotta"}return f=d(a,e)+" "+f,f}function d(c,d){return c<10?d?b[c]:a[c]:c}var a=["nolla","yksi","kaksi","kolme","nelj\u00e4","viisi","kuusi","seitsem\u00e4n","kahdeksan","yhdeks\u00e4n"],b=["nolla","yhden","kahden","kolmen","nelj\u00e4n","viiden","kuuden",a[7],a[8],a[9]],e={months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kes\u00e4kuu_hein\u00e4kuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tam_hel_maa_huh_tou_kes_hei_elo_syy_lok_mar_jou".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",L:"DD.MM.YYYY",LL:"Do MMMMt\\a YYYY",LLL:"Do MMMMt\\a YYYY, klo LT",LLLL:"dddd, Do MMMMt\\a YYYY, klo LT"},calendar:{sameDay:"[t\u00e4n\u00e4\u00e4n] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s p\u00e4\u00e4st\u00e4",past:"%s sitten",s:c,m:c,mm:c,h:c,hh:c,d:c,dd:c,M:c,MM:c,y:c,yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=e),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fi",e)})();

4
node_modules/moment/min/lang/fr-ca.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : canadian french (fr-ca)
// author : Jonathan Abourbih : https://github.com/jonbca
(function(){var a={months:"janvier_f\u00e9vrier_mars_avril_mai_juin_juillet_ao\u00fbt_septembre_octobre_novembre_d\u00e9cembre".split("_"),monthsShort:"janv._f\u00e9vr._mars_avr._mai_juin_juil._ao\u00fbt_sept._oct._nov._d\u00e9c.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui \u00e0] LT",nextDay:"[Demain \u00e0] LT",nextWeek:"dddd [\u00e0] LT",lastDay:"[Hier \u00e0] LT",lastWeek:"dddd [dernier \u00e0] LT",sameElse:"L"},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\u00e9e",yy:"%d ann\u00e9es"},ordinal:function(a){return a===1?"er":"\u00e8me"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr-ca",a)})();

4
node_modules/moment/min/lang/fr.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : french (fr)
// author : John Fischer : https://github.com/jfroffice
(function(){var a={months:"janvier_f\u00e9vrier_mars_avril_mai_juin_juillet_ao\u00fbt_septembre_octobre_novembre_d\u00e9cembre".split("_"),monthsShort:"janv._f\u00e9vr._mars_avr._mai_juin_juil._ao\u00fbt_sept._oct._nov._d\u00e9c.".split("_"),weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"Di_Lu_Ma_Me_Je_Ve_Sa".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Aujourd'hui \u00e0] LT",nextDay:"[Demain \u00e0] LT",nextWeek:"dddd [\u00e0] LT",lastDay:"[Hier \u00e0] LT",lastWeek:"dddd [dernier \u00e0] LT",sameElse:"L"},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\u00e9e",yy:"%d ann\u00e9es"},ordinal:function(a){return a===1?"er":"\u00e8me"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("fr",a)})();

4
node_modules/moment/min/lang/gl.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : galician (gl)
// author : Juan G. Hurtado : https://github.com/juanghurtado
(function(){var a={months:"Xaneiro_Febreiro_Marzo_Abril_Maio_Xu\u00f1o_Xullo_Agosto_Setembro_Octubro_Novembro_Decembro".split("_"),monthsShort:"Xan._Feb._Mar._Abr._Mai._Xu\u00f1._Xul._Ago._Set._Out._Nov._Dec.".split("_"),weekdays:"Domingo_Luns_Martes_M\u00e9rcores_Xoves_Venres_S\u00e1bado".split("_"),weekdaysShort:"Dom._Lun._Mar._M\u00e9r._Xov._Ven._S\u00e1b.".split("_"),weekdaysMin:"Do_Lu_Ma_M\u00e9_Xo_Ve_S\u00e1".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:function(){return"[hoxe "+(this.hours()!==1?"\u00e1s":"a")+"] LT"},nextDay:function(){return"[ma\u00f1\u00e1 "+(this.hours()!==1?"\u00e1s":"a")+"] LT"},nextWeek:function(){return"dddd ["+(this.hours()!==1?"\u00e1s":"a")+"] LT"},lastDay:function(){return"[onte "+(this.hours()!==1?"\u00e1":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(this.hours()!==1?"\u00e1s":"a")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"fai %s",s:"uns segundo",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un d\u00eda",dd:"%d d\u00edas",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},ordinal:function(a){return"\u00ba"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("gl",a)})();

4
node_modules/moment/min/lang/hu.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : hungarian (hu)
// author : Adam Brunner : https://github.com/adambrunner
(function(){function a(a,b,c,d){var e=a;switch(c){case"s":return d||b?"n\u00e9h\u00e1ny m\u00e1sodperc":"n\u00e9h\u00e1ny m\u00e1sodperce";case"m":e="egy";case"mm":return e+(d||b?" perc":" perce");case"h":e="egy";case"hh":return e+(d||b?" \u00f3ra":" \u00f3r\u00e1ja");case"d":e="egy";case"dd":return e+(d||b?" nap":" napja");case"M":e="egy";case"MM":return e+(d||b?" h\u00f3nap":" h\u00f3napja");case"y":e="egy";case"yy":return e+(d||b?" \u00e9v":" \u00e9ve");default:}return""}function b(a){var b="";switch(this.day()){case 0:b="vas\u00e1rnap";break;case 1:b="h\u00e9tf\u0151n";break;case 2:b="kedden";break;case 3:b="szerd\u00e1n";break;case 4:b="cs\u00fct\u00f6rt\u00f6k\u00f6n";break;case 5:b="p\u00e9nteken";break;case 6:b="szombaton"}return(a?"":"m\u00falt ")+"["+b+"] LT[-kor]"}var c={months:"janu\u00e1r_febru\u00e1r_m\u00e1rcius_\u00e1prilis_m\u00e1jus_j\u00fanius_j\u00falius_augusztus_szeptember_okt\u00f3ber_november_december".split("_"),monthsShort:"jan_feb_m\u00e1rc_\u00e1pr_m\u00e1j_j\u00fan_j\u00fal_aug_szept_okt_nov_dec".split("_"),weekdays:"vas\u00e1rnap_h\u00e9tf\u0151_kedd_szerda_cs\u00fct\u00f6rt\u00f6k_p\u00e9ntek_szombat".split("_"),weekdaysShort:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D., LT",LLLL:"YYYY. MMMM D., dddd LT"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return b.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return b.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s m\u00falva",past:"%s",s:a,m:a,mm:a,h:a,hh:a,d:a,dd:a,M:a,MM:a,y:a,yy:a},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("hu",c)})();

4
node_modules/moment/min/lang/is.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : icelandic (is)
// author : Hinrik Örn Sigurðsson : https://github.com/hinrik
(function(){var a=function(a){return a%100==11?!0:a%10==1?!1:!0},b=function(b,c,d,e){var f=b+" ";switch(d){case"s":return c||e?"nokkrar sek\u00fandur":"nokkrum sek\u00fandum";case"m":return c?"m\u00edn\u00fata":"m\u00edn\u00fatu";case"mm":return a(b)?f+(c||e?"m\u00edn\u00fatur":"m\u00edn\u00fatum"):c?f+"m\u00edn\u00fata":f+"m\u00edn\u00fatu";case"hh":return a(b)?f+(c||e?"klukkustundir":"klukkustundum"):f+"klukkustund";case"d":return c?"dagur":e?"dag":"degi";case"dd":return a(b)?c?f+"dagar":f+(e?"daga":"d\u00f6gum"):c?f+"dagur":f+(e?"dag":"degi");case"M":return c?"m\u00e1nu\u00f0ur":e?"m\u00e1nu\u00f0":"m\u00e1nu\u00f0i";case"MM":return a(b)?c?f+"m\u00e1nu\u00f0ir":f+(e?"m\u00e1nu\u00f0i":"m\u00e1nu\u00f0um"):c?f+"m\u00e1nu\u00f0ur":f+(e?"m\u00e1nu\u00f0":"m\u00e1nu\u00f0i");case"y":return c||e?"\u00e1r":"\u00e1ri";case"yy":return a(b)?f+(c||e?"\u00e1r":"\u00e1rum"):f+(c||e?"\u00e1r":"\u00e1ri")}},c={months:"jan\u00faar_febr\u00faar_mars_apr\u00edl_ma\u00ed_j\u00fan\u00ed_j\u00fal\u00ed_\u00e1g\u00fast_september_okt\u00f3ber_n\u00f3vember_desember".split("_"),monthsShort:"jan_feb_mar_apr_ma\u00ed_j\u00fan_j\u00fal_\u00e1g\u00fa_sep_okt_n\u00f3v_des".split("_"),weekdays:"sunnudagur_m\u00e1nudagur_\u00feri\u00f0judagur_mi\u00f0vikudagur_fimmtudagur_f\u00f6studagur_laugardagur".split("_"),weekdaysShort:"sun_m\u00e1n_\u00feri_mi\u00f0_fim_f\u00f6s_lau".split("_"),weekdaysMin:"Su_M\u00e1_\u00der_Mi_Fi_F\u00f6_La".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY kl. LT",LLLL:"dddd, D. MMMM YYYY kl. LT"},calendar:{sameDay:"[\u00ed dag kl.] LT",nextDay:"[\u00e1 morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[\u00ed g\u00e6r kl.] LT",lastWeek:"[s\u00ed\u00f0asta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s s\u00ed\u00f0an",s:b,m:b,mm:b,h:"klukkustund",hh:b,d:b,dd:b,M:b,MM:b,y:b,yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("is",c)})();

4
node_modules/moment/min/lang/it.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : italian (it)
// author : Lorenzo : https://github.com/aliem
(function(){var a={months:"Gennaio_Febbraio_Marzo_Aprile_Maggio_Giugno_Luglio_Agosto_Settembre_Ottobre_Novembre_Dicembre".split("_"),monthsShort:"Gen_Feb_Mar_Apr_Mag_Giu_Lug_Ago_Set_Ott_Nov_Dic".split("_"),weekdays:"Domenica_Luned\u00ec_Marted\u00ec_Mercoled\u00ec_Gioved\u00ec_Venerd\u00ec_Sabato".split("_"),weekdaysShort:"Dom_Lun_Mar_Mer_Gio_Ven_Sab".split("_"),weekdaysMin:"D_L_Ma_Me_G_V_S".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:"[lo scorso] dddd [alle] LT",sameElse:"L"},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"\u00ba"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("it",a)})();

4
node_modules/moment/min/lang/ja.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : japanese (ja)
// author : LI Long : https://github.com/baryon
(function(){var a={months:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u65e5\u66dc\u65e5_\u6708\u66dc\u65e5_\u706b\u66dc\u65e5_\u6c34\u66dc\u65e5_\u6728\u66dc\u65e5_\u91d1\u66dc\u65e5_\u571f\u66dc\u65e5".split("_"),weekdaysShort:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),weekdaysMin:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),longDateFormat:{LT:"Ah\u6642m\u5206",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5LT",LLLL:"YYYY\u5e74M\u6708D\u65e5LT dddd"},meridiem:function(a,b,c){return a<12?"\u5348\u524d":"\u5348\u5f8c"},calendar:{sameDay:"[\u4eca\u65e5] LT",nextDay:"[\u660e\u65e5] LT",nextWeek:"[\u6765\u9031]dddd LT",lastDay:"[\u6628\u65e5] LT",lastWeek:"[\u524d\u9031]dddd LT",sameElse:"L"},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u6570\u79d2",m:"1\u5206",mm:"%d\u5206",h:"1\u6642\u9593",hh:"%d\u6642\u9593",d:"1\u65e5",dd:"%d\u65e5",M:"1\u30f6\u6708",MM:"%d\u30f6\u6708",y:"1\u5e74",yy:"%d\u5e74"},ordinal:function(a){return""}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ja",a)})();

6
node_modules/moment/min/lang/jp.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
// moment.js language configuration
// language : japanese (jp)
// author : LI Long : https://github.com/baryon
// This language config was incorrectly named 'jp' instead of 'ja'.
// In version 2.0.0, this will be deprecated and you should use 'ja' instead.
(function(){var a={months:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u65e5\u66dc\u65e5_\u6708\u66dc\u65e5_\u706b\u66dc\u65e5_\u6c34\u66dc\u65e5_\u6728\u66dc\u65e5_\u91d1\u66dc\u65e5_\u571f\u66dc\u65e5".split("_"),weekdaysShort:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),weekdaysMin:"\u65e5_\u6708_\u706b_\u6c34_\u6728_\u91d1_\u571f".split("_"),longDateFormat:{LT:"Ah\u6642m\u5206",L:"YYYY/MM/DD",LL:"YYYY\u5e74M\u6708D\u65e5",LLL:"YYYY\u5e74M\u6708D\u65e5LT",LLLL:"YYYY\u5e74M\u6708D\u65e5LT dddd"},meridiem:function(a,b,c){return a<12?"\u5348\u524d":"\u5348\u5f8c"},calendar:{sameDay:"[\u4eca\u65e5] LT",nextDay:"[\u660e\u65e5] LT",nextWeek:"[\u6765\u9031]dddd LT",lastDay:"[\u6628\u65e5] LT",lastWeek:"[\u524d\u9031]dddd LT",sameElse:"L"},relativeTime:{future:"%s\u5f8c",past:"%s\u524d",s:"\u6570\u79d2",m:"1\u5206",mm:"%d\u5206",h:"1\u6642\u9593",hh:"%d\u6642\u9593",d:"1\u65e5",dd:"%d\u65e5",M:"1\u30f6\u6708",MM:"%d\u30f6\u6708",y:"1\u5e74",yy:"%d\u5e74"},ordinal:function(a){return""}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("jp",a)})();

4
node_modules/moment/min/lang/ko.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : korean (ko)
// author : Kyungwook, Park : https://github.com/kyungw00k
(function(){var a={months:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),monthsShort:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),weekdays:"\uc77c\uc694\uc77c_\uc6d4\uc694\uc77c_\ud654\uc694\uc77c_\uc218\uc694\uc77c_\ubaa9\uc694\uc77c_\uae08\uc694\uc77c_\ud1a0\uc694\uc77c".split("_"),weekdaysShort:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),weekdaysMin:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),longDateFormat:{LT:"A h\uc2dc mm\ubd84",L:"YYYY.MM.DD",LL:"YYYY\ub144 MMMM D\uc77c",LLL:"YYYY\ub144 MMMM D\uc77c LT",LLLL:"YYYY\ub144 MMMM D\uc77c dddd LT"},meridiem:function(a,b,c){return a<12?"\uc624\uc804":"\uc624\ud6c4"},calendar:{sameDay:"\uc624\ub298 LT",nextDay:"\ub0b4\uc77c LT",nextWeek:"dddd LT",lastDay:"\uc5b4\uc81c LT",lastWeek:"\uc9c0\ub09c\uc8fc dddd LT",sameElse:"L"},relativeTime:{future:"%s \ud6c4",past:"%s \uc804",s:"\uba87\ucd08",ss:"%d\ucd08",m:"\uc77c\ubd84",mm:"%d\ubd84",h:"\ud55c\uc2dc\uac04",hh:"%d\uc2dc\uac04",d:"\ud558\ub8e8",dd:"%d\uc77c",M:"\ud55c\ub2ec",MM:"%d\ub2ec",y:"\uc77c\ub144",yy:"%d\ub144"},ordinal:function(a){return"\uc77c"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ko",a)})();

6
node_modules/moment/min/lang/kr.js generated vendored Normal file
View File

@@ -0,0 +1,6 @@
// moment.js language configuration
// language : korean (kr)
// author : Kyungwook, Park : https://github.com/kyungw00k
// This language config was incorrectly named 'kr' instead of 'ko'.
// In version 2.0.0, this will be deprecated and you should use 'ko' instead.
(function(){var a={months:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),monthsShort:"1\uc6d4_2\uc6d4_3\uc6d4_4\uc6d4_5\uc6d4_6\uc6d4_7\uc6d4_8\uc6d4_9\uc6d4_10\uc6d4_11\uc6d4_12\uc6d4".split("_"),weekdays:"\uc77c\uc694\uc77c_\uc6d4\uc694\uc77c_\ud654\uc694\uc77c_\uc218\uc694\uc77c_\ubaa9\uc694\uc77c_\uae08\uc694\uc77c_\ud1a0\uc694\uc77c".split("_"),weekdaysShort:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),weekdaysMin:"\uc77c_\uc6d4_\ud654_\uc218_\ubaa9_\uae08_\ud1a0".split("_"),longDateFormat:{LT:"A h\uc2dc mm\ubd84",L:"YYYY.MM.DD",LL:"YYYY\ub144 MMMM D\uc77c",LLL:"YYYY\ub144 MMMM D\uc77c LT",LLLL:"YYYY\ub144 MMMM D\uc77c dddd LT"},meridiem:function(a,b,c){return a<12?"\uc624\uc804":"\uc624\ud6c4"},calendar:{sameDay:"\uc624\ub298 LT",nextDay:"\ub0b4\uc77c LT",nextWeek:"dddd LT",lastDay:"\uc5b4\uc81c LT",lastWeek:"\uc9c0\ub09c\uc8fc dddd LT",sameElse:"L"},relativeTime:{future:"%s \ud6c4",past:"%s \uc804",s:"\uba87\ucd08",ss:"%d\ucd08",m:"\uc77c\ubd84",mm:"%d\ubd84",h:"\ud55c\uc2dc\uac04",hh:"%d\uc2dc\uac04",d:"\ud558\ub8e8",dd:"%d\uc77c",M:"\ud55c\ub2ec",MM:"%d\ub2ec",y:"\uc77c\ub144",yy:"%d\ub144"},ordinal:function(a){return"\uc77c"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("kr",a)})();

4
node_modules/moment/min/lang/nb.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : norwegian bokmål (nb)
// author : Espen Hovlandsdal : https://github.com/rexxars
(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\u00f8ndag_mandag_tirsdag_onsdag_torsdag_fredag_l\u00f8rdag".split("_"),weekdaysShort:"s\u00f8n_man_tir_ons_tor_fre_l\u00f8r".split("_"),weekdaysMin:"s\u00f8_ma_ti_on_to_fr_l\u00f8".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[I dag klokken] LT",nextDay:"[I morgen klokken] LT",nextWeek:"dddd [klokken] LT",lastDay:"[I g\u00e5r klokken] LT",lastWeek:"[Forrige] dddd [klokken] LT",sameElse:"L"},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\u00e5ned",MM:"%d m\u00e5neder",y:"ett \u00e5r",yy:"%d \u00e5r"},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nb",a)})();

4
node_modules/moment/min/lang/nl.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : dutch (nl)
// author : Joris Röling : https://github.com/jjupiter
(function(){var a="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),b="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),c={months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(c,d){return/-MMM-/.test(d)?b[c.month()]:a[c.month()]},weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"Zo_Ma_Di_Wo_Do_Vr_Za".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Vandaag om] LT",nextDay:"[Morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",m:"\u00e9\u00e9n minuut",mm:"%d minuten",h:"\u00e9\u00e9n uur",hh:"%d uur",d:"\u00e9\u00e9n dag",dd:"%d dagen",M:"\u00e9\u00e9n maand",MM:"%d maanden",y:"\u00e9\u00e9n jaar",yy:"%d jaar"},ordinal:function(a){return a===1||a===8||a>=20?"ste":"de"}};typeof module!="undefined"&&module.exports&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("nl",c)})();

4
node_modules/moment/min/lang/pl.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : polish (pl)
// author : Rafal Hirsz : https://github.com/evoL
(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\u0119";case"mm":return e+(a(b)?"minuty":"minut");case"h":return c?"godzina":"godzin\u0119";case"hh":return e+(a(b)?"godziny":"godzin");case"MM":return e+(a(b)?"miesi\u0105ce":"miesi\u0119cy");case"yy":return e+(a(b)?"lata":"lat")}},c={months:"stycze\u0144_luty_marzec_kwiecie\u0144_maj_czerwiec_lipiec_sierpie\u0144_wrzesie\u0144_pa\u017adziernik_listopad_grudzie\u0144".split("_"),monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_pa\u017a_lis_gru".split("_"),weekdays:"niedziela_poniedzia\u0142ek_wtorek_\u015broda_czwartek_pi\u0105tek_sobota".split("_"),weekdaysShort:"nie_pon_wt_\u015br_czw_pt_sb".split("_"),weekdaysMin:"N_Pn_Wt_\u015ar_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[Dzi\u015b o] LT",nextDay:"[Jutro o] LT",nextWeek:"[W] dddd [o] LT",lastDay:"[Wczoraj o] LT",lastWeek:"[W zesz\u0142y/\u0142\u0105] dddd [o] LT",sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",m:b,mm:b,h:b,hh:b,d:"1 dzie\u0144",dd:"%d dni",M:"miesi\u0105c",MM:b,y:"rok",yy:b},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=c),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pl",c)})();

4
node_modules/moment/min/lang/pt-br.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : brazilian portuguese (pt-br)
// author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira
(function(){var a={months:"Janeiro_Fevereiro_Mar\u00e7o_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\u00e7a-feira_Quarta-feira_Quinta-feira_Sexta-feira_S\u00e1bado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_S\u00e1b".split("_"),weekdaysMin:"Dom_2\u00aa_3\u00aa_4\u00aa_5\u00aa_6\u00aa_S\u00e1b".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},calendar:{sameDay:"[Hoje \u00e0s] LT",nextDay:"[Amanh\u00e3 \u00e0s] LT",nextWeek:"dddd [\u00e0s] LT",lastDay:"[Ontem \u00e0s] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[\u00daltimo] dddd [\u00e0s] LT":"[\u00daltima] dddd [\u00e0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atr\u00e1s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um m\u00eas",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"\u00ba"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt-br",a)})();

4
node_modules/moment/min/lang/pt.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : portuguese (pt)
// author : Jefferson : https://github.com/jalex79
(function(){var a={months:"Janeiro_Fevereiro_Mar\u00e7o_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\u00e7a-feira_Quarta-feira_Quinta-feira_Sexta-feira_S\u00e1bado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_S\u00e1b".split("_"),weekdaysMin:"Dom_2\u00aa_3\u00aa_4\u00aa_5\u00aa_6\u00aa_S\u00e1b".split("_"),longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D \\de MMMM \\de YYYY",LLL:"D \\de MMMM \\de YYYY LT",LLLL:"dddd, D \\de MMMM \\de YYYY LT"},calendar:{sameDay:"[Hoje \u00e0s] LT",nextDay:"[Amanh\u00e3 \u00e0s] LT",nextWeek:"dddd [\u00e0s] LT",lastDay:"[Ontem \u00e0s] LT",lastWeek:function(){return this.day()===0||this.day()===6?"[\u00daltimo] dddd [\u00e0s] LT":"[\u00daltima] dddd [\u00e0s] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"%s atr\u00e1s",s:"segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um m\u00eas",MM:"%d meses",y:"um ano",yy:"%d anos"},ordinal:function(a){return"\u00ba"}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("pt",a)})();

5
node_modules/moment/min/lang/ro.js generated vendored Normal file
View File

@@ -0,0 +1,5 @@
// moment.js language configuration
// language : romanian (ro)
// author : Vlad Gurdiga : https://github.com/gurdiga
// author : Valentin Agachi : https://github.com/avaly
(function(){var a={months:"Ianuarie_Februarie_Martie_Aprilie_Mai_Iunie_Iulie_August_Septembrie_Octombrie_Noiembrie_Decembrie".split("_"),monthsShort:"Ian_Feb_Mar_Apr_Mai_Iun_Iul_Aug_Sep_Oct_Noi_Dec".split("_"),weekdays:"Duminic\u0103_Luni_Mar\u0163i_Miercuri_Joi_Vineri_S\u00e2mb\u0103t\u0103".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_S\u00e2m".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_S\u00e2".split("_"),longDateFormat:{LT:"H:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[m\u00e2ine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s \u00een urm\u0103",s:"c\u00e2teva secunde",m:"un minut",mm:"%d minute",h:"o or\u0103",hh:"%d ore",d:"o zi",dd:"%d zile",M:"o lun\u0103",MM:"%d luni",y:"un an",yy:"%d ani"},ordinal:function(a){return""}};typeof module!="undefined"&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ro",a)})();

4
node_modules/moment/min/lang/ru.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : russian (ru)
// author : Viktorminator : https://github.com/Viktorminator
(function(){var a=[function(a){return a%10===1&&a%100!==11},function(a){return a%10>=2&&a%10<=4&&a%10%1===0&&(a%100<12||a%100>14)},function(a){return a%10===0||a%10>=5&&a%10<=9&&a%10%1===0||a%100>=11&&a%100<=14&&a%100%1===0},function(a){return!0}],b=function(b,c){var d=b.split("_"),e=Math.min(a.length,d.length),f=-1;while(++f<e)if(a[f](c))return d[f];return d[e-1]},c=function(a,c,d){var e={mm:"\u043c\u0438\u043d\u0443\u0442\u0430_\u043c\u0438\u043d\u0443\u0442\u044b_\u043c\u0438\u043d\u0443\u0442_\u043c\u0438\u043d\u0443\u0442\u044b",hh:"\u0447\u0430\u0441_\u0447\u0430\u0441\u0430_\u0447\u0430\u0441\u043e\u0432_\u0447\u0430\u0441\u0430",dd:"\u0434\u0435\u043d\u044c_\u0434\u043d\u044f_\u0434\u043d\u0435\u0439_\u0434\u043d\u044f",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u0430_\u043c\u0435\u0441\u044f\u0446\u0435\u0432_\u043c\u0435\u0441\u044f\u0446\u0430",yy:"\u0433\u043e\u0434_\u0433\u043e\u0434\u0430_\u043b\u0435\u0442_\u0433\u043e\u0434\u0430"};return d==="m"?c?"\u043c\u0438\u043d\u0443\u0442\u0430":"\u043c\u0438\u043d\u0443\u0442\u0443":a+" "+b(e[d],+a)},d=function(a,b){var c={nominative:"\u044f\u043d\u0432\u0430\u0440\u044c_\u0444\u0435\u0432\u0440\u0430\u043b\u044c_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0435\u043b\u044c_\u043c\u0430\u0439_\u0438\u044e\u043d\u044c_\u0438\u044e\u043b\u044c_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044c_\u043e\u043a\u0442\u044f\u0431\u0440\u044c_\u043d\u043e\u044f\u0431\u0440\u044c_\u0434\u0435\u043a\u0430\u0431\u0440\u044c".split("_"),accusative:"\u044f\u043d\u0432\u0430\u0440\u044f_\u0444\u0435\u0432\u0440\u0430\u043b\u044f_\u043c\u0430\u0440\u0442\u0430_\u0430\u043f\u0440\u0435\u043b\u044f_\u043c\u0430\u044f_\u0438\u044e\u043d\u044f_\u0438\u044e\u043b\u044f_\u0430\u0432\u0433\u0443\u0441\u0442\u0430_\u0441\u0435\u043d\u0442\u044f\u0431\u0440\u044f_\u043e\u043a\u0442\u044f\u0431\u0440\u044f_\u043d\u043e\u044f\u0431\u0440\u044f_\u0434\u0435\u043a\u0430\u0431\u0440\u044f".split("_")},d=/D[oD]? *MMMM?/.test(b)?"accusative":"nominative";return c[d][a.month()]},e=function(a,b){var c={nominative:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0430_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0430_\u0441\u0443\u0431\u0431\u043e\u0442\u0430".split("_"),accusative:"\u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u0435_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u044c\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u0435\u0434\u0443_\u0447\u0435\u0442\u0432\u0435\u0440\u0433_\u043f\u044f\u0442\u043d\u0438\u0446\u0443_\u0441\u0443\u0431\u0431\u043e\u0442\u0443".split("_")},d=/\[ ?[Вв] ?(?:прошлую|следующую)? ?\] ?dddd/.test(b)?"accusative":"nominative";return c[d][a.day()]},f={months:d,monthsShort:"\u044f\u043d\u0432_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u0438\u044e\u043d_\u0438\u044e\u043b_\u0430\u0432\u0433_\u0441\u0435\u043d_\u043e\u043a\u0442_\u043d\u043e\u044f_\u0434\u0435\u043a".split("_"),weekdays:e,weekdaysShort:"\u0432\u0441\u043a_\u043f\u043d\u0434_\u0432\u0442\u0440_\u0441\u0440\u0434_\u0447\u0442\u0432_\u043f\u0442\u043d_\u0441\u0431\u0442".split("_"),weekdaysMin:"\u0432\u0441_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., LT",LLLL:"dddd, D MMMM YYYY \u0433., LT"},calendar:{sameDay:"[\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0432] LT",nextDay:"[\u0417\u0430\u0432\u0442\u0440\u0430 \u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432] LT",nextWeek:function(){return this.day()===2?"[\u0412\u043e] dddd [\u0432] LT":"[\u0412] dddd [\u0432] LT"},lastWeek:function(){switch(this.day()){case 0:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0435] dddd [\u0432] LT";case 1:case 2:case 4:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u044b\u0439] dddd [\u0432] LT";case 3:case 5:case 6:return"[\u0412 \u043f\u0440\u043e\u0448\u043b\u0443\u044e] dddd [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0447\u0435\u0440\u0435\u0437 %s",past:"%s \u043d\u0430\u0437\u0430\u0434",s:"\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434",m:c,mm:c,h:"\u0447\u0430\u0441",hh:c,d:"\u0434\u0435\u043d\u044c",dd:c,M:"\u043c\u0435\u0441\u044f\u0446",MM:c,y:"\u0433\u043e\u0434",yy:c},ordinal:function(a){return"."}};typeof module!="undefined"&&module.exports&&(module.exports=f),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("ru",f)})();

4
node_modules/moment/min/lang/sv.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : swedish (sv)
// author : Jens Alm : https://github.com/ulmus
(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\u00f6ndag_m\u00e5ndag_tisdag_onsdag_torsdag_fredag_l\u00f6rdag".split("_"),weekdaysShort:"s\u00f6n_m\u00e5n_tis_ons_tor_fre_l\u00f6r".split("_"),weekdaysMin:"s\u00f6_m\u00e5_ti_on_to_fr_l\u00f6".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Idag klockan] LT",nextDay:"[Imorgon klockan] LT",lastDay:"[Ig\u00e5r klockan] LT",nextWeek:"dddd [klockan] LT",lastWeek:"[F\u00f6rra] dddd[en klockan] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"f\u00f6r %s sen",s:"n\u00e5gra sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en m\u00e5nad",MM:"%d m\u00e5nader",y:"ett \u00e5r",yy:"%d \u00e5r"},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&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("sv",a)})();

5
node_modules/moment/min/lang/tr.js generated vendored Normal file
View File

@@ -0,0 +1,5 @@
// moment.js language configuration
// language : turkish (tr)
// authors : Erhan Gundogan : https://github.com/erhangundogan,
// Burak Yiğit Kaya: https://github.com/BYK
(function(){var a={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'\u00fcnc\u00fc",4:"'\u00fcnc\u00fc",100:"'\u00fcnc\u00fc",6:"'nc\u0131",9:"'uncu",10:"'uncu",30:"'uncu",60:"'\u0131nc\u0131",90:"'\u0131nc\u0131"},b={months:"Ocak_\u015eubat_Mart_Nisan_May\u0131s_Haziran_Temmuz_A\u011fustos_Eyl\u00fcl_Ekim_Kas\u0131m_Aral\u0131k".split("_"),monthsShort:"Oca_\u015eub_Mar_Nis_May_Haz_Tem_A\u011fu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Sal\u0131_\u00c7ar\u015famba_Per\u015fembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pts_Sal_\u00c7ar_Per_Cum_Cts".split("_"),weekdaysMin:"Pz_Pt_Sa_\u00c7a_Pe_Cu_Ct".split("_"),longDateFormat:{LT:"HH:mm",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd, D MMMM YYYY LT"},calendar:{sameDay:"[bug\u00fcn saat] LT",nextDay:"[yar\u0131n saat] LT",nextWeek:"[haftaya] dddd [saat] LT",lastDay:"[d\u00fcn] LT",lastWeek:"[ge\u00e7en hafta] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \u00f6nce",s:"birka\u00e7 saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir g\u00fcn",dd:"%d g\u00fcn",M:"bir ay",MM:"%d ay",y:"bir y\u0131l",yy:"%d y\u0131l"},ordinal:function(b){if(b===0)return"'\u0131nc\u0131";var c=b%10,d=b%100-c,e=b>=100?100:null;return a[c]||a[d]||a[e]}};typeof module!="undefined"&&module.exports&&(module.exports=b),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("tr",b)})();

4
node_modules/moment/min/lang/zh-cn.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : chinese
// author : suupic : https://github.com/suupic
(function(){var a={months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u5468\u65e5_\u5468\u4e00_\u5468\u4e8c_\u5468\u4e09_\u5468\u56db_\u5468\u4e94_\u5468\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"Ah\u70b9mm",L:"YYYY\u5e74MMMD\u65e5",LL:"YYYY\u5e74MMMD\u65e5",LLL:"YYYY\u5e74MMMD\u65e5LT",LLLL:"YYYY\u5e74MMMD\u65e5ddddLT"},meridiem:function(a,b,c){return a<9?"\u65e9\u4e0a":a<11&&b<30?"\u4e0a\u5348":a<13&&b<30?"\u4e2d\u5348":a<18?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:"[\u4e0b]ddddLT",lastDay:"[\u6628\u5929]LT",lastWeek:"[\u4e0a]ddddLT",sameElse:"L"},relativeTime:{future:"%s\u5185",past:"%s\u524d",s:"\u51e0\u79d2",m:"1\u5206\u949f",mm:"%d\u5206\u949f",h:"1\u5c0f\u65f6",hh:"%d\u5c0f\u65f6",d:"1\u5929",dd:"%d\u5929",M:"1\u4e2a\u6708",MM:"%d\u4e2a\u6708",y:"1\u5e74",yy:"%d\u5e74"},ordinal:function(a){return""}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-cn",a)})();

4
node_modules/moment/min/lang/zh-tw.js generated vendored Normal file
View File

@@ -0,0 +1,4 @@
// moment.js language configuration
// language : traditional chinese (zh-tw)
// author : Ben : https://github.com/ben-lin
(function(){var a={months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u9031\u65e5_\u9031\u4e00_\u9031\u4e8c_\u9031\u4e09_\u9031\u56db_\u9031\u4e94_\u9031\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),longDateFormat:{LT:"Ah\u9edemm",L:"YYYY\u5e74MMMD\u65e5",LL:"YYYY\u5e74MMMD\u65e5",LLL:"YYYY\u5e74MMMD\u65e5LT",LLLL:"YYYY\u5e74MMMD\u65e5ddddLT"},meridiem:function(a,b,c){return a<9?"\u65e9\u4e0a":a<11&&b<30?"\u4e0a\u5348":a<13&&b<30?"\u4e2d\u5348":a<18?"\u4e0b\u5348":"\u665a\u4e0a"},calendar:{sameDay:"[\u4eca\u5929]LT",nextDay:"[\u660e\u5929]LT",nextWeek:"[\u4e0b]ddddLT",lastDay:"[\u6628\u5929]LT",lastWeek:"[\u4e0a]ddddLT",sameElse:"L"},relativeTime:{future:"%s\u5167",past:"%s\u524d",s:"\u5e7e\u79d2",m:"\u4e00\u5206\u9418",mm:"%d\u5206\u9418",h:"\u4e00\u5c0f\u6642",hh:"%d\u5c0f\u6642",d:"\u4e00\u5929",dd:"%d\u5929",M:"\u4e00\u500b\u6708",MM:"%d\u500b\u6708",y:"\u4e00\u5e74",yy:"%d\u5e74"},ordinal:function(a){return""}};typeof module!="undefined"&&module.exports&&(module.exports=a),typeof window!="undefined"&&this.moment&&this.moment.lang&&this.moment.lang("zh-tw",a)})();

6
node_modules/moment/min/moment.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

506
node_modules/moment/min/moment.min.pretty.js generated vendored Normal file
View File

@@ -0,0 +1,506 @@
// moment.js
// version : 1.7.2
// author : Tim Wood
// license : MIT
// momentjs.com
(function(a) {
function E(a, b, c, d) {
var e = c.lang();
return e[a].call ? e[a](c, d) : e[a][b];
}
function F(a, b) {
return function(c) {
return K(a.call(this, c), b);
};
}
function G(a) {
return function(b) {
var c = a.call(this, b);
return c + this.lang().ordinal(c);
};
}
function H(a, b, c) {
this._d = a, this._isUTC = !!b, this._a = a._a || null, this._lang = c || !1;
}
function I(a) {
var b = this._data = {}, c = a.years || a.y || 0, d = a.months || a.M || 0, e = a.weeks || a.w || 0, f = a.days || a.d || 0, g = a.hours || a.h || 0, h = a.minutes || a.m || 0, i = a.seconds || a.s || 0, j = a.milliseconds || a.ms || 0;
this._milliseconds = j + i * 1e3 + h * 6e4 + g * 36e5, this._days = f + e * 7, this._months = d + c * 12, b.milliseconds = j % 1e3, i += J(j / 1e3), b.seconds = i % 60, h += J(i / 60), b.minutes = h % 60, g += J(h / 60), b.hours = g % 24, f += J(g / 24), f += e * 7, b.days = f % 30, d += J(f / 30), b.months = d % 12, c += J(d / 12), b.years = c, this._lang = !1;
}
function J(a) {
return a < 0 ? Math.ceil(a) : Math.floor(a);
}
function K(a, b) {
var c = a + "";
while (c.length < b) c = "0" + c;
return c;
}
function L(a, b, c) {
var d = b._milliseconds, e = b._days, f = b._months, g;
d && a._d.setTime(+a + d * c), e && a.date(a.date() + e * c), f && (g = a.date(), a.date(1).month(a.month() + f * c).date(Math.min(g, a.daysInMonth())));
}
function M(a) {
return Object.prototype.toString.call(a) === "[object Array]";
}
function N(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 O(a, b, c, d) {
var e, f, g = [];
for (e = 0; e < 7; e++) g[e] = a[e] = a[e] == null ? e === 2 ? 1 : 0 : a[e];
return a[7] = g[7] = b, a[8] != null && (g[8] = a[8]), a[3] += c || 0, a[4] += d || 0, f = new Date(0), b ? (f.setUTCFullYear(a[0], a[1], a[2]), f.setUTCHours(a[3], a[4], a[5], a[6])) : (f.setFullYear(a[0], a[1], a[2]), f.setHours(a[3], a[4], a[5], a[6])), f._a = g, f;
}
function P(a, c) {
var d, e, g = [];
!c && h && (c = require("./lang/" + a));
for (d = 0; d < i.length; d++) c[i[d]] = c[i[d]] || f.en[i[d]];
for (d = 0; d < 12; d++) e = b([ 2e3, d ]), g[d] = new RegExp("^" + (c.months[d] || c.months(e, "")) + "|^" + (c.monthsShort[d] || c.monthsShort(e, "")).replace(".", ""), "i");
return c.monthsParse = c.monthsParse || g, f[a] = c, c;
}
function Q(a) {
var c = typeof a == "string" && a || a && a._lang || null;
return c ? f[c] || P(c) : b;
}
function R(a) {
return a.match(/\[.*\]/) ? a.replace(/^\[|\]$/g, "") : a.replace(/\\/g, "");
}
function S(a) {
var b = a.match(k), c, d;
for (c = 0, d = b.length; c < d; c++) D[b[c]] ? b[c] = D[b[c]] : b[c] = R(b[c]);
return function(e) {
var f = "";
for (c = 0; c < d; c++) f += typeof b[c].call == "function" ? b[c].call(e, a) : b[c];
return f;
};
}
function T(a, b) {
function d(b) {
return a.lang().longDateFormat[b] || b;
}
var c = 5;
while (c-- && l.test(b)) b = b.replace(l, d);
return A[b] || (A[b] = S(b)), A[b](a);
}
function U(a) {
switch (a) {
case "DDDD":
return p;
case "YYYY":
return q;
case "S":
case "SS":
case "SSS":
case "DDD":
return o;
case "MMM":
case "MMMM":
case "dd":
case "ddd":
case "dddd":
case "a":
case "A":
return r;
case "Z":
case "ZZ":
return s;
case "T":
return t;
case "MM":
case "DD":
case "YY":
case "HH":
case "hh":
case "mm":
case "ss":
case "M":
case "D":
case "d":
case "H":
case "h":
case "m":
case "s":
return n;
default:
return new RegExp(a.replace("\\", ""));
}
}
function V(a, b, c, d) {
var e, f;
switch (a) {
case "M":
case "MM":
c[1] = b == null ? 0 : ~~b - 1;
break;
case "MMM":
case "MMMM":
for (e = 0; e < 12; e++) if (Q().monthsParse[e].test(b)) {
c[1] = e, f = !0;
break;
}
f || (c[8] = !1);
break;
case "D":
case "DD":
case "DDD":
case "DDDD":
b != null && (c[2] = ~~b);
break;
case "YY":
c[0] = ~~b + (~~b > 70 ? 1900 : 2e3);
break;
case "YYYY":
c[0] = ~~Math.abs(b);
break;
case "a":
case "A":
d.isPm = (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;
break;
case "S":
case "SS":
case "SSS":
c[6] = ~~(("0." + b) * 1e3);
break;
case "Z":
case "ZZ":
d.isUTC = !0, e = (b + "").match(x), e && e[1] && (d.tzh = ~~e[1]), e && e[2] && (d.tzm = ~~e[2]), e && e[0] === "+" && (d.tzh = -d.tzh, d.tzm = -d.tzm);
}
b == null && (c[8] = !1);
}
function W(a, b) {
var c = [ 0, 0, 1, 0, 0, 0, 0 ], d = {
tzh: 0,
tzm: 0
}, e = b.match(k), f, g;
for (f = 0; f < e.length; f++) g = (U(e[f]).exec(a) || [])[0], g && (a = a.slice(a.indexOf(g) + g.length)), D[e[f]] && V(e[f], g, c, d);
return d.isPm && c[3] < 12 && (c[3] += 12), d.isPm === !1 && c[3] === 12 && (c[3] = 0), O(c, d.isUTC, d.tzh, d.tzm);
}
function X(a, b) {
var c, d = a.match(m) || [], e, f = 99, g, h, i;
for (g = 0; g < b.length; g++) h = W(a, b[g]), e = T(new H(h), b[g]).match(m) || [], i = N(d, e), i < f && (f = i, c = h);
return c;
}
function Y(a) {
var b = "YYYY-MM-DDT", c;
if (u.exec(a)) {
for (c = 0; c < 4; c++) if (w[c][1].exec(a)) {
b += w[c][0];
break;
}
return s.exec(a) ? W(a, b + " Z") : W(a, b);
}
return new Date(a);
}
function Z(a, b, c, d, e) {
var f = e.relativeTime[a];
return typeof f == "function" ? f(b || 1, !!c, a, d) : f.replace(/%d/i, b || 1);
}
function $(a, b, c) {
var e = d(Math.abs(a) / 1e3), f = d(e / 60), g = d(f / 60), h = d(g / 24), i = d(h / 365), j = e < 45 && [ "s", e ] || f === 1 && [ "m" ] || f < 45 && [ "mm", f ] || g === 1 && [ "h" ] || g < 22 && [ "hh", g ] || h === 1 && [ "d" ] || h <= 25 && [ "dd", h ] || h <= 45 && [ "M" ] || h < 345 && [ "MM", d(h / 30) ] || i === 1 && [ "y" ] || [ "yy", i ];
return j[2] = b, j[3] = a > 0, j[4] = c, Z.apply({}, j);
}
function _(a, c) {
b.fn[a] = function(a) {
var b = this._isUTC ? "UTC" : "";
return a != null ? (this._d["set" + b + c](a), this) : this._d["get" + b + c]();
};
}
function ab(a) {
b.duration.fn[a] = function() {
return this._data[a];
};
}
function bb(a, c) {
b.duration.fn["as" + a] = function() {
return +this / c;
};
}
var b, c = "1.7.2", d = Math.round, e, f = {}, g = "en", h = typeof module != "undefined" && module.exports, i = "months|monthsShort|weekdays|weekdaysShort|weekdaysMin|longDateFormat|calendar|relativeTime|ordinal|meridiem".split("|"), j = /^\/?Date\((\-?\d+)/i, k = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|SS?S?|zz?|ZZ?|.)/g, l = /(\[[^\[]*\])|(\\)?(LT|LL?L?L?)/g, m = /([0-9a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+)/gi, n = /\d\d?/, o = /\d{1,3}/, p = /\d{3}/, q = /\d{1,4}/, r = /[0-9a-z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+/i, s = /Z|[\+\-]\d\d:?\d\d/i, t = /T/i, u = /^\s*\d{4}-\d\d-\d\d(T(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/, v = "YYYY-MM-DDTHH:mm:ssZ", w = [ [ "HH:mm:ss.S", /T\d\d:\d\d:\d\d\.\d{1,3}/ ], [ "HH:mm:ss", /T\d\d:\d\d:\d\d/ ], [ "HH:mm", /T\d\d:\d\d/ ], [ "HH", /T\d\d/ ] ], x = /([\+\-]|\d\d)/gi, y = "Month|Date|Hours|Minutes|Seconds|Milliseconds".split("|"), z = {
Milliseconds: 1,
Seconds: 1e3,
Minutes: 6e4,
Hours: 36e5,
Days: 864e5,
Months: 2592e6,
Years: 31536e6
}, A = {}, B = "DDD w M D d".split(" "), C = "M D H h m s w".split(" "), D = {
M: function() {
return this.month() + 1;
},
MMM: function(a) {
return E("monthsShort", this.month(), this, a);
},
MMMM: function(a) {
return E("months", this.month(), this, a);
},
D: function() {
return this.date();
},
DDD: function() {
var a = new Date(this.year(), this.month(), this.date()), b = new Date(this.year(), 0, 1);
return ~~((a - b) / 864e5 + 1.5);
},
d: function() {
return this.day();
},
dd: function(a) {
return E("weekdaysMin", this.day(), this, a);
},
ddd: function(a) {
return E("weekdaysShort", this.day(), this, a);
},
dddd: function(a) {
return E("weekdays", this.day(), this, a);
},
w: function() {
var a = new Date(this.year(), this.month(), this.date() - this.day() + 5), b = new Date(a.getFullYear(), 0, 4);
return ~~((a - b) / 864e5 / 7 + 1.5);
},
YY: function() {
return K(this.year() % 100, 2);
},
YYYY: function() {
return K(this.year(), 4);
},
a: function() {
return this.lang().meridiem(this.hours(), this.minutes(), !0);
},
A: function() {
return this.lang().meridiem(this.hours(), this.minutes(), !1);
},
H: function() {
return this.hours();
},
h: function() {
return this.hours() % 12 || 12;
},
m: function() {
return this.minutes();
},
s: function() {
return this.seconds();
},
S: function() {
return ~~(this.milliseconds() / 100);
},
SS: function() {
return K(~~(this.milliseconds() / 10), 2);
},
SSS: function() {
return K(this.milliseconds(), 3);
},
Z: function() {
var a = -this.zone(), b = "+";
return a < 0 && (a = -a, b = "-"), b + K(~~(a / 60), 2) + ":" + K(~~a % 60, 2);
},
ZZ: function() {
var a = -this.zone(), b = "+";
return a < 0 && (a = -a, b = "-"), b + K(~~(10 * a / 6), 4);
}
};
while (B.length) e = B.pop(), D[e + "o"] = G(D[e]);
while (C.length) e = C.pop(), D[e + e] = F(D[e], 2);
D.DDDD = F(D.DDD, 3), b = function(c, d) {
if (c === null || c === "") return null;
var e, f;
return b.isMoment(c) ? new H(new Date(+c._d), c._isUTC, c._lang) : (d ? M(d) ? e = X(c, d) : e = W(c, d) : (f = j.exec(c), e = c === a ? new Date : f ? new Date(+f[1]) : c instanceof Date ? c : M(c) ? O(c) : typeof c == "string" ? Y(c) : new Date(c)), new H(e));
}, b.utc = function(a, c) {
return M(a) ? new H(O(a, !0), !0) : (typeof a == "string" && !s.exec(a) && (a += " +0000", c && (c += " Z")), b(a, c).utc());
}, b.unix = function(a) {
return b(a * 1e3);
}, b.duration = function(a, c) {
var d = b.isDuration(a), e = typeof a == "number", f = d ? a._data : e ? {} : a, g;
return e && (c ? f[c] = a : f.milliseconds = a), g = new I(f), d && (g._lang = a._lang), g;
}, b.humanizeDuration = function(a, c, d) {
return b.duration(a, c === !0 ? null : c).humanize(c === !0 ? !0 : d);
}, b.version = c, b.defaultFormat = v, b.lang = function(a, c) {
var d;
if (!a) return g;
(c || !f[a]) && P(a, c);
if (f[a]) {
for (d = 0; d < i.length; d++) b[i[d]] = f[a][i[d]];
b.monthsParse = f[a].monthsParse, g = a;
}
}, b.langData = Q, b.isMoment = function(a) {
return a instanceof H;
}, b.isDuration = function(a) {
return a instanceof I;
}, b.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("_"),
weekdaysMin: "Su_Mo_Tu_We_Th_Fr_Sa".split("_"),
longDateFormat: {
LT: "h:mm A",
L: "MM/DD/YYYY",
LL: "MMMM D YYYY",
LLL: "MMMM D YYYY LT",
LLLL: "dddd, MMMM D YYYY LT"
},
meridiem: function(a, b, c) {
return a > 11 ? c ? "pm" : "PM" : c ? "am" : "AM";
},
calendar: {
sameDay: "[Today at] LT",
nextDay: "[Tomorrow at] LT",
nextWeek: "dddd [at] LT",
lastDay: "[Yesterday at] LT",
lastWeek: "[last] dddd [at] LT",
sameElse: "L"
},
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";
}
}), b.fn = H.prototype = {
clone: function() {
return b(this);
},
valueOf: function() {
return +this._d;
},
unix: function() {
return Math.floor(+this._d / 1e3);
},
toString: function() {
return this._d.toString();
},
toDate: function() {
return this._d;
},
toArray: function() {
var a = this;
return [ a.year(), a.month(), a.date(), a.hours(), a.minutes(), a.seconds(), a.milliseconds(), !!this._isUTC ];
},
isValid: function() {
return this._a ? this._a[8] != null ? !!this._a[8] : !N(this._a, (this._a[7] ? b.utc(this._a) : b(this._a)).toArray()) : !isNaN(this._d.getTime());
},
utc: function() {
return this._isUTC = !0, this;
},
local: function() {
return this._isUTC = !1, this;
},
format: function(a) {
return T(this, a ? a : b.defaultFormat);
},
add: function(a, c) {
var d = c ? b.duration(+c, a) : b.duration(a);
return L(this, d, 1), this;
},
subtract: function(a, c) {
var d = c ? b.duration(+c, a) : b.duration(a);
return L(this, d, -1), this;
},
diff: function(a, c, e) {
var f = this._isUTC ? b(a).utc() : b(a).local(), g = (this.zone() - f.zone()) * 6e4, h = this._d - f._d - g, i = this.year() - f.year(), j = this.month() - f.month(), k = this.date() - f.date(), l;
return c === "months" ? l = i * 12 + j + k / 30 : c === "years" ? l = i + (j + k / 30) / 12 : l = c === "seconds" ? h / 1e3 : c === "minutes" ? h / 6e4 : c === "hours" ? h / 36e5 : c === "days" ? h / 864e5 : c === "weeks" ? h / 6048e5 : h, e ? l : d(l);
},
from: function(a, c) {
return b.duration(this.diff(a)).lang(this._lang).humanize(!c);
},
fromNow: function(a) {
return this.from(b(), a);
},
calendar: function() {
var a = this.diff(b().sod(), "days", !0), c = this.lang().calendar, d = c.sameElse, e = a < -6 ? d : a < -1 ? c.lastWeek : a < 0 ? c.lastDay : a < 1 ? c.sameDay : a < 2 ? c.nextDay : a < 7 ? c.nextWeek : d;
return this.format(typeof e == "function" ? e.apply(this) : e);
},
isLeapYear: function() {
var a = this.year();
return a % 4 === 0 && a % 100 !== 0 || a % 400 === 0;
},
isDST: function() {
return this.zone() < b([ this.year() ]).zone() || this.zone() < b([ this.year(), 5 ]).zone();
},
day: function(a) {
var b = this._isUTC ? this._d.getUTCDay() : this._d.getDay();
return a == null ? b : this.add({
d: a - b
});
},
startOf: function(a) {
switch (a.replace(/s$/, "")) {
case "year":
this.month(0);
case "month":
this.date(1);
case "day":
this.hours(0);
case "hour":
this.minutes(0);
case "minute":
this.seconds(0);
case "second":
this.milliseconds(0);
}
return this;
},
endOf: function(a) {
return this.startOf(a).add(a.replace(/s?$/, "s"), 1).subtract("ms", 1);
},
sod: function() {
return this.clone().startOf("day");
},
eod: function() {
return this.clone().endOf("day");
},
zone: function() {
return this._isUTC ? 0 : this._d.getTimezoneOffset();
},
daysInMonth: function() {
return b.utc([ this.year(), this.month() + 1, 0 ]).date();
},
lang: function(b) {
return b === a ? Q(this) : (this._lang = b, this);
}
};
for (e = 0; e < y.length; e++) _(y[e].toLowerCase(), y[e]);
_("year", "FullYear"), b.duration.fn = I.prototype = {
weeks: function() {
return J(this.days() / 7);
},
valueOf: function() {
return this._milliseconds + this._days * 864e5 + this._months * 2592e6;
},
humanize: function(a) {
var b = +this, c = this.lang().relativeTime, d = $(b, !a, this.lang()), e = b <= 0 ? c.past : c.future;
return a && (typeof e == "function" ? d = e(d) : d = e.replace(/%s/i, d)), d;
},
lang: b.fn.lang
};
for (e in z) z.hasOwnProperty(e) && (bb(e, z[e]), ab(e.toLowerCase()));
bb("Weeks", 6048e5), h && (module.exports = b), typeof ender == "undefined" && (this.moment = b), typeof define == "function" && define.amd && define("moment", [], function() {
return b;
});
}).call(this);

1213
node_modules/moment/moment.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

64
node_modules/moment/package.json generated vendored Normal file
View File

@@ -0,0 +1,64 @@
{
"name": "moment",
"version": "1.7.2",
"description": "Parse, manipulate, and display dates.",
"homepage": "http://momentjs.com",
"author": {
"name": "Tim Wood",
"email": "washwithcare@gmail.com",
"url": "http://timwoodcreates.com/"
},
"contributors": [
{
"name": "Rocky Meza",
"url": "http://rockymeza.com"
}
],
"keywords": [
"moment",
"date",
"time",
"parse",
"format",
"validate",
"i18n",
"l10n",
"ender"
],
"main": "./moment.js",
"engines": {
"node": "*"
},
"repository": {
"type": "git",
"url": "git://github.com/timrwood/moment.git"
},
"bugs": {
"url": "https://github.com/timrwood/moment/issues"
},
"licenses": [
{
"type": "MIT"
}
],
"devDependencies": {
"jshint": "latest",
"uglify-js": "latest",
"nodeunit": "latest"
},
"scripts": {
"test": "make test"
},
"ender": "./ender.js",
"_id": "moment@1.7.2",
"dependencies": {},
"optionalDependencies": {},
"_engineSupported": true,
"_npmVersion": "1.1.21",
"_nodeVersion": "v0.6.18",
"_defaultsLoaded": true,
"dist": {
"shasum": "b600d61504bb5c90fa9d1026d3dc98f5091b78d0"
},
"_from": "moment"
}

198
node_modules/moment/readme.md generated vendored Normal file
View File

@@ -0,0 +1,198 @@
[Moment.js](http://momentjs.com)
================================
A lightweight javascript date library for parsing, validating, manipulating, and formatting dates.
### [Check out the website](http://momentjs.com)
### [Read the documentation](http://momentjs.com/docs/)
### [Run the unit tests](http://momentjs.com/test/)
Upgrading to 1.6.0
==================
There are a few things being deprecated in the 1.6.0 release.
1. The format tokens `z` and `zz` (timezone abbreviations like EST CST MST etc) will no longer be supported. Due to inconsistent browser support, we are unable to consistently produce this value. See [this issue](https://github.com/timrwood/moment/issues/162) for more background.
2. The method `moment.fn.native` is deprecated in favor of `moment.fn.toDate`. There continue to be issues with Google Closure Compiler throwing errors when using `native`, even in valid instances.
3. The way to customize am/pm strings is being changed. This would only affect you if you created a custom language file. For more information, see [this issue](https://github.com/timrwood/moment/pull/222).
Changelog
=========
### 1.7.0 [See discussion](https://github.com/timrwood/moment/issues/288)
Added `moment.fn.endOf()` and `moment.fn.startOf()`.
Added validation via `moment.fn.isValid()`.
Made formatting method 3x faster. http://jsperf.com/momentjs-cached-format-functions
Add support for month/weekday callbacks in `moment.fn.format()`
Added instance specific languages.
Added two letter weekday abbreviations with the formatting token `dd`.
Various language updates.
Various bugfixes.
### 1.6.0 [See discussion](https://github.com/timrwood/moment/pull/268)
Added Durations.
Revamped parser to support parsing non-separated strings (YYYYMMDD vs YYYY-MM-DD).
Added support for millisecond parsing and formatting tokens (S SS SSS)
Added a getter for `moment.lang()`
Various bugfixes.
### 1.5.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=10&page=1&state=closed)
Added UTC mode.
Added automatic ISO8601 parsing.
Various bugfixes.
### 1.4.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=8&state=closed)
Added `moment.fn.toDate` as a replacement for `moment.fn.native`.
Added `moment.fn.sod` and `moment.fn.eod` to get the start and end of day.
Various bugfixes.
### 1.3.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=7&state=closed)
Added support for parsing month names in the current language.
Added escape blocks for parsing tokens.
Added `moment.fn.calendar` to format strings like 'Today 2:30 PM', 'Tomorrow 1:25 AM', and 'Last Sunday 4:30 AM'.
Added `moment.fn.day` as a setter.
Various bugfixes
### 1.2.0 [See milestone](https://github.com/timrwood/moment/issues?milestone=4&state=closed)
Added timezones to parser and formatter.
Added `moment.fn.isDST`.
Added `moment.fn.zone` to get the timezone offset in minutes.
### 1.1.2 [See milestone](https://github.com/timrwood/moment/issues?milestone=6&state=closed)
Various bugfixes
### 1.1.1 [See milestone](https://github.com/timrwood/moment/issues?milestone=5&state=closed)
Added time specific diffs (months, days, hours, etc)
### 1.1.0
Added `moment.fn.format` localized masks. 'L LL LLL LLLL' [issue 29](https://github.com/timrwood/moment/pull/29)
Fixed [issue 31](https://github.com/timrwood/moment/pull/31).
### 1.0.1
Added `moment.version` to get the current version.
Removed `window !== undefined` when checking if module exists to support browserify. [issue 25](https://github.com/timrwood/moment/pull/25)
### 1.0.0
Added convenience methods for getting and setting date parts.
Added better support for `moment.add()`.
Added better lang support in NodeJS.
Renamed library from underscore.date to Moment.js
### 0.6.1
Added Portuguese, Italian, and French language support
### 0.6.0
Added _date.lang() support.
Added support for passing multiple formats to try to parse a date. _date("07-10-1986", ["MM-DD-YYYY", "YYYY-MM-DD"]);
Made parse from string and single format 25% faster.
### 0.5.2
Buxfix for [issue 8](https://github.com/timrwood/underscore.date/pull/8) and [issue 9](https://github.com/timrwood/underscore.date/pull/9).
### 0.5.1
Buxfix for [issue 5](https://github.com/timrwood/underscore.date/pull/5).
### 0.5.0
Dropped the redundant `_date.date()` in favor of `_date()`.
Removed `_date.now()`, as it is a duplicate of `_date()` with no parameters.
Removed `_date.isLeapYear(yearNuumber)`. Use `_date([yearNumber]).isLeapYear()` instead.
Exposed customization options through the `_date.relativeTime`, `_date.weekdays`, `_date.weekdaysShort`, `_date.months`, `_date.monthsShort`, and `_date.ordinal` variables instead of the `_date.customize()` function.
### 0.4.1
Added date input formats for input strings.
### 0.4.0
Added underscore.date to npm. Removed dependancies on underscore.
### 0.3.2
Added `'z'` and `'zz'` to `_.date().format()`. Cleaned up some redundant code to trim off some bytes.
### 0.3.1
Cleaned up the namespace. Moved all date manipulation and display functions to the _.date() object.
### 0.3.0
Switched to the Underscore methodology of not mucking with the native objects' prototypes.
Made chaining possible.
### 0.2.1
Changed date names to be a more pseudo standardized 'dddd, MMMM Do YYYY, h:mm:ss a'.
Added `Date.prototype` functions `add`, `subtract`, `isdst`, and `isleapyear`.
### 0.2.0
Changed function names to be more concise.
Changed date format from php date format to custom format.
### 0.1.0
Initial release
License
=======
Moment.js is freely distributable under the terms of the MIT license.
Copyright (c) 2011-2012 Tim Wood
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

55
node_modules/moment/test/filesize-diff.js generated vendored Normal file
View File

@@ -0,0 +1,55 @@
var https = require("https"),
zlib = require('zlib'),
path = require('path'),
fs = require('fs');
var stable = '1.6.2';
function getVersion(path, cb) {
var data = '',
req = https.request({
host: 'raw.github.com',
port: 443,
path: '/timrwood/moment/' + path
}, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
data += chunk;
});
res.on('end', function(e) {
zlib.gzip(data, function(error, result) {
cb(data.length, result.length);
});
});
});
req.on('error', function(e) {
console.log('problem with request: ' + e.message);
});
req.end();
}
function printDiffs(stableLen, stableGzip, currentLen, currentGzip) {
var diff = currentLen - stableLen,
gzipDiff = currentGzip - stableGzip;
console.log("Filesize difference from current branch to " + stable);
console.log(stable + " " + stableLen + ' / ' + stableGzip);
console.log("curr " + currentLen + ' / ' + currentGzip);
console.log("diff " + (diff > 0 ? '+' : '') + diff);
console.log("gzip " + (gzipDiff > 0 ? '+' : '') + gzipDiff);
}
(function(){
fs.readFile(path.normalize(__dirname + '/../min/moment.min.js'), 'utf8', function(err, data){
if (err) {
throw err;
}
zlib.gzip(data, function(error, result) {
getVersion(stable + '/min/moment.min.js', function (stableLength, stableGzipLength) {
printDiffs(stableLength, stableGzipLength, data.length, result.length);
});
});
});
}());

108
node_modules/moment/test/filesize-history.js generated vendored Normal file
View File

@@ -0,0 +1,108 @@
var https = require("https"),
zlib = require('zlib'),
path = require('path'),
fs = require('fs');
var count = 0;
var resolved = 0;
var outputs = [];
function check() {
if (resolved === count) {
normalize();
display();
}
}
function makeBar(length) {
var i = '';
while (i.length < length) {
i += '=';
}
return i;
}
function normalize() {
var i,
max = 0,
max2 = 0;
for (i = 0; i < count; i ++) {
max = Math.max(max, outputs[i].gzip);
max2 = Math.max(max2, outputs[i].original);
}
for (i = 0; i < count; i ++) {
outputs[i].bargraph = makeBar((outputs[i].gzip / max) * 80);
outputs[i].bargraph2 = makeBar((outputs[i].original / max2) * 80);
}
}
function display() {
var i;
for (i = 0; i < count; i ++) {
console.log(outputs[i].version + ' ' + outputs[i].gzip + ' ' + outputs[i].original);
console.log('gzip ' + outputs[i].bargraph);
console.log('orig ' + outputs[i].bargraph2);
}
}
function getSizeAtVersion(version, path) {
var data = '';
var op = {};
var req = https.request({
host: 'raw.github.com',
port: 443,
path: '/timrwood/moment/' + version + path
}, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
data += chunk;
});
res.on('end', function(e) {
zlib.gzip(data, function(error, result) {
op.version = version;
op.gzip = result.length;
op.original = data.length;
resolved ++;
check();
});
});
});
req.on('error', function(e) {
console.log('problem with request: ' + e.message);
});
req.end();
count++;
outputs.push(op);
}
(function(){
var old_versions = '1.0.1 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.4.0'.split(' ');
var new_versions = '1.5.0 1.5.1 1.6.0 1.6.1'.split(' ');
var i;
for (i = 0; i < old_versions.length; i++) {
getSizeAtVersion(old_versions[i], '/moment.min.js');
}
for (i = 0; i < new_versions.length; i++) {
getSizeAtVersion(new_versions[i], '/min/moment.min.js');
}
}());
(function(){
count ++;
var op = {};
outputs.push(op);
fs.readFile(path.normalize(__dirname + '/../min/moment.min.js'), 'utf8', function(err, data){
if (err) throw err;
zlib.gzip(data, function(error, result) {
op.version = '.next';
op.gzip = result.length;
op.original = data.length;
resolved ++;
check();
});
});
}());

265
node_modules/moment/test/lang/bg.js generated vendored Normal file
View File

@@ -0,0 +1,265 @@
var moment = require("../../moment");
/**************************************************
Bulgarian
*************************************************/
exports["lang:bg"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('bg');
var tests = 'януари янревруари фев_март мар_април апрай май_юни юни_юли юли_август авг_септември сеп_октомври окт_ноември ноеекември дек'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('bg');
var a = [
['dddd, MMMM Do YYYY, h:mm:ss a', 'неделя, февруари 14. 2010, 3:25:50 pm'],
['ddd, hA', 'нед, 3PM'],
['M Mo MM MMMM MMM', '2 2. 02 февруари фев'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14. 14'],
['d do dddd ddd dd', '0 0. неделя нед нд'],
['DDD DDDo DDDD', '45 45. 045'],
['w wo ww', '8 8. 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'],
['L', '14.02.2010'],
['LL', '14 февруари 2010'],
['LLL', '14 февруари 2010 3:25'],
['LLLL', 'неделя, 14 февруари 2010 3:25']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('bg');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('bg');
var expected = 'януари янревруари фев_март мар_април апрай май_юни юни_юли юли_август авг_септември сеп_октомври окт_ноември ноеекември дек'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('bg');
var expected = 'неделя нед нд_понеделник пон пн_вторник вто вт_сряда сря сретвъртък чет чт_петък пет пт_събота съб сб'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('bg');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "няколко секунди", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "минута", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "минута", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 минути", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 минути", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "час", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "час", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 часа", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 часа", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 часа", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "ден", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "ден", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 дни", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "ден", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 дни", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 дни", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "месец", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "месец", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "месец", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 месеца", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 месеца", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 месеца", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "месец", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 месеца", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 месеца", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "година", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "година", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 години", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "година", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 години", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('bg');
test.equal(moment(30000).from(0), "след няколко секунди", "prefix");
test.equal(moment(0).from(30000), "преди няколко секунди", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('bg');
test.equal(moment().fromNow(), "преди няколко секунди", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('bg');
test.equal(moment().add({s:30}).fromNow(), "след няколко секунди", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "след 5 дни", "in 5 days");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('bg');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "Днес в 2:00", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "Днес в 2:25", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "Днес в 3:00", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "Утре в 2:00", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "Днес в 1:00", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "Вчера в 2:00", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('bg');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [в] LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [в] LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [в] LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('bg');
var i;
var m;
function makeFormat(d) {
switch (d.day()) {
case 0:
case 3:
case 6:
return '[В изминалата] dddd [в] LT';
case 1:
case 2:
case 4:
case 5:
return '[В изминалия] dddd [в] LT';
}
}
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format(makeFormat(m)), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format(makeFormat(m)), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format(makeFormat(m)), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('bg');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

221
node_modules/moment/test/lang/ca.js generated vendored Normal file
View File

@@ -0,0 +1,221 @@
var moment = require("../../moment");
/**************************************************
Català
*************************************************/
exports["lang:ca"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('ca');
var tests = "Gener Gen._Febrer Febr._Març Mar._Abril Abr._Maig Mai._Juny Jun._Juliol Jul._Agost Ag._Setembre Set._Octubre Oct._Novembre Nov._Desembre Des.".split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('ca');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('ca');
var expected = "Gener Gen._Febrer Febr._Març Mar._Abril Abr._Maig Mai._Juny Jun._Juliol Jul._Agost Ag._Setembre Set._Octubre Oct._Novembre Nov._Desembre Des.".split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('ca');
var expected = "Diumenge Dg. Dg_Dilluns Dl. Dl_Dimarts Dt. Dt_Dimecres Dc. Dc_Dijous Dj. Dj_Divendres Dv. Dv_Dissabte Ds. Ds".split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('ca');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "uns segons", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minut", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minut", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuts", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuts", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "una hora", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "una hora", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 hores", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 hores", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 hores", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un dia", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un dia", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dies", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un dia", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dies", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dies", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mes", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mes", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mes", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mesos", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mesos", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mesos", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mes", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mesos", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mesos", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un any", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un any", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anys", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un any", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anys", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('ca');
test.equal(moment(30000).from(0), "en uns segons", "prefix");
test.equal(moment(0).from(30000), "fa uns segons", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('ca');
test.equal(moment().fromNow(), "fa uns segons", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('ca');
test.equal(moment().add({s:30}).fromNow(), "en uns segons", "en uns segons");
test.equal(moment().add({d:5}).fromNow(), "en 5 dies", "en 5 dies");
test.done();
},
"calendar day" : function(test) {
test.expect(7);
moment.lang('ca');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "avui a les 2:00", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "avui a les 2:25", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "avui a les 3:00", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "demà a les 2:00", "tomorrow at the same time");
test.equal(moment(a).add({ d: 1, h : -1 }).calendar(), "demà a la 1:00", "tomorrow minus 1 hour");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "avui a la 1:00", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "ahir a les 2:00", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('ca');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('ca');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[el] dddd [passat a ' + ((m.hours() !== 1) ? 'les' : 'la') + '] LT'), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('ca');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

248
node_modules/moment/test/lang/cv.js generated vendored Normal file
View File

@@ -0,0 +1,248 @@
var moment = require("../../moment");
/**************************************************
Chuvash
*************************************************/
exports["lang:cv"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('cv');
var tests = 'кăрлач кăрарăс нар_пуш пуш_ака акаай май_çĕртме çĕр_утă утă_çурла çур_авăн ав_юпа юпа_чӳк чӳк_раштав раш'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('cv');
var a = [
['dddd, MMMM Do YYYY, h:mm:ss a', 'вырсарникун, нарăс 14-мĕш 2010, 3:25:50 pm'],
['ddd, hA', 'выр, 3PM'],
['M Mo MM MMMM MMM', '2 2-мĕш 02 нарăс нар'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14-мĕш 14'],
['d do dddd ddd dd', '0 0-мĕш вырсарникун выр вр'],
['DDD DDDo DDDD', '45 45-мĕш 045'],
['w wo ww', '8 8-мĕш 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
['Çулăн DDDo кунĕ', 'Çулăн 45-мĕш кунĕ'],
['L', '14-02-2010'],
['LL', '2010 çулхи нарăс уйăхĕн 14-мĕшĕ'],
['LLL', '2010 çулхи нарăс уйăхĕн 14-мĕшĕ, 15:25'],
['LLLL', 'вырсарникун, 2010 çулхи нарăс уйăхĕн 14-мĕшĕ, 15:25']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('cv');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1-мĕш', '1-мĕш');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2-мĕш', '2-мĕш');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3-мĕш', '3-мĕш');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4-мĕш', '4-мĕш');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5-мĕш', '5-мĕш');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6-мĕш', '6-мĕш');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7-мĕш', '7-мĕш');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8-мĕш', '8-мĕш');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9-мĕш', '9-мĕш');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10-мĕш', '10-мĕш');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11-мĕш', '11-мĕш');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12-мĕш', '12-мĕш');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13-мĕш', '13-мĕш');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14-мĕш', '14-мĕш');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15-мĕш', '15-мĕш');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16-мĕш', '16-мĕш');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17-мĕш', '17-мĕш');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18-мĕш', '18-мĕш');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19-мĕш', '19-мĕш');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20-мĕш', '20-мĕш');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21-мĕш', '21-мĕш');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22-мĕш', '22-мĕш');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23-мĕш', '23-мĕш');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24-мĕш', '24-мĕш');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25-мĕш', '25-мĕш');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26-мĕш', '26-мĕш');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27-мĕш', '27-мĕш');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28-мĕш', '28-мĕш');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29-мĕш', '29-мĕш');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30-мĕш', '30-мĕш');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31-мĕш', '31-мĕш');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('cv');
var expected = 'кăрлач кăрарăс нар_пуш пуш_ака акаай май_çĕртме çĕр_утă утă_çурла çур_авăн ав_юпа юпа_чӳк чӳк_раштав раш'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('cv');
var expected = 'вырсарникун выр врунтикун тун тн_ытларикун ытл ыт_юнкун юн юн_кĕçнерникун кĕç кç_эрнекун эрн эр_шăматкун шăм шм'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('cv');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "пĕр-ик çеккунт", "44 sekunder = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "пĕр минут", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "пĕр минут", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 минут", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 минут", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "пĕр сехет", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "пĕр сехет", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 сехет", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 сехет", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 сехет", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "пĕр кун", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "пĕр кун", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 кун", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "пĕр кун", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 кун", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 кун", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "пĕр уйăх", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "пĕр уйăх", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "пĕр уйăх", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 уйăх", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 уйăх", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 уйăх", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "пĕр уйăх", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 уйăх", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 уйăх", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "пĕр çул", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "пĕр çул", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 çул", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "пĕр çул", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 çул", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('cv');
test.equal(moment(30000).from(0), "пĕр-ик çеккунтран", "prefix");
test.equal(moment(0).from(30000), "пĕр-ик çеккунт каялла", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('cv');
test.equal(moment().fromNow(), "пĕр-ик çеккунт каялла", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(4);
moment.lang('cv');
test.equal(moment().add({s:30}).fromNow(), "пĕр-ик çеккунтран", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "5 кунран", "in 5 days");
test.equal(moment().add({h:2}).fromNow(), "2 сехетрен", "in 2 hours, the right suffix!");
test.equal(moment().add({y:3}).fromNow(), "3 çултан", "in 3 years, the right suffix!");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('cv');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "Паян 02:00 сехетре", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "Паян 02:25 сехетре", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "Паян 03:00 сехетре", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "Ыран 02:00 сехетре", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "Паян 01:00 сехетре", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "Ĕнер 02:00 сехетре", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('cv');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('[Çитес] dddd LT [сехетре]'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[Çитес] dddd LT [сехетре]'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[Çитес] dddd LT [сехетре]'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('cv');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[Иртнĕ] dddd LT [сехетре]'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[Иртнĕ] dddd LT [сехетре]'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[Иртнĕ] dddd LT [сехетре]'), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('cv');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

183
node_modules/moment/test/lang/da.js generated vendored Normal file
View File

@@ -0,0 +1,183 @@
var moment = require("../../moment");
/**************************************************
Danish
*************************************************/
exports["lang:da"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('da');
var tests = 'Januar Jan_Februar Feb_Marts Mar_April Apr_Maj Maj_Juni Jun_Juli Jul_August Aug_September Sep_Oktober Okt_November Nov_December Dec'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('da');
var a = [
['dddd \\den MMMM Do YYYY, h:mm:ss a', 'Søndag den Februar 14. 2010, 3:25:50 pm'],
['ddd hA', 'Søn 3PM'],
['M Mo MM MMMM MMM', '2 2. 02 Februar Feb'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14. 14'],
['d do dddd ddd dd', '0 0. Søndag Søn Sø'],
['DDD DDDo DDDD', '45 45. 045'],
['w wo ww', '8 8. 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
['[den] DDDo \\d\\ag på året', 'den 45. dag på året'],
['L', '14/02/2010'],
['LL', '14 Februar 2010'],
['LLL', '14 Februar 2010 3:25 PM'],
['LLLL', 'Søndag 14. Februar, 2010 3:25 PM']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('da');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('da');
var expected = 'Januar Jan_Februar Feb_Marts Mar_April Apr_Maj Maj_Juni Jun_Juli Jul_August Aug_September Sep_Oktober Okt_November Nov_December Dec'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('da');
var expected = 'Søndag Søn Sø_Mandag Man Ma_Tirsdag Tir Ti_Onsdag Ons On_Torsdag Tor To_Fredag Fre Fr_Lørdag Lør Lø'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('da');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "få sekunder", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minut", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minut", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutter", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutter", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "time", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "time", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 timer", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 timer", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 timer", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "dag", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "dag", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dage", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "dag", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dage", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dage", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "månede", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "månede", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "månede", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 måneder", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 måneder", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 måneder", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "månede", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 måneder", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 måneder", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "år", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "år", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 år", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "år", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 år", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('da');
test.equal(moment(30000).from(0), "om få sekunder", "prefix");
test.equal(moment(0).from(30000), "få sekunder siden", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('da');
test.equal(moment().fromNow(), "få sekunder siden", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('da');
test.equal(moment().add({s:30}).fromNow(), "om få sekunder", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "om 5 dage", "in 5 days");
test.done();
}
};

241
node_modules/moment/test/lang/de.js generated vendored Normal file
View File

@@ -0,0 +1,241 @@
var moment = require("../../moment");
/**************************************************
German
*************************************************/
exports["lang:de"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('de');
var tests = 'Januar Jan._Februar Febr._März Mrz._April Apr._Mai Mai_Juni Jun._Juli Jul._August Aug._September Sept._Oktober Okt._November Nov._Dezember Dez.'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('de');
var a = [
['dddd, Do MMMM YYYY, h:mm:ss a', 'Sonntag, 14. Februar 2010, 3:25:50 pm'],
['ddd, hA', 'So., 3PM'],
['M Mo MM MMMM MMM', '2 2. 02 Februar Febr.'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14. 14'],
['d do dddd ddd dd', '0 0. Sonntag So. So'],
['DDD DDDo DDDD', '45 45. 045'],
['w wo ww', '8 8. 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'],
['L', '14.02.2010'],
['LL', '14. Februar 2010'],
['LLL', '14. Februar 2010 15:25 Uhr'],
['LLLL', 'Sonntag, 14. Februar 2010 15:25 Uhr']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('de');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('de');
var expected = 'Januar Jan._Februar Febr._März Mrz._April Apr._Mai Mai_Juni Jun._Juli Jul._August Aug._September Sept._Oktober Okt._November Nov._Dezember Dez.'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('de');
var expected = 'Sonntag So. So_Montag Mo. Mo_Dienstag Di. Di_Mittwoch Mi. Mi_Donnerstag Do. Do_Freitag Fr. Fr_Samstag Sa. Sa'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('de');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "ein paar Sekunden", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "einer Minute", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "einer Minute", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 Minuten", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 Minuten", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "einer Stunde", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "einer Stunde", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 Stunden", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 Stunden", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 Stunden", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "einem Tag", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "einem Tag", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 Tagen", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "einem Tag", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 Tagen", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 Tagen", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "einem Monat", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "einem Monat", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "einem Monat", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 Monaten", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 Monaten", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 Monaten", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "einem Monat", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 Monaten", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 Monaten", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "einem Jahr", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "einem Jahr", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 Jahren", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "einem Jahr", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 Jahren", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('de');
test.equal(moment(30000).from(0), "in ein paar Sekunden", "prefix");
test.equal(moment(0).from(30000), "vor ein paar Sekunden", "suffix");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('de');
test.equal(moment().add({s:30}).fromNow(), "in ein paar Sekunden", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "in 5 Tagen", "in 5 days");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('de');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "Heute um 2:00 Uhr", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "Heute um 2:25 Uhr", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "Heute um 3:00 Uhr", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "Morgen um 2:00 Uhr", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "Heute um 1:00 Uhr", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "Gestern um 2:00 Uhr", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('de');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [um] LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [um] LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [um] LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('de');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[letzten] dddd [um] LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[letzten] dddd [um] LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[letzten] dddd [um] LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('de');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

248
node_modules/moment/test/lang/en-ca.js generated vendored Normal file
View File

@@ -0,0 +1,248 @@
var moment = require("../../moment");
/**************************************************
English
*************************************************/
exports["lang:en-ca"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('en-ca');
var tests = 'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('en-ca');
var a = [
['dddd, MMMM Do YYYY, h:mm:ss a', 'Sunday, February 14th 2010, 3:25:50 pm'],
['ddd, hA', 'Sun, 3PM'],
['M Mo MM MMMM MMM', '2 2nd 02 February Feb'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14th 14'],
['d do dddd ddd dd', '0 0th Sunday Sun Su'],
['DDD DDDo DDDD', '45 45th 045'],
['w wo ww', '8 8th 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45th day of the year'],
['L', '2010-02-14'],
['LL', '14 February, 2010'],
['LLL', '14 February, 2010 3:25 PM'],
['LLLL', 'Sunday, 14 February, 2010 3:25 PM']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('en-gb');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1st', '1st');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2nd', '2nd');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3rd', '3rd');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4th', '4th');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5th', '5th');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6th', '6th');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7th', '7th');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8th', '8th');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9th', '9th');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10th', '10th');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11th', '11th');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12th', '12th');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13th', '13th');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14th', '14th');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15th', '15th');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16th', '16th');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17th', '17th');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18th', '18th');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19th', '19th');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20th', '20th');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21st', '21st');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22nd', '22nd');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23rd', '23rd');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24th', '24th');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25th', '25th');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26th', '26th');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27th', '27th');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28th', '28th');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29th', '29th');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30th', '30th');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31st', '31st');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('en-gb');
var expected = 'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('en-gb');
var expected = 'Sunday Sun Su_Monday Mon Mo_Tuesday Tue Tu_Wednesday Wed We_Thursday Thu Th_Friday Fri Fr_Saturday Sat Sa'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('en-gb');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "a few seconds", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "a minute", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "a minute", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutes", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutes", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "an hour", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "an hour", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 hours", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 hours", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 hours", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "a day", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "a day", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 days", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "a day", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 days", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 days", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "a month", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "a month", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "a month", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 months", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 months", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 months", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "a month", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 months", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 months", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "a year", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "a year", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 years", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "a year", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 years", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('en-gb');
test.equal(moment(30000).from(0), "in a few seconds", "prefix");
test.equal(moment(0).from(30000), "a few seconds ago", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('en-gb');
test.equal(moment().fromNow(), "a few seconds ago", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('en-gb');
test.equal(moment().add({s:30}).fromNow(), "in a few seconds", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "in 5 days", "in 5 days");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('en-gb');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "Today at 2:00 AM", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "Today at 2:25 AM", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "Today at 3:00 AM", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "Tomorrow at 2:00 AM", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "Today at 1:00 AM", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "Yesterday at 2:00 AM", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('en-gb');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('en-gb');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('en-gb');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

248
node_modules/moment/test/lang/en-gb.js generated vendored Normal file
View File

@@ -0,0 +1,248 @@
var moment = require("../../moment");
/**************************************************
English
*************************************************/
exports["lang:en-gb"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('en-gb');
var tests = 'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('en-gb');
var a = [
['dddd, MMMM Do YYYY, h:mm:ss a', 'Sunday, February 14th 2010, 3:25:50 pm'],
['ddd, hA', 'Sun, 3PM'],
['M Mo MM MMMM MMM', '2 2nd 02 February Feb'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14th 14'],
['d do dddd ddd dd', '0 0th Sunday Sun Su'],
['DDD DDDo DDDD', '45 45th 045'],
['w wo ww', '8 8th 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45th day of the year'],
['L', '14/02/2010'],
['LL', '14 February 2010'],
['LLL', '14 February 2010 3:25 PM'],
['LLLL', 'Sunday, 14 February 2010 3:25 PM']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('en-gb');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1st', '1st');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2nd', '2nd');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3rd', '3rd');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4th', '4th');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5th', '5th');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6th', '6th');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7th', '7th');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8th', '8th');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9th', '9th');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10th', '10th');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11th', '11th');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12th', '12th');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13th', '13th');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14th', '14th');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15th', '15th');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16th', '16th');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17th', '17th');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18th', '18th');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19th', '19th');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20th', '20th');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21st', '21st');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22nd', '22nd');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23rd', '23rd');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24th', '24th');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25th', '25th');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26th', '26th');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27th', '27th');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28th', '28th');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29th', '29th');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30th', '30th');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31st', '31st');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('en-gb');
var expected = 'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('en-gb');
var expected = 'Sunday Sun Su_Monday Mon Mo_Tuesday Tue Tu_Wednesday Wed We_Thursday Thu Th_Friday Fri Fr_Saturday Sat Sa'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('en-gb');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "a few seconds", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "a minute", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "a minute", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutes", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutes", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "an hour", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "an hour", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 hours", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 hours", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 hours", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "a day", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "a day", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 days", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "a day", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 days", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 days", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "a month", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "a month", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "a month", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 months", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 months", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 months", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "a month", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 months", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 months", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "a year", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "a year", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 years", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "a year", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 years", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('en-gb');
test.equal(moment(30000).from(0), "in a few seconds", "prefix");
test.equal(moment(0).from(30000), "a few seconds ago", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('en-gb');
test.equal(moment().fromNow(), "a few seconds ago", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('en-gb');
test.equal(moment().add({s:30}).fromNow(), "in a few seconds", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "in 5 days", "in 5 days");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('en-gb');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "Today at 2:00 AM", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "Today at 2:25 AM", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "Today at 3:00 AM", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "Tomorrow at 2:00 AM", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "Today at 1:00 AM", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "Yesterday at 2:00 AM", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('en-gb');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('en-gb');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('en-gb');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

248
node_modules/moment/test/lang/en.js generated vendored Normal file
View File

@@ -0,0 +1,248 @@
var moment = require("../../moment");
/**************************************************
English
*************************************************/
exports["lang:en"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('en');
var tests = 'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('en');
var a = [
['dddd, MMMM Do YYYY, h:mm:ss a', 'Sunday, February 14th 2010, 3:25:50 pm'],
['ddd, hA', 'Sun, 3PM'],
['M Mo MM MMMM MMM', '2 2nd 02 February Feb'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14th 14'],
['d do dddd ddd dd', '0 0th Sunday Sun Su'],
['DDD DDDo DDDD', '45 45th 045'],
['w wo ww', '8 8th 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45th day of the year'],
['L', '02/14/2010'],
['LL', 'February 14 2010'],
['LLL', 'February 14 2010 3:25 PM'],
['LLLL', 'Sunday, February 14 2010 3:25 PM']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('en');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1st', '1st');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2nd', '2nd');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3rd', '3rd');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4th', '4th');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5th', '5th');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6th', '6th');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7th', '7th');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8th', '8th');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9th', '9th');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10th', '10th');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11th', '11th');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12th', '12th');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13th', '13th');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14th', '14th');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15th', '15th');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16th', '16th');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17th', '17th');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18th', '18th');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19th', '19th');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20th', '20th');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21st', '21st');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22nd', '22nd');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23rd', '23rd');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24th', '24th');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25th', '25th');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26th', '26th');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27th', '27th');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28th', '28th');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29th', '29th');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30th', '30th');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31st', '31st');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('en');
var expected = 'January Jan_February Feb_March Mar_April Apr_May May_June Jun_July Jul_August Aug_September Sep_October Oct_November Nov_December Dec'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('en');
var expected = 'Sunday Sun Su_Monday Mon Mo_Tuesday Tue Tu_Wednesday Wed We_Thursday Thu Th_Friday Fri Fr_Saturday Sat Sa'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('en');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "a few seconds", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "a minute", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "a minute", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutes", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutes", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "an hour", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "an hour", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 hours", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 hours", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 hours", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "a day", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "a day", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 days", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "a day", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 days", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 days", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "a month", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "a month", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "a month", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 months", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 months", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 months", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "a month", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 months", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 months", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "a year", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "a year", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 years", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "a year", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 years", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('en');
test.equal(moment(30000).from(0), "in a few seconds", "prefix");
test.equal(moment(0).from(30000), "a few seconds ago", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('en');
test.equal(moment().fromNow(), "a few seconds ago", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('en');
test.equal(moment().add({s:30}).fromNow(), "in a few seconds", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "in 5 days", "in 5 days");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('en');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "Today at 2:00 AM", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "Today at 2:25 AM", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "Today at 3:00 AM", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "Tomorrow at 2:00 AM", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "Today at 1:00 AM", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "Yesterday at 2:00 AM", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('en');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [at] LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('en');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[last] dddd [at] LT'), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('en');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

218
node_modules/moment/test/lang/es.js generated vendored Normal file
View File

@@ -0,0 +1,218 @@
var moment = require("../../moment");
/**************************************************
Spanish
*************************************************/
exports["lang:es"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('es');
var tests = 'Enero Ene._Febrero Feb._Marzo Mar._Abril Abr._Mayo May._Junio Jun._Julio Jul._Agosto Ago._Septiembre Sep._Octubre Oct._Noviembre Nov._Diciembre Dic.'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('es');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('es');
var expected = 'Enero Ene._Febrero Feb._Marzo Mar._Abril Abr._Mayo May._Junio Jun._Julio Jul._Agosto Ago._Septiembre Sep._Octubre Oct._Noviembre Nov._Diciembre Dic.'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('es');
var expected = 'Domingo Dom. Do_Lunes Lun. Lu_Martes Mar. Ma_Miércoles Mié. Mi_Jueves Jue. Ju_Viernes Vie. Vi_Sábado Sáb. Sá'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('es');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "unos segundos", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minuto", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minuto", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutos", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutos", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "una hora", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "una hora", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 horas", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 horas", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 horas", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un día", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un día", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 días", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un día", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 días", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 días", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mes", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mes", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mes", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 meses", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 meses", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 meses", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mes", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 meses", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 meses", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un año", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un año", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 años", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un año", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 años", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('es');
test.equal(moment(30000).from(0), "en unos segundos", "prefix");
test.equal(moment(0).from(30000), "hace unos segundos", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('es');
test.equal(moment().fromNow(), "hace unos segundos", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('es');
test.equal(moment().add({s:30}).fromNow(), "en unos segundos", "en unos segundos");
test.equal(moment().add({d:5}).fromNow(), "en 5 días", "en 5 días");
test.done();
},
"calendar day" : function(test) {
test.expect(7);
moment.lang('es');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "hoy a las 2:00", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "hoy a las 2:25", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "hoy a las 3:00", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "mañana a las 2:00", "tomorrow at the same time");
test.equal(moment(a).add({ d: 1, h : -1 }).calendar(), "mañana a la 1:00", "tomorrow minus 1 hour");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "hoy a la 1:00", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "ayer a las 2:00", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('es');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('es');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[el] dddd [pasado a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[el] dddd [pasado a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[el] dddd [pasado a la' + ((m.hours() !== 1) ? 's' : '') + '] LT'), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('es');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

248
node_modules/moment/test/lang/et.js generated vendored Normal file
View File

@@ -0,0 +1,248 @@
var moment = require("../../moment");
/**************************************************
English
*************************************************/
exports["lang:et"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('et');
var tests = 'jaanuar jaan_veebruar veebr_märts märts_aprill apr_mai mai_juuni juuni_juuli juuli_august aug_september sept_oktoober okt_november nov_detsember dets'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' peaks olema kuu ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('et');
var a = [
['dddd, Do MMMM YYYY, H:mm:ss', 'pühapäev, 14. veebruar 2010, 15:25:50'],
['ddd, h', 'P, 3'],
['M Mo MM MMMM MMM', '2 2. 02 veebruar veebr'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14. 14'],
['d do dddd ddd dd', '0 0. pühapäev P P'],
['DDD DDDo DDDD', '45 45. 045'],
['w wo ww', '8 8. 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
['\\a\\a\\st\\a DDDo päev', 'aasta 45. päev'],
['L', '14.02.2010'],
['LL', '14. veebruar 2010'],
['LLL', '14. veebruar 2010 15:25'],
['LLLL', 'pühapäev, 14. veebruar 2010 15:25']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('et');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('et');
var expected = 'jaanuar jaan_veebruar veebr_märts märts_aprill apr_mai mai_juuni juuni_juuli juuli_august aug_september sept_oktoober okt_november nov_detsember dets'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('et');
var expected = 'pühapäev P P_esmaspäev E E_teisipäev T T_kolmapäev K K_neljapäev N N_reede R R_laupäev L L'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('et');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "paari sekundi", "44 seconds = paari sekundi");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minut", "45 seconds = minut");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minut", "89 seconds = minut");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutit", "90 seconds = 2 minutit");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutit", "44 minutes = 44 minutit");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "tund", "45 minutes = tund");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "tund", "89 minutes = tund");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 tundi", "90 minutes = 2 tundi");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 tundi", "5 hours = 5 tundi");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 tundi", "21 hours = 21 tundi");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "päev", "22 hours = päev");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "päev", "35 hours = päev");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 päeva", "36 hours = 2 päeva");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "päev", "1 day = päev");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 päeva", "5 days = 5 päeva");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 päeva", "25 days = 25 päeva");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "kuu", "26 days = kuu");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "kuu", "30 days = kuu");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "kuu", "45 days = kuu");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 kuud", "46 days = 2 kuud");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 kuud", "75 days = 2 kuud");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 kuud", "76 days = 3 kuud");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "kuu", "1 month = kuu");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 kuud", "5 months = 5 kuud");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 kuud", "344 days = 11 kuud");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "aasta", "345 days = aasta");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "aasta", "547 days = aasta");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 aastat", "548 days = 2 aastat");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "aasta", "1 year = aasta");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 aastat", "5 years = 5 aastat");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('et');
test.equal(moment(30000).from(0), "paari sekundi pärast", "prefix");
test.equal(moment(0).from(30000), "paar sekundit tagasi", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('et');
test.equal(moment().fromNow(), "paar sekundit tagasi", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('et');
test.equal(moment().add({s:30}).fromNow(), "paari sekundi pärast", "paari sekundi pärast");
test.equal(moment().add({d:5}).fromNow(), "5 päeva pärast", "5 päeva pärast");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('et');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "Täna, 2:00", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "Täna, 2:25", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "Täna, 3:00", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "Homme, 2:00", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "Täna, 1:00", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "Eile, 2:00", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('et');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('[Järgmine] dddd LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[Järgmine] dddd LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[Järgmine] dddd LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('et');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[Eelmine] dddd LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[Eelmine] dddd LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[Eelmine] dddd LT'), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('en');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 nädal tagasi");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "1 nädala pärast");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 nädalat tagasi");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "2 nädala pärast");
test.done();
}
};

248
node_modules/moment/test/lang/eu.js generated vendored Normal file
View File

@@ -0,0 +1,248 @@
var moment = require("../../moment");
/**************************************************
Euskara
*************************************************/
exports["lang:eu"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('eu');
var tests = 'urtarrila urt._otsaila ots._martxoa mar._apirila api._maiatza mai._ekaina eka._uztaila uzt._abuztua abu._iraila ira._urria urr._azaroa aza._abendua abe.'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('eu');
var a = [
['dddd, MMMM Do YYYY, h:mm:ss a', 'igandea, otsaila 14. 2010, 3:25:50 pm'],
['ddd, hA', 'ig., 3PM'],
['M Mo MM MMMM MMM', '2 2. 02 otsaila ots.'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14. 14'],
['d do dddd ddd dd', '0 0. igandea ig. ig'],
['DDD DDDo DDDD', '45 45. 045'],
['w wo ww', '8 8. 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'],
['L', '2010-02-14'],
['LL', '2010ko otsailaren 14a'],
['LLL', '2010ko otsailaren 14a 15:25'],
['LLLL', 'igandea, 2010ko otsailaren 14a 15:25']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('eu');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('eu');
var expected = 'urtarrila urt._otsaila ots._martxoa mar._apirila api._maiatza mai._ekaina eka._uztaila uzt._abuztua abu._iraila ira._urria urr._azaroa aza._abendua abe.'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('eu');
var expected = 'igandea ig. ig_astelehena al. al_asteartea ar. ar_asteazkena az. az_osteguna og. og_ostirala ol. ol_larunbata lr. lr'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('eu');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "segundo batzuk", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minutu bat", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minutu bat", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutu", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutu", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "ordu bat", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "ordu bat", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 ordu", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 ordu", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 ordu", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "egun bat", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "egun bat", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 egun", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "egun bat", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 egun", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 egun", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "hilabete bat", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "hilabete bat", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "hilabete bat", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 hilabete", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 hilabete", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 hilabete", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "hilabete bat", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 hilabete", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 hilabete", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "urte bat", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "urte bat", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 urte", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "urte bat", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 urte", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('eu');
test.equal(moment(30000).from(0), "segundo batzuk barru", "prefix");
test.equal(moment(0).from(30000), "duela segundo batzuk", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('eu');
test.equal(moment().fromNow(), "duela segundo batzuk", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('eu');
test.equal(moment().add({s:30}).fromNow(), "segundo batzuk barru", "in seconds");
test.equal(moment().add({d:5}).fromNow(), "5 egun barru", "in 5 days");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('eu');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "gaur 02:00etan", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "gaur 02:25etan", "now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "gaur 03:00etan", "now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "bihar 02:00etan", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "gaur 01:00etan", "now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "atzo 02:00etan", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('eu');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd LT[etan]'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd LT[etan]'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd LT[etan]'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('eu');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[aurreko] dddd LT[etan]'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[aurreko] dddd LT[etan]'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[aurreko] dddd LT[etan]'), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('eu');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

248
node_modules/moment/test/lang/fi.js generated vendored Normal file
View File

@@ -0,0 +1,248 @@
var moment = require("../../moment");
/**************************************************
Finnish
*************************************************/
exports["lang:fi"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('fi');
var tests = 'tammikuu tam_helmikuu hel_maaliskuu maa_huhtikuu huh_toukokuu tou_kesäkuu kes_heinäkuu hei_elokuu elo_syyskuu syys_lokakuu lok_marraskuu mar_joulukuu jou'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('fi');
var a = [
['dddd, MMMM Do YYYY, h:mm:ss a', 'sunnuntai, helmikuu 14. 2010, 3:25:50 pm'],
['ddd, hA', 'su, 3PM'],
['M Mo MM MMMM MMM', '2 2. 02 helmikuu hel'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14. 14'],
['d do dddd ddd dd', '0 0. sunnuntai su su'],
['DDD DDDo DDDD', '45 45. 045'],
['w wo ww', '8 8. 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
['vuo\\den DDDo päivä', 'vuoden 45. päivä'],
['L', '14.02.2010'],
['LL', '14. helmikuuta 2010'],
['LLL', '14. helmikuuta 2010, klo 15.25'],
['LLLL', 'sunnuntai, 14. helmikuuta 2010, klo 15.25']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('fi');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1st');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2nd');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3rd');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4th');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5th');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6th');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7th');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8th');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9th');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10th');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11th');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12th');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13th');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14th');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15th');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16th');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17th');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18th');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19th');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20th');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21st');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22nd');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23rd');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24th');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25th');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26th');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27th');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28th');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29th');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30th');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31st');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('fi');
var expected = 'tammikuu tam_helmikuu hel_maaliskuu maa_huhtikuu huh_toukokuu tou_kesäkuu kes_heinäkuu hei_elokuu elo_syyskuu syy_lokakuu lok_marraskuu mar_joulukuu jou'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('fi');
var expected = 'sunnuntai su su_maanantai ma ma_tiistai ti ti_keskiviikko ke ke_torstai to to_perjantai pe pe_lauantai la la'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('fi');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "muutama sekunti", "44 seconds = few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minuutti", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minuutti", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "kaksi minuuttia", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuuttia", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "tunti", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "tunti", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "kaksi tuntia", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "viisi tuntia", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 tuntia", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "päivä", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "päivä", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "kaksi päivää", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "päivä", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "viisi päivää", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 päivää", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "kuukausi", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "kuukausi", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "kuukausi", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "kaksi kuukautta", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "kaksi kuukautta", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "kolme kuukautta", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "kuukausi", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "viisi kuukautta", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 kuukautta", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "vuosi", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "vuosi", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "kaksi vuotta", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "vuosi", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "viisi vuotta", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('fi');
test.equal(moment(30000).from(0), "muutaman sekunnin päästä", "prefix");
test.equal(moment(0).from(30000), "muutama sekunti sitten", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('fi');
test.equal(moment().fromNow(), "muutama sekunti sitten", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('fi');
test.equal(moment().add({s:30}).fromNow(), "muutaman sekunnin päästä", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "viiden päivän päästä", "in 5 days");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('fi');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "tänään klo 02.00", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "tänään klo 02.25", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "tänään klo 03.00", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "huomenna klo 02.00", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "tänään klo 01.00", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "eilen klo 02.00", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('fi');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [klo] LT'), "today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [klo] LT'), "today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [klo] LT'), "today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('fi');
for (var i = 2; i < 7; i++) {
var m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[viime] dddd[na] [klo] LT'), "today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[viime] dddd[na] [klo] LT'), "today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[viime] dddd[na] [klo] LT'), "today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('fi');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "yksi viikko sitten");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "yhden viikon päästä");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "kaksi viikkoa sitten");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "kaden viikon päästä");
test.done();
}
};

241
node_modules/moment/test/lang/fr-ca.js generated vendored Normal file
View File

@@ -0,0 +1,241 @@
var moment = require("../../moment");
/**************************************************
French
*************************************************/
exports["lang:fr-ca"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('fr-ca');
var tests = 'janvier janv._février févr._mars mars_avril avr._mai mai_juin juin_juillet juil._août août_septembre sept._octobre oct._novembre nov._décembre déc.'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('fr-ca');
var a = [
['dddd, MMMM Do YYYY, h:mm:ss a', 'dimanche, février 14ème 2010, 3:25:50 pm'],
['ddd, hA', 'dim., 3PM'],
['M Mo MM MMMM MMM', '2 2ème 02 février févr.'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14ème 14'],
['d do dddd ddd dd', '0 0ème dimanche dim. Di'],
['DDD DDDo DDDD', '45 45ème 045'],
['w wo ww', '8 8ème 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45ème day of the year'],
['L', '2010-02-14'],
['LL', '14 février 2010'],
['LLL', '14 février 2010 15:25'],
['LLLL', 'dimanche 14 février 2010 15:25']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('fr');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1er', '1er');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2ème', '2ème');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3ème', '3ème');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4ème', '4ème');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5ème', '5ème');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6ème', '6ème');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7ème', '7ème');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8ème', '8ème');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9ème', '9ème');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10ème', '10ème');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11ème', '11ème');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12ème', '12ème');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13ème', '13ème');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14ème', '14ème');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15ème', '15ème');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16ème', '16ème');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17ème', '17ème');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18ème', '18ème');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19ème', '19ème');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20ème', '20ème');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21ème', '21ème');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22ème', '22ème');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23ème', '23ème');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24ème', '24ème');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25ème', '25ème');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26ème', '26ème');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27ème', '27ème');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28ème', '28ème');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29ème', '29ème');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30ème', '30ème');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31ème', '31ème');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('fr');
var expected = 'janvier janv._février févr._mars mars_avril avr._mai mai_juin juin_juillet juil._août août_septembre sept._octobre oct._novembre nov._décembre déc.'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('fr');
var expected = 'dimanche dim. Di_lundi lun. Lu_mardi mar. Ma_mercredi mer. Me_jeudi jeu. Je_vendredi ven. Ve_samedi sam. Sa'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('fr');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "quelques secondes", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "une minute", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "une minute", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutes", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutes", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "une heure", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "une heure", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 heures", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 heures", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 heures", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un jour", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un jour", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 jours", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un jour", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 jours", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 jours", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mois", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mois", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mois", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mois", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mois", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mois", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mois", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mois", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mois", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "une année", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "une année", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 années", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "une année", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 années", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('fr');
test.equal(moment(30000).from(0), "dans quelques secondes", "prefix");
test.equal(moment(0).from(30000), "il y a quelques secondes", "suffix");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('fr');
test.equal(moment().add({s:30}).fromNow(), "dans quelques secondes", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "dans 5 jours", "in 5 days");
test.done();
},
"same day" : function(test) {
test.expect(6);
moment.lang('fr');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "Aujourd'hui à 02:00", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "Aujourd'hui à 02:25", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "Aujourd'hui à 03:00", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "Demain à 02:00", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "Aujourd'hui à 01:00", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "Hier à 02:00", "yesterday at the same time");
test.done();
},
"same next week" : function(test) {
test.expect(15);
moment.lang('fr');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [à] LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [à] LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [à] LT'), "Today + " + i + " days end of day");
}
test.done();
},
"same last week" : function(test) {
test.expect(15);
moment.lang('fr');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('dddd [dernier à] LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [dernier à] LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [dernier à] LT'), "Today - " + i + " days end of day");
}
test.done();
},
"same all else" : function(test) {
test.expect(4);
moment.lang('fr');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

241
node_modules/moment/test/lang/fr.js generated vendored Normal file
View File

@@ -0,0 +1,241 @@
var moment = require("../../moment");
/**************************************************
French
*************************************************/
exports["lang:fr"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('fr');
var tests = 'janvier janv._février févr._mars mars_avril avr._mai mai_juin juin_juillet juil._août août_septembre sept._octobre oct._novembre nov._décembre déc.'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('fr');
var a = [
['dddd, MMMM Do YYYY, h:mm:ss a', 'dimanche, février 14ème 2010, 3:25:50 pm'],
['ddd, hA', 'dim., 3PM'],
['M Mo MM MMMM MMM', '2 2ème 02 février févr.'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14ème 14'],
['d do dddd ddd dd', '0 0ème dimanche dim. Di'],
['DDD DDDo DDDD', '45 45ème 045'],
['w wo ww', '8 8ème 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45ème day of the year'],
['L', '14/02/2010'],
['LL', '14 février 2010'],
['LLL', '14 février 2010 15:25'],
['LLLL', 'dimanche 14 février 2010 15:25']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('fr');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1er', '1er');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2ème', '2ème');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3ème', '3ème');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4ème', '4ème');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5ème', '5ème');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6ème', '6ème');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7ème', '7ème');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8ème', '8ème');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9ème', '9ème');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10ème', '10ème');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11ème', '11ème');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12ème', '12ème');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13ème', '13ème');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14ème', '14ème');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15ème', '15ème');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16ème', '16ème');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17ème', '17ème');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18ème', '18ème');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19ème', '19ème');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20ème', '20ème');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21ème', '21ème');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22ème', '22ème');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23ème', '23ème');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24ème', '24ème');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25ème', '25ème');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26ème', '26ème');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27ème', '27ème');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28ème', '28ème');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29ème', '29ème');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30ème', '30ème');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31ème', '31ème');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('fr');
var expected = 'janvier janv._février févr._mars mars_avril avr._mai mai_juin juin_juillet juil._août août_septembre sept._octobre oct._novembre nov._décembre déc.'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('fr');
var expected = 'dimanche dim. Di_lundi lun. Lu_mardi mar. Ma_mercredi mer. Me_jeudi jeu. Je_vendredi ven. Ve_samedi sam. Sa'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('fr');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "quelques secondes", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "une minute", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "une minute", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutes", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutes", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "une heure", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "une heure", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 heures", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 heures", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 heures", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un jour", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un jour", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 jours", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un jour", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 jours", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 jours", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mois", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mois", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mois", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mois", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mois", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mois", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mois", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mois", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mois", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "une année", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "une année", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 années", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "une année", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 années", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('fr');
test.equal(moment(30000).from(0), "dans quelques secondes", "prefix");
test.equal(moment(0).from(30000), "il y a quelques secondes", "suffix");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('fr');
test.equal(moment().add({s:30}).fromNow(), "dans quelques secondes", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "dans 5 jours", "in 5 days");
test.done();
},
"same day" : function(test) {
test.expect(6);
moment.lang('fr');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "Aujourd'hui à 02:00", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "Aujourd'hui à 02:25", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "Aujourd'hui à 03:00", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "Demain à 02:00", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "Aujourd'hui à 01:00", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "Hier à 02:00", "yesterday at the same time");
test.done();
},
"same next week" : function(test) {
test.expect(15);
moment.lang('fr');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [à] LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [à] LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [à] LT'), "Today + " + i + " days end of day");
}
test.done();
},
"same last week" : function(test) {
test.expect(15);
moment.lang('fr');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('dddd [dernier à] LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [dernier à] LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [dernier à] LT'), "Today - " + i + " days end of day");
}
test.done();
},
"same all else" : function(test) {
test.expect(4);
moment.lang('fr');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

232
node_modules/moment/test/lang/gl.js generated vendored Normal file
View File

@@ -0,0 +1,232 @@
var moment = require("../../moment");
/**************************************************
Galego
*************************************************/
exports["lang:gl"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('gl');
var tests = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Octubro Out._Novembro Nov._Decembro Dec.".split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('es');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('gl');
var expected = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Octubro Out._Novembro Nov._Decembro Dec.".split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('gl');
var expected = "Domingo Dom. Do_Luns Lun. Lu_Martes Mar. Ma_Mércores Mér. Mé_Xoves Xov. Xo_Venres Ven. Ve_Sábado Sáb. Sá".split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('gl');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "uns segundo", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minuto", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minuto", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutos", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutos", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "unha hora", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "unha hora", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 horas", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 horas", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 horas", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un día", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un día", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 días", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un día", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 días", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 días", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mes", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mes", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mes", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 meses", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 meses", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 meses", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mes", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 meses", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 meses", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un ano", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un ano", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anos", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un ano", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anos", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('gl');
test.equal(moment(30000).from(0), "en uns segundo", "prefix");
test.equal(moment(0).from(30000), "fai uns segundo", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('gl');
test.equal(moment().fromNow(), "fai uns segundo", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('gl');
test.equal(moment().add({s:30}).fromNow(), "en uns segundo", "en unos segundos");
test.equal(moment().add({d:5}).fromNow(), "en 5 días", "en 5 días");
test.done();
},
"calendar day" : function(test) {
test.expect(7);
moment.lang('gl');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "hoxe ás 2:00", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "hoxe ás 2:25", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "hoxe ás 3:00", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "mañá ás 2:00", "tomorrow at the same time");
test.equal(moment(a).add({ d: 1, h : -1 }).calendar(), "mañá a 1:00", "tomorrow minus 1 hour");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "hoxe a 1:00", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "onte á 2:00", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('gl');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('gl');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[o] dddd [pasado ' + ((m.hours() !== 1) ? 'ás' : 'a') + '] LT'), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('gl');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
},
"regression tests" : function(test) {
test.expect(1);
moment.lang('gl');
var lastWeek = moment().subtract({ d: 4 }).hours(1);
test.equal(lastWeek.calendar(), lastWeek.format('[o] dddd [pasado a] LT'), "1 o'clock bug");
test.done();
}
};

250
node_modules/moment/test/lang/hu.js generated vendored Normal file
View File

@@ -0,0 +1,250 @@
var moment = require("../../moment");
/**************************************************
English
*************************************************/
exports["lang:hu"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('hu');
var tests = 'január jan_február feb_március márc_április ápr_május máj_június jún_július júl_augusztus aug_szeptember szept_október okt_november nov_december dec'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(16);
moment.lang('hu');
var a = [
['dddd, MMMM Do YYYY, HH:mm:ss', 'vasárnap, február 14. 2010, 15:25:50'],
['ddd, HH', 'v, 15'],
['M Mo MM MMMM MMM', '2 2. 02 február feb'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14. 14'],
['d do dddd ddd', '0 0. vasárnap v'],
['DDD DDDo DDDD', '45 45. 045'],
['w wo ww', '8 8. 08'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['\\az év DDDo n\\apj\\a', 'az év 45. napja'],
['L', '2010.02.14.'],
['LL', '2010. február 14.'],
['LLL', '2010. február 14., 15:25'],
['LLLL', '2010. február 14., vasárnap 15:25']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('hu');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('hu');
var expected = 'január jan_február feb_március márc_április ápr_május máj_június jún_július júl_augusztus aug_szeptember szept_október okt_november nov_december dec'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('hu');
var expected = 'vasárnap v_hétfő h_kedd k_szerda sze_csütörtök cs_péntek p_szombat szo'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('hu');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "néhány másodperc", "44 másodperc = néhány másodperc");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "egy perc", "45 másodperc = egy perc");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "egy perc", "89 másodperc = egy perc");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 perc", "90 másodperc = 2 perc");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 perc", "44 perc = 44 perc");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "egy óra", "45 perc = egy óra");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "egy óra", "89 perc = egy óra");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 óra", "90 perc = 2 óra");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 óra", "5 óra = 5 óra");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 óra", "21 óra = 21 óra");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "egy nap", "22 óra = egy nap");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "egy nap", "35 óra = egy nap");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 nap", "36 óra = 2 nap");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "egy nap", "1 nap = egy nap");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 nap", "5 nap = 5 nap");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 nap", "25 nap = 25 nap");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "egy hónap", "26 nap = egy hónap");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "egy hónap", "30 nap = egy hónap");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "egy hónap", "45 nap = egy hónap");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 hónap", "46 nap = 2 hónap");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 hónap", "75 nap = 2 hónap");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 hónap", "76 nap = 3 hónap");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "egy hónap", "1 hónap = egy hónap");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 hónap", "5 hónap = 5 hónap");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 hónap", "344 nap = 11 hónap");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "egy év", "345 nap = egy év");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "egy év", "547 nap = egy év");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 év", "548 nap = 2 év");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "egy év", "1 év = egy év");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 év", "5 év = 5 év");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('hu');
test.equal(moment(30000).from(0), "néhány másodperc múlva", "prefix");
test.equal(moment(0).from(30000), "néhány másodperce", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('hu');
test.equal(moment().fromNow(), "néhány másodperce", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('hu');
test.equal(moment().add({s:30}).fromNow(), "néhány másodperc múlva", "néhány másodperc múlva");
test.equal(moment().add({d:5}).fromNow(), "5 nap múlva", "5 nap múlva");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('hu');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "ma 2:00-kor", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "ma 2:25-kor", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "ma 3:00-kor", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "holnap 2:00-kor", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "ma 1:00-kor", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "tegnap 2:00-kor", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('hu');
var i;
var m;
var days = 'vasárnap_hétfőn_kedden_szerdán_csütörtökön_pénteken_szombaton'.split('_');
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('['+days[m.day()]+'] LT[-kor]'), "today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('['+days[m.day()]+'] LT[-kor]'), "today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('['+days[m.day()]+'] LT[-kor]'), "today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('hu');
var days = 'vasárnap_hétfőn_kedden_szerdán_csütörtökön_pénteken_szombaton'.split('_');
for (var i = 2; i < 7; i++) {
var m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('múlt ['+days[m.day()]+'] LT[-kor]'), "today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('múlt ['+days[m.day()]+'] LT[-kor]'), "today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('múlt ['+days[m.day()]+'] LT[-kor]'), "today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('hu');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "egy héte");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "egy hét múlva");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 hete");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "2 hét múlva");
test.done();
}
};

254
node_modules/moment/test/lang/is.js generated vendored Normal file
View File

@@ -0,0 +1,254 @@
var moment = require("../../moment");
/**************************************************
Icelandic
*************************************************/
exports["lang:is"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('is');
var tests = 'janúar jan_febrúar feb_mars mar_apríl apr_maí maí_júní jún_júlí júl_ágúst ágú_september sep_október okt_nóvember nóv_desember des'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('is');
var a = [
['dddd, Do MMMM YYYY, h:mm:ss a', 'sunnudagur, 14. febrúar 2010, 3:25:50 pm'],
['ddd, hA', 'sun, 3PM'],
['M Mo MM MMMM MMM', '2 2. 02 febrúar feb'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14. 14'],
['d do dddd ddd dd', '0 0. sunnudagur sun Su'],
['DDD DDDo DDDD', '45 45. 045'],
['w wo ww', '8 8. 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45. day of the year'],
['L', '14/02/2010'],
['LL', '14. febrúar 2010'],
['LLL', '14. febrúar 2010 kl. 15:25'],
['LLLL', 'sunnudagur, 14. febrúar 2010 kl. 15:25']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('is');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2.', '2.');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3.', '3.');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4.', '4.');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5.', '5.');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6.', '6.');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7.', '7.');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8.', '8.');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9.', '9.');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10.', '10.');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11.', '11.');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12.', '12.');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13.', '13.');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14.', '14.');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15.', '15.');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16.', '16.');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17.', '17.');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18.', '18.');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19.', '19.');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20.', '20.');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21.', '21.');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22.', '22.');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23.', '23.');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24.', '24.');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25.', '25.');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26.', '26.');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27.', '27.');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28.', '28.');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29.', '29.');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30.', '30.');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31.', '31.');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('is');
var expected = 'janúar jan_febrúar feb_mars mar_apríl apr_maí maí_júní jún_júlí júl_ágúst ágú_september sep_október okt_nóvember nóv_desember des'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('is');
var expected = 'sunnudagur sun Su_mánudagur mán Má_þriðjudagur þri Þr_miðvikudagur mið Mi_fimmtudagur fim Fi_föstudagur fös Fö_laugardagur lau La'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(34);
moment.lang('is');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "nokkrar sekúndur", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "mínúta", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "mínúta", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 mínútur", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 mínútur", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:21}), true), "21 mínúta", "21 minutes = 21 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "klukkustund", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "klukkustund", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 klukkustundir", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 klukkustundir", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 klukkustund", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "dagur", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "dagur", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dagar", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "dagur", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dagar", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dagar", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:11}), true), "11 dagar", "11 days = 11 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:21}), true), "21 dagur", "21 days = 21 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "mánuður", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "mánuður", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "mánuður", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mánuðir", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mánuðir", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mánuðir", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "mánuður", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mánuðir", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mánuðir", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "ár", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "ár", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 ár", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "ár", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 ár", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:21}), true), "21 ár", "21 years = 21 years");
test.done();
},
"suffix" : function(test) {
test.expect(3);
moment.lang('is');
test.equal(moment(30000).from(0), "eftir nokkrar sekúndur", "prefix");
test.equal(moment(0).from(30000), "fyrir nokkrum sekúndum síðan", "suffix");
test.equal(moment().subtract({m:1}).fromNow(), "fyrir mínútu síðan", "a minute ago");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('is');
test.equal(moment().fromNow(), "fyrir nokkrum sekúndum síðan", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(3);
moment.lang('is');
test.equal(moment().add({s:30}).fromNow(), "eftir nokkrar sekúndur", "in a few seconds");
test.equal(moment().add({m:1}).fromNow(), "eftir mínútu", "in a minute");
test.equal(moment().add({d:5}).fromNow(), "eftir 5 daga", "in 5 days");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('is');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "í dag kl. 2:00", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "í dag kl. 2:25", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "í dag kl. 3:00", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "á morgun kl. 2:00", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "í dag kl. 1:00", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "í gær kl. 2:00", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('is');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [kl.] LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [kl.] LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [kl.] LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('is');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[síðasta] dddd [kl.] LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[síðasta] dddd [kl.] LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[síðasta] dddd [kl.] LT'), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('is');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

241
node_modules/moment/test/lang/it.js generated vendored Normal file
View File

@@ -0,0 +1,241 @@
var moment = require("../../moment");
/**************************************************
Italian
*************************************************/
exports["lang:it"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('it');
var tests = 'Gennaio Gen_Febbraio Feb_Marzo Mar_Aprile Apr_Maggio Mag_Giugno Giu_Luglio Lug_Agosto Ago_Settembre Set_Ottobre Ott_Novembre Nov_Dicembre Dic'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('it');
var a = [
['dddd, MMMM Do YYYY, h:mm:ss a', 'Domenica, Febbraio 14º 2010, 3:25:50 pm'],
['ddd, hA', 'Dom, 3PM'],
['M Mo MM MMMM MMM', '2 2º 02 Febbraio Feb'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14º 14'],
['d do dddd ddd dd', '0 0º Domenica Dom D'],
['DDD DDDo DDDD', '45 45º 045'],
['w wo ww', '8 8º 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', 'pm PM'],
['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45º day of the year'],
['L', '14/02/2010'],
['LL', '14 Febbraio 2010'],
['LLL', '14 Febbraio 2010 15:25'],
['LLLL', 'Domenica, 14 Febbraio 2010 15:25']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('it');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2º', '2º');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3º', '3º');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4º', '4º');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5º', '5º');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6º', '6º');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7º', '7º');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8º', '8º');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9º', '9º');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10º', '10º');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11º', '11º');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12º', '12º');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13º', '13º');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14º', '14º');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15º', '15º');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16º', '16º');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17º', '17º');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18º', '18º');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19º', '19º');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20º', '20º');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21º', '21º');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22º', '22º');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23º', '23º');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24º', '24º');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25º', '25º');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26º', '26º');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27º', '27º');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28º', '28º');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29º', '29º');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30º', '30º');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31º', '31º');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('it');
var expected = 'Gennaio Gen_Febbraio Feb_Marzo Mar_Aprile Apr_Maggio Mag_Giugno Giu_Luglio Lug_Agosto Ago_Settembre Set_Ottobre Ott_Novembre Nov_Dicembre Dic'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('it');
var expected = 'Domenica Dom D_Lunedì Lun L_Martedì Mar Ma_Mercoledì Mer Me_Giovedì Gio G_Venerdì Ven V_Sabato Sab S'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('it');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "secondi", "44 seconds = seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minuto", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minuto", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuti", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuti", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "un'ora", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "un'ora", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 ore", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 ore", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 ore", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un giorno", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un giorno", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 giorni", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un giorno", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 giorni", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 giorni", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "un mese", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "un mese", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "un mese", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mesi", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mesi", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mesi", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "un mese", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mesi", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mesi", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un anno", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un anno", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 anni", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un anno", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anni", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('it');
test.equal(moment(30000).from(0), "in secondi", "prefix");
test.equal(moment(0).from(30000), "secondi fa", "suffix");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('it');
test.equal(moment().add({s:30}).fromNow(), "in secondi", "in seconds");
test.equal(moment().add({d:5}).fromNow(), "in 5 giorni", "in 5 days");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('it');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "Oggi alle 02:00", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "Oggi alle 02:25", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "Oggi alle 03:00", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "Domani alle 02:00", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "Oggi alle 01:00", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "Ieri alle 02:00", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('it');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [alle] LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd [alle] LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd [alle] LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('it');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[lo scorso] dddd [alle] LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[lo scorso] dddd [alle] LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[lo scorso] dddd [alle] LT'), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('it');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

208
node_modules/moment/test/lang/ja.js generated vendored Normal file
View File

@@ -0,0 +1,208 @@
var moment = require("../../moment");
/**************************************************
Japanese
*************************************************/
exports["lang:jp"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('ja');
var tests = '1月 1月_2月 2月_3月 3月_4月 4月_5月 5月_6月 6月_7月 7月_8月 8月_9月 9月_10月 10月_11月 11月_12月 12月'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('ja');
var a = [
['dddd, MMMM Do YYYY, a h:mm:ss', '日曜日, 2月 14 2010, 午後 3:25:50'],
['ddd, Ah', '日, 午後3'],
['M Mo MM MMMM MMM', '2 2 02 2月 2月'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14 14'],
['d do dddd ddd dd', '0 0 日曜日 日 日'],
['DDD DDDo DDDD', '45 45 045'],
['w wo ww', '8 8 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', '午後 午後'],
['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45 day of the year'],
['L', '2010/02/14'],
['LL', '2010年2月14日'],
['LLL', '2010年2月14日午後3時25分'],
['LLLL', '2010年2月14日午後3時25分 日曜日']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('ja');
var expected = '1月 1月_2月 2月_3月 3月_4月 4月_5月 5月_6月 6月_7月 7月_8月 8月_9月 9月_10月 10月_11月 11月_12月 12月'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('ja');
var expected = '日曜日 日 日_月曜日 月 月_火曜日 火 火_水曜日 水 水_木曜日 木 木_金曜日 金 金_土曜日 土 土'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('ja');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "数秒", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "1分", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "1分", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2分", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44分", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "1時間", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "1時間", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2時間", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5時間", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21時間", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "1日", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "1日", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2日", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "1日", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5日", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25日", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "1ヶ月", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "1ヶ月", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "1ヶ月", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2ヶ月", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2ヶ月", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3ヶ月", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "1ヶ月", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5ヶ月", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11ヶ月", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "1年", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "1年", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2年", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "1年", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5年", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('ja');
test.equal(moment(30000).from(0), "数秒後", "prefix");
test.equal(moment(0).from(30000), "数秒前", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('ja');
test.equal(moment().fromNow(), "数秒前", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('ja');
test.equal(moment().add({s:30}).fromNow(), "数秒後", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "5日後", "in 5 days");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('ja');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "今日 午前2時0分", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "今日 午前2時25分", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "今日 午前3時0分", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "明日 午前2時0分", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "今日 午前1時0分", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "昨日 午前2時0分", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('ja');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('[来週]dddd LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[来週]dddd LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[来週]dddd LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('ja');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[前週]dddd LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[前週]dddd LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[前週]dddd LT'), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('ja');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

208
node_modules/moment/test/lang/jp.js generated vendored Normal file
View File

@@ -0,0 +1,208 @@
var moment = require("../../moment");
/**************************************************
Japanese
*************************************************/
exports["lang:jp"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('jp');
var tests = '1月 1月_2月 2月_3月 3月_4月 4月_5月 5月_6月 6月_7月 7月_8月 8月_9月 9月_10月 10月_11月 11月_12月 12月'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('jp');
var a = [
['dddd, MMMM Do YYYY, a h:mm:ss', '日曜日, 2月 14 2010, 午後 3:25:50'],
['ddd, Ah', '日, 午後3'],
['M Mo MM MMMM MMM', '2 2 02 2月 2月'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14 14'],
['d do dddd ddd dd', '0 0 日曜日 日 日'],
['DDD DDDo DDDD', '45 45 045'],
['w wo ww', '8 8 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', '午後 午後'],
['t\\he DDDo \\d\\ay of t\\he ye\\ar', 'the 45 day of the year'],
['L', '2010/02/14'],
['LL', '2010年2月14日'],
['LLL', '2010年2月14日午後3時25分'],
['LLLL', '2010年2月14日午後3時25分 日曜日']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('jp');
var expected = '1月 1月_2月 2月_3月 3月_4月 4月_5月 5月_6月 6月_7月 7月_8月 8月_9月 9月_10月 10月_11月 11月_12月 12月'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('jp');
var expected = '日曜日 日 日_月曜日 月 月_火曜日 火 火_水曜日 水 水_木曜日 木 木_金曜日 金 金_土曜日 土 土'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('jp');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "数秒", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "1分", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "1分", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2分", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44分", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "1時間", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "1時間", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2時間", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5時間", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21時間", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "1日", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "1日", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2日", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "1日", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5日", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25日", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "1ヶ月", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "1ヶ月", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "1ヶ月", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2ヶ月", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2ヶ月", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3ヶ月", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "1ヶ月", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5ヶ月", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11ヶ月", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "1年", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "1年", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2年", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "1年", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5年", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('jp');
test.equal(moment(30000).from(0), "数秒後", "prefix");
test.equal(moment(0).from(30000), "数秒前", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('jp');
test.equal(moment().fromNow(), "数秒前", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('jp');
test.equal(moment().add({s:30}).fromNow(), "数秒後", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "5日後", "in 5 days");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('jp');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "今日 午前2時0分", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "今日 午前2時25分", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "今日 午前3時0分", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "明日 午前2時0分", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "今日 午前1時0分", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "昨日 午前2時0分", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('jp');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('[来週]dddd LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[来週]dddd LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[来週]dddd LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('jp');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[前週]dddd LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[前週]dddd LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[前週]dddd LT'), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('jp');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

247
node_modules/moment/test/lang/ko.js generated vendored Normal file
View File

@@ -0,0 +1,247 @@
var moment = require("../../moment");
/**************************************************
Korean
*************************************************/
exports["lang:kr"] = {
"parse" : function(test) {
test.expect(96);
moment.lang('ko');
var tests = '1월 1월_2월 2월_3월 3월_4월 4월_5월 5월_6월 6월_7월 7월_8월 8월_9월 9월_10월 10월_11월 11월_12월 12월'.split("_");
var i;
function equalTest(input, mmm, i) {
test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));
}
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');
equalTest(tests[i][0], 'MMM', i);
equalTest(tests[i][1], 'MMM', i);
equalTest(tests[i][0], 'MMMM', i);
equalTest(tests[i][1], 'MMMM', i);
equalTest(tests[i][0].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleLowerCase(), 'MMMM', i);
equalTest(tests[i][0].toLocaleUpperCase(), 'MMMM', i);
equalTest(tests[i][1].toLocaleUpperCase(), 'MMMM', i);
}
test.done();
},
"format" : function(test) {
test.expect(18);
moment.lang('ko');
var a = [
['YYYY년 MMMM Do dddd a h:mm:ss', '2010년 2월 14일 일요일 오후 3:25:50'],
['ddd A h', '일 오후 3'],
['M Mo MM MMMM MMM', '2 2일 02 2월 2월'],
['YYYY YY', '2010 10'],
['D Do DD', '14 14일 14'],
['d do dddd ddd dd', '0 0일 일요일 일 일'],
['DDD DDDo DDDD', '45 45일 045'],
['w wo ww', '8 8일 08'],
['h hh', '3 03'],
['H HH', '15 15'],
['m mm', '25 25'],
['s ss', '50 50'],
['a A', '오후 오후'],
['일년 중 DDDo째 되는 날', '일년 중 45일째 되는 날'],
['L', '2010.02.14'],
['LL', '2010년 2월 14일'],
['LLL', '2010년 2월 14일 오후 3시 25분'],
['LLLL', '2010년 2월 14일 일요일 오후 3시 25분']
],
b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
i;
for (i = 0; i < a.length; i++) {
test.equal(b.format(a[i][0]), a[i][1], a[i][0] + ' ---> ' + a[i][1]);
}
test.done();
},
"format ordinal" : function(test) {
test.expect(31);
moment.lang('ko');
test.equal(moment([2011, 0, 1]).format('DDDo'), '1일', '1일');
test.equal(moment([2011, 0, 2]).format('DDDo'), '2일', '2일');
test.equal(moment([2011, 0, 3]).format('DDDo'), '3일', '3일');
test.equal(moment([2011, 0, 4]).format('DDDo'), '4일', '4일');
test.equal(moment([2011, 0, 5]).format('DDDo'), '5일', '5일');
test.equal(moment([2011, 0, 6]).format('DDDo'), '6일', '6일');
test.equal(moment([2011, 0, 7]).format('DDDo'), '7일', '7일');
test.equal(moment([2011, 0, 8]).format('DDDo'), '8일', '8일');
test.equal(moment([2011, 0, 9]).format('DDDo'), '9일', '9일');
test.equal(moment([2011, 0, 10]).format('DDDo'), '10일', '10일');
test.equal(moment([2011, 0, 11]).format('DDDo'), '11일', '11일');
test.equal(moment([2011, 0, 12]).format('DDDo'), '12일', '12일');
test.equal(moment([2011, 0, 13]).format('DDDo'), '13일', '13일');
test.equal(moment([2011, 0, 14]).format('DDDo'), '14일', '14일');
test.equal(moment([2011, 0, 15]).format('DDDo'), '15일', '15일');
test.equal(moment([2011, 0, 16]).format('DDDo'), '16일', '16일');
test.equal(moment([2011, 0, 17]).format('DDDo'), '17일', '17일');
test.equal(moment([2011, 0, 18]).format('DDDo'), '18일', '18일');
test.equal(moment([2011, 0, 19]).format('DDDo'), '19일', '19일');
test.equal(moment([2011, 0, 20]).format('DDDo'), '20일', '20일');
test.equal(moment([2011, 0, 21]).format('DDDo'), '21일', '21일');
test.equal(moment([2011, 0, 22]).format('DDDo'), '22일', '22일');
test.equal(moment([2011, 0, 23]).format('DDDo'), '23일', '23일');
test.equal(moment([2011, 0, 24]).format('DDDo'), '24일', '24일');
test.equal(moment([2011, 0, 25]).format('DDDo'), '25일', '25일');
test.equal(moment([2011, 0, 26]).format('DDDo'), '26일', '26일');
test.equal(moment([2011, 0, 27]).format('DDDo'), '27일', '27일');
test.equal(moment([2011, 0, 28]).format('DDDo'), '28일', '28일');
test.equal(moment([2011, 0, 29]).format('DDDo'), '29일', '29일');
test.equal(moment([2011, 0, 30]).format('DDDo'), '30일', '30일');
test.equal(moment([2011, 0, 31]).format('DDDo'), '31일', '31일');
test.done();
},
"format month" : function(test) {
test.expect(12);
moment.lang('ko');
var expected = '1월 1월_2월 2월_3월 3월_4월 4월_5월 5월_6월 6월_7월 7월_8월 8월_9월 9월_10월 10월_11월 11월_12월 12월'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);
}
test.done();
},
"format week" : function(test) {
test.expect(7);
moment.lang('ko');
var expected = '일요일 일 일_월요일 월 월_화요일 화 화_수요일 수 수_목요일 목 목_금요일 금 금_토요일 토 토'.split("_");
var i;
for (i = 0; i < expected.length; i++) {
test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);
}
test.done();
},
"from" : function(test) {
test.expect(30);
moment.lang('ko');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "몇초", "44초 = 몇초");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "일분", "45초 = 일분");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "일분", "89초 = 일분");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2분", "90초 = 2분");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44분", "44분 = 44분");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "한시간", "45분 = 한시간");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "한시간", "89분 = 한시간");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2시간", "90분 = 2시간");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5시간", "5시간 = 5시간");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21시간", "21시간 = 21시간");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "하루", "22시간 = 하루");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "하루", "35시간 = 하루");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2일", "36시간 = 2일");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "하루", "하루 = 하루");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5일", "5일 = 5일");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25일", "25일 = 25일");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "한달", "26일 = 한달");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "한달", "30일 = 한달");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "한달", "45일 = 한달");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2달", "46일 = 2달");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2달", "75일 = 2달");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3달", "76일 = 3달");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "한달", "1달 = 한달");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5달", "5달 = 5달");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11달", "344일 = 11달");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "일년", "345일 = 일년");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "일년", "547일 = 일년");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2년", "548일 = 2년");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "일년", "일년 = 일년");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5년", "5년 = 5년");
test.done();
},
"suffix" : function(test) {
test.expect(2);
moment.lang('ko');
test.equal(moment(30000).from(0), "몇초 후", "prefix");
test.equal(moment(0).from(30000), "몇초 전", "suffix");
test.done();
},
"now from now" : function(test) {
test.expect(1);
moment.lang('ko');
test.equal(moment().fromNow(), "몇초 전", "now from now should display as in the past");
test.done();
},
"fromNow" : function(test) {
test.expect(2);
moment.lang('ko');
test.equal(moment().add({s:30}).fromNow(), "몇초 후", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "5일 후", "in 5 days");
test.done();
},
"calendar day" : function(test) {
test.expect(6);
moment.lang('ko');
var a = moment().hours(2).minutes(0).seconds(0);
test.equal(moment(a).calendar(), "오늘 오전 2시 00분", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "오늘 오전 2시 25분", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "오늘 오전 3시 00분", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "내일 오전 2시 00분", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "오늘 오전 1시 00분", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "어제 오전 2시 00분", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
test.expect(15);
moment.lang('ko');
var i;
var m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('dddd LT'), "Today + " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('dddd LT'), "Today + " + i + " days end of day");
}
test.done();
},
"calendar last week" : function(test) {
test.expect(15);
moment.lang('ko');
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('지난주 dddd LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('지난주 dddd LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('지난주 dddd LT'), "Today - " + i + " days end of day");
}
test.done();
},
"calendar all else" : function(test) {
test.expect(4);
moment.lang('ko');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");
weeksAgo = moment().subtract({ w: 2 });
weeksFromNow = moment().add({ w: 2 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "2 weeks ago");
test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
}
};

Some files were not shown because too many files have changed in this diff Show More