Socket
Socket
Sign inDemoInstall

moment

Package Overview
Dependencies
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

moment - npm Package Compare versions

Comparing version 2.1.0 to 2.2.1

.vimrc-local

4

composer.json
{
"name": "timrwood/moment",
"name": "moment/moment",
"description": "Parse, validate, manipulate, and display dates in javascript.",

@@ -15,5 +15,5 @@ "keywords": [

],
"homepage": "http://github.com/timrwood/moment/",
"homepage": "http://github.com/moment/moment/",
"author": "Tim Wood <washwithcare@gmail.com> (http://timwoodcreates.com/)",
"license": "MIT"
}

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

var fs = require('fs');
module.exports = function (grunt) {
var minifiedFiles = {
'min/langs.min.js' : ['min/langs.js'],
'min/moment.min.js' : ['moment.js']
},
minLangs = {
langs: {
src: ['min/langs.js'],
dest: 'min/langs.min.js'
}
};
// all the lang files need to be added manually
fs.readdirSync('./lang').forEach(function (path) {
if (path.indexOf('.js') > -1) {
var dest = 'min/lang/' + path,
src = ['lang/' + path];
minifiedFiles[dest] = src;
minLangs[path] = {src: src, dest: dest};
}
});
grunt.initConfig({

@@ -31,25 +6,16 @@ pkg: grunt.file.readJSON('package.json'),

langs: {
src: ['lang/*.js'],
src: 'lang/*.js',
dest: 'min/langs.js'
}
},
concatlang : {
langs: {
src: ['lang/*.js'],
dest: 'min/langs.js'
}
},
minlang : minLangs,
minwithcomments : {
moment: {
src: ['moment.js'],
dest: 'min/moment.min.js'
}
},
uglify : {
my_target: {
files: minifiedFiles
target: {
files: {
'min/moment+langs.min.js' : 'min/moment+langs.js',
'min/moment+customlangs.min.js' : 'min/moment+customlangs.js',
'min/langs.min.js' : 'min/langs.js',
'min/moment.min.js' : 'moment.js'
}
},
options: {
fromString: true,
mangle: true,

@@ -61,3 +27,5 @@ compress: {

ascii_only: true
}
},
report: 'min',
preserveComments: 'some'
}

@@ -69,3 +37,3 @@ },

jshint: {
all: ["Gruntfile.js", "moment.js", "lang/**/*.js"],
all: ["Gruntfile.js", "moment.js", "lang/**/*.js", "test/**/*.js"],
options: {

@@ -94,3 +62,6 @@ "node" : true,

"strict" : false,
"white" : true
"white" : true,
"globals": {
"define": false
}
}

@@ -111,2 +82,11 @@ },

}
},
embed_languages: {
moment: 'moment.js',
dest: grunt.option('embed_languages') ?
'min/moment+customlangs.js' :
'min/moment+langs.js',
targetLangs: grunt.option('embed_languages') ?
'lang/{' + grunt.option('embed_languages') + '}.js':
'lang/*.js'
}

@@ -126,5 +106,6 @@ });

grunt.registerTask('default', ['jshint', 'nodeunit']);
grunt.registerTask('test', ['nodeunit']);
// Task to be run when releasing a new version
grunt.registerTask('release', ['jshint', 'nodeunit', 'minwithcomments', 'concatlang', 'minlang']);
grunt.registerTask('release', ['jshint', 'nodeunit', 'concat', 'embed_languages', 'uglify']);
};

@@ -6,42 +6,52 @@ // moment.js language configuration

require('../moment').lang('ar-ma', {
months : "يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),
monthsShort : "يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),
weekdays : "الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
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',
nextWeek: 'dddd [على الساعة] LT',
lastDay: '[أمس على الساعة] LT',
lastWeek: '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 سنوات"
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('ar-ma', {
months : "يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),
monthsShort : "يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),
weekdays : "الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
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',
nextWeek: 'dddd [على الساعة] LT',
lastDay: '[أمس على الساعة] LT',
lastWeek: '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 سنوات"
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
}));

@@ -6,42 +6,52 @@ // moment.js language configuration

require('../moment').lang('ar', {
months : "يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"),
monthsShort : "يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"),
weekdays : "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
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',
nextWeek: 'dddd [على الساعة] LT',
lastDay: '[أمس على الساعة] LT',
lastWeek: '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 سنوات"
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('ar', {
months : "يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"),
monthsShort : "يناير/ كانون الثاني_فبراير/ شباط_مارس/ آذار_أبريل/ نيسان_مايو/ أيار_يونيو/ حزيران_يوليو/ تموز_أغسطس/ آب_سبتمبر/ أيلول_أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول".split("_"),
weekdays : "الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),
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',
nextWeek: 'dddd [على الساعة] LT',
lastDay: '[أمس على الساعة] LT',
lastWeek: '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 سنوات"
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
}));

@@ -5,73 +5,83 @@ // moment.js language configuration

require('../moment').lang('bg', {
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';
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('bg', {
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) {
var lastDigit = number % 10,
last2Digits = number % 100;
if (number === 0) {
return number + '-ев';
} else if (last2Digits === 0) {
return number + '-ен';
} else if (last2Digits > 10 && last2Digits < 20) {
return number + '-ти';
} else if (lastDigit === 1) {
return number + '-ви';
} else if (lastDigit === 2) {
return number + '-ри';
} else if (lastDigit === 7 || lastDigit === 8) {
return number + '-ми';
} else {
return number + '-ти';
}
},
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) {
var lastDigit = number % 10,
last2Digits = number % 100;
if (number === 0) {
return number + '-ев';
} else if (last2Digits === 0) {
return number + '-ен';
} else if (last2Digits > 10 && last2Digits < 20) {
return number + '-ти';
} else if (lastDigit === 1) {
return number + '-ви';
} else if (lastDigit === 2) {
return number + '-ри';
} else if (lastDigit === 7 || lastDigit === 8) {
return number + '-ми';
} else {
return number + '-ти';
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
});
}));

@@ -5,94 +5,104 @@ // moment.js language configuration

function relativeTimeWithMutation(number, withoutSuffix, key) {
var format = {
'mm': "munutenn",
'MM': "miz",
'dd': "devezh"
};
return number + ' ' + mutation(format[key], number);
}
function specialMutationForYears(number) {
switch (lastNumber(number)) {
case 1:
case 3:
case 4:
case 5:
case 9:
return number + ' bloaz';
default:
return number + ' vloaz';
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}
}(function (moment) {
function relativeTimeWithMutation(number, withoutSuffix, key) {
var format = {
'mm': "munutenn",
'MM': "miz",
'dd': "devezh"
};
return number + ' ' + mutation(format[key], number);
}
function lastNumber(number) {
if (number > 9) {
return lastNumber(number % 10);
function specialMutationForYears(number) {
switch (lastNumber(number)) {
case 1:
case 3:
case 4:
case 5:
case 9:
return number + ' bloaz';
default:
return number + ' vloaz';
}
}
return number;
}
function mutation(text, number) {
if (number === 2) {
return softMutation(text);
function lastNumber(number) {
if (number > 9) {
return lastNumber(number % 10);
}
return number;
}
return text;
}
function softMutation(text) {
var mutationTable = {
'm': 'v',
'b': 'v',
'd': 'z'
};
if (mutationTable[text.charAt(0)] === undefined) {
function mutation(text, number) {
if (number === 2) {
return softMutation(text);
}
return text;
}
return mutationTable[text.charAt(0)] + text.substring(1);
}
require('../moment').lang('br', {
months : "Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),
monthsShort : "Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),
weekdays : "Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),
weekdaysShort : "Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),
weekdaysMin : "Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),
longDateFormat : {
LT : "h[e]mm A",
L : "DD/MM/YYYY",
LL : "D [a viz] MMMM YYYY",
LLL : "D [a viz] MMMM YYYY LT",
LLLL : "dddd, D [a viz] MMMM YYYY LT"
},
calendar : {
sameDay : '[Hiziv da] LT',
nextDay : '[Warc\'hoazh da] LT',
nextWeek : 'dddd [da] LT',
lastDay : '[Dec\'h da] LT',
lastWeek : 'dddd [paset da] LT',
sameElse : 'L'
},
relativeTime : {
future : "a-benn %s",
past : "%s 'zo",
s : "un nebeud segondennoù",
m : "ur vunutenn",
mm : relativeTimeWithMutation,
h : "un eur",
hh : "%d eur",
d : "un devezh",
dd : relativeTimeWithMutation,
M : "ur miz",
MM : relativeTimeWithMutation,
y : "ur bloaz",
yy : specialMutationForYears
},
ordinal : function (number) {
var output = (number === 1) ? 'añ' : 'vet';
return number + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
function softMutation(text) {
var mutationTable = {
'm': 'v',
'b': 'v',
'd': 'z'
};
if (mutationTable[text.charAt(0)] === undefined) {
return text;
}
return mutationTable[text.charAt(0)] + text.substring(1);
}
});
moment.lang('br', {
months : "Genver_C'hwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),
monthsShort : "Gen_C'hwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),
weekdays : "Sul_Lun_Meurzh_Merc'her_Yaou_Gwener_Sadorn".split("_"),
weekdaysShort : "Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),
weekdaysMin : "Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),
longDateFormat : {
LT : "h[e]mm A",
L : "DD/MM/YYYY",
LL : "D [a viz] MMMM YYYY",
LLL : "D [a viz] MMMM YYYY LT",
LLLL : "dddd, D [a viz] MMMM YYYY LT"
},
calendar : {
sameDay : '[Hiziv da] LT',
nextDay : '[Warc\'hoazh da] LT',
nextWeek : 'dddd [da] LT',
lastDay : '[Dec\'h da] LT',
lastWeek : 'dddd [paset da] LT',
sameElse : 'L'
},
relativeTime : {
future : "a-benn %s",
past : "%s 'zo",
s : "un nebeud segondennoù",
m : "ur vunutenn",
mm : relativeTimeWithMutation,
h : "un eur",
hh : "%d eur",
d : "un devezh",
dd : relativeTimeWithMutation,
M : "ur miz",
MM : relativeTimeWithMutation,
y : "ur bloaz",
yy : specialMutationForYears
},
ordinal : function (number) {
var output = (number === 1) ? 'añ' : 'vet';
return number + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,53 +5,63 @@ // moment.js language configuration

require('../moment').lang('ca', {
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';
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('ca', {
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"
},
nextDay : function () {
return '[demà a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] 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'
},
nextWeek : function () {
return 'dddd [a ' + ((this.hours() !== 1) ? 'les' : 'la') + '] LT';
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"
},
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 : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,142 +5,152 @@ // moment.js language configuration

var months = "leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),
monthsShort = "led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_");
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var months = "leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),
monthsShort = "led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_");
function plural(n) {
return (n > 1) && (n < 5) && (~~(n / 10) !== 1);
}
function plural(n) {
return (n > 1) && (n < 5) && (~~(n / 10) !== 1);
}
function translate(number, withoutSuffix, key, isFuture) {
var result = number + " ";
switch (key) {
case 's': // a few seconds / in a few seconds / a few seconds ago
return (withoutSuffix || isFuture) ? 'pár vteřin' : 'pár vteřinami';
case 'm': // a minute / in a minute / a minute ago
return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'minuty' : 'minut');
} else {
return result + 'minutami';
function translate(number, withoutSuffix, key, isFuture) {
var result = number + " ";
switch (key) {
case 's': // a few seconds / in a few seconds / a few seconds ago
return (withoutSuffix || isFuture) ? 'pár vteřin' : 'pár vteřinami';
case 'm': // a minute / in a minute / a minute ago
return withoutSuffix ? 'minuta' : (isFuture ? 'minutu' : 'minutou');
case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'minuty' : 'minut');
} else {
return result + 'minutami';
}
break;
case 'h': // an hour / in an hour / an hour ago
return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
case 'hh': // 9 hours / in 9 hours / 9 hours ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'hodiny' : 'hodin');
} else {
return result + 'hodinami';
}
break;
case 'd': // a day / in a day / a day ago
return (withoutSuffix || isFuture) ? 'den' : 'dnem';
case 'dd': // 9 days / in 9 days / 9 days ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'dny' : 'dní');
} else {
return result + 'dny';
}
break;
case 'M': // a month / in a month / a month ago
return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
case 'MM': // 9 months / in 9 months / 9 months ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'měsíce' : 'měsíců');
} else {
return result + 'měsíci';
}
break;
case 'y': // a year / in a year / a year ago
return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
case 'yy': // 9 years / in 9 years / 9 years ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'roky' : 'let');
} else {
return result + 'lety';
}
break;
}
break;
case 'h': // an hour / in an hour / an hour ago
return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
case 'hh': // 9 hours / in 9 hours / 9 hours ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'hodiny' : 'hodin');
} else {
return result + 'hodinami';
}
break;
case 'd': // a day / in a day / a day ago
return (withoutSuffix || isFuture) ? 'den' : 'dnem';
case 'dd': // 9 days / in 9 days / 9 days ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'dny' : 'dní');
} else {
return result + 'dny';
}
break;
case 'M': // a month / in a month / a month ago
return (withoutSuffix || isFuture) ? 'měsíc' : 'měsícem';
case 'MM': // 9 months / in 9 months / 9 months ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'měsíce' : 'měsíců');
} else {
return result + 'měsíci';
}
break;
case 'y': // a year / in a year / a year ago
return (withoutSuffix || isFuture) ? 'rok' : 'rokem';
case 'yy': // 9 years / in 9 years / 9 years ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'roky' : 'let');
} else {
return result + 'lety';
}
break;
}
}
require('../moment').lang('cs', {
months : months,
monthsShort : monthsShort,
monthsParse : (function (months, monthsShort) {
var i, _monthsParse = [];
for (i = 0; i < 12; i++) {
// use custom parser to solve problem with July (červenec)
_monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
}
return _monthsParse;
}(months, monthsShort)),
weekdays : "neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),
weekdaysShort : "ne_po_út_st_čt_pá_so".split("_"),
weekdaysMin : "ne_po_út_st_čt_pá_so".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: "[dnes v] LT",
nextDay: '[zítra v] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[v neděli v] LT';
case 1:
case 2:
return '[v] dddd [v] LT';
case 3:
return '[ve středu v] LT';
case 4:
return '[ve čtvrtek v] LT';
case 5:
return '[v pátek v] LT';
case 6:
return '[v sobotu v] LT';
moment.lang('cs', {
months : months,
monthsShort : monthsShort,
monthsParse : (function (months, monthsShort) {
var i, _monthsParse = [];
for (i = 0; i < 12; i++) {
// use custom parser to solve problem with July (červenec)
_monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
}
return _monthsParse;
}(months, monthsShort)),
weekdays : "neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),
weekdaysShort : "ne_po_út_st_čt_pá_so".split("_"),
weekdaysMin : "ne_po_út_st_čt_pá_so".split("_"),
longDateFormat : {
LT: "H:mm",
L : "DD.MM.YYYY",
LL : "D. MMMM YYYY",
LLL : "D. MMMM YYYY LT",
LLLL : "dddd D. MMMM YYYY LT"
},
lastDay: '[včera v] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[minulou neděli v] LT';
case 1:
case 2:
return '[minulé] dddd [v] LT';
case 3:
return '[minulou středu v] LT';
case 4:
case 5:
return '[minulý] dddd [v] LT';
case 6:
return '[minulou sobotu v] LT';
}
calendar : {
sameDay: "[dnes v] LT",
nextDay: '[zítra v] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[v neděli v] LT';
case 1:
case 2:
return '[v] dddd [v] LT';
case 3:
return '[ve středu v] LT';
case 4:
return '[ve čtvrtek v] LT';
case 5:
return '[v pátek v] LT';
case 6:
return '[v sobotu v] LT';
}
},
lastDay: '[včera v] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[minulou neděli v] LT';
case 1:
case 2:
return '[minulé] dddd [v] LT';
case 3:
return '[minulou středu v] LT';
case 4:
case 5:
return '[minulý] dddd [v] LT';
case 6:
return '[minulou sobotu v] LT';
}
},
sameElse: "L"
},
sameElse: "L"
},
relativeTime : {
future : "za %s",
past : "před %s",
s : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
relativeTime : {
future : "za %s",
past : "před %s",
s : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,47 +5,56 @@ // moment.js language configuration

require('../moment').lang('cv', {
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;
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('cv', {
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"
},
past : "%s каялла",
s : "пĕр-ик çеккунт",
m : "пĕр минут",
mm : "%d минут",
h : "пĕр сехет",
hh : "%d сехет",
d : "пĕр кун",
dd : "%d кун",
M : "пĕр уйăх",
MM : "%d уйăх",
y : "пĕр çул",
yy : "%d çул"
},
ordinal : '%d-мĕш',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
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 : '%d-мĕш',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

@@ -5,43 +5,53 @@ // moment.js language configuration

require('../moment').lang('da', {
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 : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D. MMMM, YYYY LT"
},
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 : "et minut",
mm : "%d minutter",
h : "en time",
hh : "%d timer",
d : "en dag",
dd : "%d dage",
M : "en måned",
MM : "%d måneder",
y : "et år",
yy : "%d år"
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('da', {
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 : "HH:mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd D. MMMM, YYYY LT"
},
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 : "et minut",
mm : "%d minutter",
h : "en time",
hh : "%d timer",
d : "en dag",
dd : "%d dage",
M : "en måned",
MM : "%d måneder",
y : "et år",
yy : "%d år"
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -6,57 +6,67 @@ // moment.js language configuration

function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
'm': ['eine Minute', 'einer Minute'],
'h': ['eine Stunde', 'einer Stunde'],
'd': ['ein Tag', 'einem Tag'],
'dd': [number + ' Tage', number + ' Tagen'],
'M': ['ein Monat', 'einem Monat'],
'MM': [number + ' Monate', number + ' Monaten'],
'y': ['ein Jahr', 'einem Jahr'],
'yy': [number + ' Jahre', number + ' Jahren']
};
return withoutSuffix ? format[key][0] : format[key][1];
}
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function processRelativeTime(number, withoutSuffix, key, isFuture) {
var format = {
'm': ['eine Minute', 'einer Minute'],
'h': ['eine Stunde', 'einer Stunde'],
'd': ['ein Tag', 'einem Tag'],
'dd': [number + ' Tage', number + ' Tagen'],
'M': ['ein Monat', 'einem Monat'],
'MM': [number + ' Monate', number + ' Monaten'],
'y': ['ein Jahr', 'einem Jahr'],
'yy': [number + ' Jahre', number + ' Jahren']
};
return withoutSuffix ? format[key][0] : format[key][1];
}
require('../moment').lang('de', {
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 [Uhr]",
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 : processRelativeTime,
mm : "%d Minuten",
h : processRelativeTime,
hh : "%d Stunden",
d : processRelativeTime,
dd : processRelativeTime,
M : processRelativeTime,
MM : processRelativeTime,
y : processRelativeTime,
yy : processRelativeTime
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
moment.lang('de', {
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 [Uhr]",
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 : processRelativeTime,
mm : "%d Minuten",
h : processRelativeTime,
hh : "%d Stunden",
d : processRelativeTime,
dd : processRelativeTime,
M : processRelativeTime,
MM : processRelativeTime,
y : processRelativeTime,
yy : processRelativeTime
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,66 +5,76 @@ // moment.js language configuration

require('../moment').lang('el', {
monthsNominativeEl : "Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),
monthsGenitiveEl : "Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),
months : function (momentToFormat, format) {
if (/D/.test(format.substring(0, format.indexOf("MMMM")))) { // if there is a day number before 'MMMM'
return this._monthsGenitiveEl[momentToFormat.month()];
} else {
return this._monthsNominativeEl[momentToFormat.month()];
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('el', {
monthsNominativeEl : "Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),
monthsGenitiveEl : "Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),
months : function (momentToFormat, format) {
if (/D/.test(format.substring(0, format.indexOf("MMMM")))) { // if there is a day number before 'MMMM'
return this._monthsGenitiveEl[momentToFormat.month()];
} else {
return this._monthsNominativeEl[momentToFormat.month()];
}
},
monthsShort : "Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),
weekdays : "Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),
weekdaysShort : "Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),
weekdaysMin : "Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),
meridiem : function (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'μμ' : 'ΜΜ';
} else {
return isLower ? 'πμ' : 'ΠΜ';
}
},
longDateFormat : {
LT : "h:mm A",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendarEl : {
sameDay : '[Σήμερα {}] LT',
nextDay : '[Αύριο {}] LT',
nextWeek : 'dddd [{}] LT',
lastDay : '[Χθες {}] LT',
lastWeek : '[την προηγούμενη] dddd [{}] LT',
sameElse : 'L'
},
calendar : function (key, mom) {
var output = this._calendarEl[key],
hours = mom && mom.hours();
return output.replace("{}", (hours % 12 === 1 ? "στη" : "στις"));
},
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 number + 'η';
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4st is the first week of the year.
}
},
monthsShort : "Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),
weekdays : "Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),
weekdaysShort : "Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),
weekdaysMin : "Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),
meridiem : function (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'μμ' : 'ΜΜ';
} else {
return isLower ? 'πμ' : 'ΠΜ';
}
},
longDateFormat : {
LT : "h:mm A",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY LT",
LLLL : "dddd, D MMMM YYYY LT"
},
calendarEl : {
sameDay : '[Σήμερα {}] LT',
nextDay : '[Αύριο {}] LT',
nextWeek : 'dddd [{}] LT',
lastDay : '[Χθες {}] LT',
lastWeek : '[την προηγούμενη] dddd [{}] LT',
sameElse : 'L'
},
calendar : function (key, mom) {
var output = this._calendarEl[key],
hours = mom && mom.hours();
return output.replace("{}", (hours % 12 === 1 ? "στη" : "στις"));
},
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 number + 'η';
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4st is the first week of the year.
}
});
});
}));

@@ -5,46 +5,56 @@ // moment.js language configuration

require('../moment').lang('en-ca', {
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,
output = (~~ (number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return number + output;
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('en-ca', {
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,
output = (~~ (number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return number + output;
}
});
}));

@@ -5,50 +5,60 @@ // moment.js language configuration

require('../moment').lang('en-gb', {
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 : "HH:mm",
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,
output = (~~ (number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return number + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('en-gb', {
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 : "HH:mm",
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,
output = (~~ (number % 100 / 10) === 1) ? 'th' :
(b === 1) ? 'st' :
(b === 2) ? 'nd' :
(b === 3) ? 'rd' : 'th';
return number + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -7,50 +7,60 @@ // moment.js language configuration

require('../moment').lang('eo', {
months : "januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),
monthsShort : "jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),
weekdays : "Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato".split("_"),
weekdaysShort : "Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab".split("_"),
weekdaysMin : "Di_Lu_Ma_Me_Ĵa_Ve_Sa".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "YYYY-MM-DD",
LL : "D[-an de] MMMM, YYYY",
LLL : "D[-an de] MMMM, YYYY LT",
LLLL : "dddd, [la] D[-an de] MMMM, YYYY LT"
},
meridiem : function (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'p.t.m.' : 'P.T.M.';
} else {
return isLower ? 'a.t.m.' : 'A.T.M.';
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('eo', {
months : "januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),
monthsShort : "jan_feb_mar_apr_maj_jun_jul_aŭg_sep_okt_nov_dec".split("_"),
weekdays : "Dimanĉo_Lundo_Mardo_Merkredo_Ĵaŭdo_Vendredo_Sabato".split("_"),
weekdaysShort : "Dim_Lun_Mard_Merk_Ĵaŭ_Ven_Sab".split("_"),
weekdaysMin : "Di_Lu_Ma_Me_Ĵa_Ve_Sa".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "YYYY-MM-DD",
LL : "D[-an de] MMMM, YYYY",
LLL : "D[-an de] MMMM, YYYY LT",
LLLL : "dddd, [la] D[-an de] MMMM, YYYY LT"
},
meridiem : function (hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'p.t.m.' : 'P.T.M.';
} else {
return isLower ? 'a.t.m.' : 'A.T.M.';
}
},
calendar : {
sameDay : '[Hodiaŭ je] LT',
nextDay : '[Morgaŭ je] LT',
nextWeek : 'dddd [je] LT',
lastDay : '[Hieraŭ je] LT',
lastWeek : '[pasinta] dddd [je] LT',
sameElse : 'L'
},
relativeTime : {
future : "je %s",
past : "antaŭ %s",
s : "sekundoj",
m : "minuto",
mm : "%d minutoj",
h : "horo",
hh : "%d horoj",
d : "tago",//ne 'diurno', ĉar estas uzita por proksimumo
dd : "%d tagoj",
M : "monato",
MM : "%d monatoj",
y : "jaro",
yy : "%d jaroj"
},
ordinal : "%da",
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
},
calendar : {
sameDay : '[Hodiaŭ je] LT',
nextDay : '[Morgaŭ je] LT',
nextWeek : 'dddd [je] LT',
lastDay : '[Hieraŭ je] LT',
lastWeek : '[pasinta] dddd [je] LT',
sameElse : 'L'
},
relativeTime : {
future : "je %s",
past : "antaŭ %s",
s : "sekundoj",
m : "minuto",
mm : "%d minutoj",
h : "horo",
hh : "%d horoj",
d : "tago",//ne 'diurno', ĉar estas uzita por proksimumo
dd : "%d tagoj",
M : "monato",
MM : "%d monatoj",
y : "jaro",
yy : "%d jaroj"
},
ordinal : "%da",
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
});
}));

@@ -5,53 +5,63 @@ // moment.js language configuration

require('../moment').lang('es', {
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 [de] MMMM [de] YYYY",
LLL : "D [de] MMMM [de] YYYY LT",
LLLL : "dddd, D [de] MMMM [de] YYYY LT"
},
calendar : {
sameDay : function () {
return '[hoy a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('es', {
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 [de] MMMM [de] YYYY",
LLL : "D [de] MMMM [de] YYYY LT",
LLLL : "dddd, D [de] MMMM [de] YYYY LT"
},
nextDay : function () {
return '[mañana a la' + ((this.hours() !== 1) ? 's' : '') + '] 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'
},
nextWeek : function () {
return 'dddd [a la' + ((this.hours() !== 1) ? 's' : '') + '] LT';
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"
},
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 : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,47 +5,57 @@ // moment.js language configuration

function translateSeconds(number, withoutSuffix, key, isFuture) {
return (isFuture || withoutSuffix) ? 'paari sekundi' : 'paar sekundit';
}
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function translateSeconds(number, withoutSuffix, key, isFuture) {
return (isFuture || withoutSuffix) ? 'paari sekundi' : 'paar sekundit';
}
require('../moment').lang('et', {
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 : translateSeconds,
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 : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
moment.lang('et', {
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 : translateSeconds,
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 : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,47 +5,57 @@ // moment.js language configuration

require('../moment').lang('eu', {
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 : "YYYY[ko] MMMM[ren] D[a]",
LLL : "YYYY[ko] MMMM[ren] D[a] LT",
LLLL : "dddd, YYYY[ko] MMMM[ren] D[a] LT",
l : "YYYY-M-D",
ll : "YYYY[ko] MMM D[a]",
lll : "YYYY[ko] MMM D[a] LT",
llll : "ddd, YYYY[ko] MMM 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 : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('eu', {
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 : "YYYY[ko] MMMM[ren] D[a]",
LLL : "YYYY[ko] MMMM[ren] D[a] LT",
LLLL : "dddd, YYYY[ko] MMMM[ren] D[a] LT",
l : "YYYY-M-D",
ll : "YYYY[ko] MMM D[a]",
lll : "YYYY[ko] MMM D[a] LT",
llll : "ddd, YYYY[ko] MMM 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 : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));
// moment.js language configuration
// language : Persian Language
// author : Ebrahim Byagowi : https://github.com/ebraminio
var symbolMap = {
'1': '۱',
'2': '۲',
'3': '۳',
'4': '۴',
'5': '۵',
'6': '۶',
'7': '۷',
'8': '۸',
'9': '۹',
'0': '۰'
}, numberMap = {
'۱': '1',
'۲': '2',
'۳': '3',
'۴': '4',
'۵': '5',
'۶': '6',
'۷': '7',
'۸': '8',
'۹': '9',
'۰': '0'
};
require('../moment').lang('fa', {
months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
weekdays : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'),
weekdaysShort : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.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'
},
meridiem : function (hour, minute, isLower) {
if (hour < 12) {
return "قبل از ظهر";
} else {
return "بعد از ظهر";
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var symbolMap = {
'1': '۱',
'2': '۲',
'3': '۳',
'4': '۴',
'5': '۵',
'6': '۶',
'7': '۷',
'8': '۸',
'9': '۹',
'0': '۰'
}, numberMap = {
'۱': '1',
'۲': '2',
'۳': '3',
'۴': '4',
'۵': '5',
'۶': '6',
'۷': '7',
'۸': '8',
'۹': '9',
'۰': '0'
};
moment.lang('fa', {
months : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
monthsShort : 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split('_'),
weekdays : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split('_'),
weekdaysShort : 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.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'
},
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 : 'یک دقیقه',
mm : '%d دقیقه',
h : 'یک ساعت',
hh : '%d ساعت',
d : 'یک روز',
dd : '%d روز',
M : 'یک ماه',
MM : '%d ماه',
y : 'یک سال',
yy : '%d سال'
},
preparse: function (string) {
return string.replace(/[۰-۹]/g, function (match) {
return numberMap[match];
}).replace(/،/g, ',');
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
}).replace(/,/g, '،');
},
ordinal : '%dم',
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
},
calendar : {
sameDay : '[امروز ساعت] LT',
nextDay : '[فردا ساعت] LT',
nextWeek : 'dddd [ساعت] LT',
lastDay : '[دیروز ساعت] LT',
lastWeek : '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 سال'
},
preparse: function (string) {
return string.replace(/[۰-۹]/g, function (match) {
return numberMap[match];
}).replace(/،/g, ',');
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
}).replace(/,/g, '،');
},
ordinal : '%dم',
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
});
}));

@@ -5,90 +5,100 @@ // moment.js language configuration

var numbers_past = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '),
numbers_future = ['nolla', 'yhden', 'kahden', 'kolmen', 'neljän', 'viiden', 'kuuden',
numbers_past[7], numbers_past[8], numbers_past[9]];
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var numbers_past = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split(' '),
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;
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;
}
result = verbal_number(number, isFuture) + " " + result;
return result;
}
function verbal_number(number, isFuture) {
return number < 10 ? (isFuture ? numbers_future[number] : numbers_past[number]) : number;
}
function verbal_number(number, isFuture) {
return number < 10 ? (isFuture ? numbers_future[number] : numbers_past[number]) : number;
}
require('../moment').lang('fi', {
months : "tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),
monthsShort : "tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".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 MMMM[ta] YYYY",
LLL : "Do MMMM[ta] YYYY, [klo] LT",
LLLL : "dddd, Do MMMM[ta] YYYY, [klo] LT",
l : "D.M.YYYY",
ll : "Do MMM YYYY",
lll : "Do MMM YYYY, [klo] LT",
llll : "ddd, Do MMM 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 : "%d.",
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
moment.lang('fi', {
months : "tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),
monthsShort : "tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".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 MMMM[ta] YYYY",
LLL : "Do MMMM[ta] YYYY, [klo] LT",
LLLL : "dddd, Do MMMM[ta] YYYY, [klo] LT",
l : "D.M.YYYY",
ll : "Do MMM YYYY",
lll : "Do MMM YYYY, [klo] LT",
llll : "ddd, Do MMM 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 : "%d.",
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,41 +5,51 @@ // moment.js language configuration

require('../moment').lang('fr-ca', {
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 : "un an",
yy : "%d ans"
},
ordinal : function (number) {
return number + (number === 1 ? 'er' : '');
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('fr-ca', {
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 : "un an",
yy : "%d ans"
},
ordinal : function (number) {
return number + (number === 1 ? 'er' : '');
}
});
}));

@@ -5,45 +5,55 @@ // moment.js language configuration

require('../moment').lang('fr', {
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 : "un an",
yy : "%d ans"
},
ordinal : function (number) {
return number + (number === 1 ? 'er' : '');
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('fr', {
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 : "un an",
yy : "%d ans"
},
ordinal : function (number) {
return number + (number === 1 ? 'er' : '');
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,58 +5,68 @@ // moment.js language configuration

require('../moment').lang('gl', {
months : "Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_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' : 'á') + '] LT';
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('gl', {
months : "Xaneiro_Febreiro_Marzo_Abril_Maio_Xuño_Xullo_Agosto_Setembro_Outubro_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"
},
nextDay : function () {
return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';
calendar : {
sameDay : function () {
return '[hoxe ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] LT';
},
nextDay : function () {
return '[mañá ' + ((this.hours() !== 1) ? 'ás' : 'á') + '] 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'
},
nextWeek : function () {
return 'dddd [' + ((this.hours() !== 1) ? 'ás' : 'a') + '] LT';
relativeTime : {
future : function (str) {
if (str === "uns segundos") {
return "nuns segundos";
}
return "en " + str;
},
past : "hai %s",
s : "uns segundos",
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"
},
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 : function (str) {
if (str === "uns segundos") {
return "nuns segundos";
}
return "en " + str;
},
past : "hai %s",
s : "uns segundos",
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 : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
ordinal : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

@@ -5,43 +5,74 @@ // moment.js language configuration

// author : Moshe Simantov : https://github.com/DevelopmentIL
// author : Tal Ater : https://github.com/TalAter
require('../moment').lang('he', {
months : "ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),
monthsShort : "ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),
weekdays : "ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),
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",
l : "D/M/YYYY",
ll : "D MMM YYYY",
lll : "D MMM YYYY LT",
llll : "ddd, D MMM YYYY LT"
},
calendar : {
sameDay : '[היום ב־]LT',
nextDay : '[מחר ב־]LT',
nextWeek : 'dddd [בשעה] LT',
lastDay : '[אתמול ב־]LT',
lastWeek : '[ביום] 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 שנים"
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('he', {
months : "ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),
monthsShort : "ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),
weekdays : "ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),
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",
l : "D/M/YYYY",
ll : "D MMM YYYY",
lll : "D MMM YYYY LT",
llll : "ddd, D MMM YYYY LT"
},
calendar : {
sameDay : '[היום ב־]LT',
nextDay : '[מחר ב־]LT',
nextWeek : 'dddd [בשעה] LT',
lastDay : '[אתמול ב־]LT',
lastWeek : '[ביום] dddd [האחרון בשעה] LT',
sameElse : 'L'
},
relativeTime : {
future : "בעוד %s",
past : "לפני %s",
s : "מספר שניות",
m : "דקה",
mm : "%d דקות",
h : "שעה",
hh : function (number) {
if (number === 2) {
return "שעתיים";
}
return number + " שעות";
},
d : "יום",
dd : function (number) {
if (number === 2) {
return "יומיים";
}
return number + " ימים";
},
M : "חודש",
MM : function (number) {
if (number === 2) {
return "חודשיים";
}
return number + " חודשים";
},
y : "שנה",
yy : function (number) {
if (number === 2) {
return "שנתיים";
}
return number + " שנים";
}
}
});
}));

@@ -5,92 +5,102 @@ // moment.js language configuration

var symbolMap = {
'1': '१',
'2': '२',
'3': '३',
'4': '४',
'5': '५',
'6': '६',
'7': '७',
'8': '८',
'9': '९',
'0': '०'
},
numberMap = {
'१': '1',
'२': '2',
'३': '3',
'४': '4',
'५': '5',
'६': '6',
'७': '7',
'८': '8',
'९': '9',
'०': '0'
};
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var symbolMap = {
'1': '१',
'2': '२',
'3': '३',
'4': '४',
'5': '५',
'6': '६',
'7': '७',
'8': '८',
'9': '९',
'0': '०'
},
numberMap = {
'१': '1',
'२': '2',
'३': '3',
'४': '4',
'५': '5',
'६': '6',
'७': '7',
'८': '8',
'९': '9',
'०': '0'
};
require('../moment').lang('hi', {
months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split("_"),
monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split("_"),
weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split("_"),
weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split("_"),
weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split("_"),
longDateFormat : {
LT : "A h: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',
nextWeek : 'dddd, LT',
lastDay : '[कल] LT',
lastWeek : '[पिछले] 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 वर्ष"
},
preparse: function (string) {
return string.replace(/[१२३४५६७८९०]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
// Hindi notation for meridiems are quite fuzzy in practice. While there exists
// a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
meridiem : function (hour, minute, isLower) {
if (hour < 4) {
return "रात";
} else if (hour < 10) {
return "सुबह";
} else if (hour < 17) {
return "दोपहर";
} else if (hour < 20) {
return "शाम";
} else {
return "रात";
moment.lang('hi', {
months : 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split("_"),
monthsShort : 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split("_"),
weekdays : 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split("_"),
weekdaysShort : 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split("_"),
weekdaysMin : 'र_सो_मं_बु_गु_शु_श'.split("_"),
longDateFormat : {
LT : "A h: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',
nextWeek : 'dddd, LT',
lastDay : '[कल] LT',
lastWeek : '[पिछले] 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 वर्ष"
},
preparse: function (string) {
return string.replace(/[१२३४५६७८९०]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
// Hindi notation for meridiems are quite fuzzy in practice. While there exists
// a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi.
meridiem : function (hour, minute, isLower) {
if (hour < 4) {
return "रात";
} else if (hour < 10) {
return "सुबह";
} else if (hour < 17) {
return "दोपहर";
} else if (hour < 20) {
return "शाम";
} else {
return "रात";
}
},
week : {
dow : 0, // Sunday is the first day of the week.
doy : 6 // The week that contains Jan 1st is the first week of the year.
}
},
week : {
dow : 0, // Sunday is the first day of the week.
doy : 6 // The week that contains Jan 1st is the first week of the year.
}
});
});
}));

@@ -5,84 +5,94 @@ // moment.js language configuration

var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split(' ');
function translate(number, withoutSuffix, key, isFuture) {
var num = number,
suffix;
function translate(number, withoutSuffix, key, isFuture) {
var num = number,
suffix;
switch (key) {
case 's':
return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
case 'm':
return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
case 'mm':
return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
case 'h':
return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
case 'hh':
return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
case 'd':
return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
case 'dd':
return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
case 'M':
return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
case 'MM':
return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
case 'y':
return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
case 'yy':
return num + (isFuture || withoutSuffix ? ' év' : ' éve');
switch (key) {
case 's':
return (isFuture || withoutSuffix) ? 'néhány másodperc' : 'néhány másodperce';
case 'm':
return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce');
case 'mm':
return num + (isFuture || withoutSuffix ? ' perc' : ' perce');
case 'h':
return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája');
case 'hh':
return num + (isFuture || withoutSuffix ? ' óra' : ' órája');
case 'd':
return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja');
case 'dd':
return num + (isFuture || withoutSuffix ? ' nap' : ' napja');
case 'M':
return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
case 'MM':
return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja');
case 'y':
return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve');
case 'yy':
return num + (isFuture || withoutSuffix ? ' év' : ' éve');
}
return '';
}
return '';
}
function week(isFuture) {
return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';
}
function week(isFuture) {
return (isFuture ? '' : '[múlt] ') + '[' + weekEndings[this.day()] + '] LT[-kor]';
}
require('../moment').lang('hu', {
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);
moment.lang('hu', {
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"
},
lastDay : '[tegnap] LT[-kor]',
lastWeek : function () {
return week.call(this, false);
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'
},
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 : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
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 : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

@@ -6,53 +6,63 @@ // moment.js language configuration

require('../moment').lang('id', {
months : "Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),
monthsShort : "Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),
weekdays : "Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),
weekdaysShort : "Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),
weekdaysMin : "Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),
longDateFormat : {
LT : "HH.mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY [pukul] LT",
LLLL : "dddd, D MMMM YYYY [pukul] LT"
},
meridiem : function (hours, minutes, isLower) {
if (hours < 11) {
return 'pagi';
} else if (hours < 15) {
return 'siang';
} else if (hours < 19) {
return 'sore';
} else {
return 'malam';
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('id', {
months : "Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),
monthsShort : "Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nov_Des".split("_"),
weekdays : "Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),
weekdaysShort : "Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),
weekdaysMin : "Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),
longDateFormat : {
LT : "HH.mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY [pukul] LT",
LLLL : "dddd, D MMMM YYYY [pukul] LT"
},
meridiem : function (hours, minutes, isLower) {
if (hours < 11) {
return 'pagi';
} else if (hours < 15) {
return 'siang';
} else if (hours < 19) {
return 'sore';
} else {
return 'malam';
}
},
calendar : {
sameDay : '[Hari ini pukul] LT',
nextDay : '[Besok pukul] LT',
nextWeek : 'dddd [pukul] LT',
lastDay : '[Kemarin pukul] LT',
lastWeek : 'dddd [lalu pukul] LT',
sameElse : 'L'
},
relativeTime : {
future : "dalam %s",
past : "%s yang lalu",
s : "beberapa detik",
m : "semenit",
mm : "%d menit",
h : "sejam",
hh : "%d jam",
d : "sehari",
dd : "%d hari",
M : "sebulan",
MM : "%d bulan",
y : "setahun",
yy : "%d tahun"
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
},
calendar : {
sameDay : '[Hari ini pukul] LT',
nextDay : '[Besok pukul] LT',
nextWeek : 'dddd [pukul] LT',
lastDay : '[Kemarin pukul] LT',
lastWeek : 'dddd [lalu pukul] LT',
sameElse : 'L'
},
relativeTime : {
future : "dalam %s",
past : "%s yang lalu",
s : "beberapa detik",
m : "semenit",
mm : "%d menit",
h : "sejam",
hh : "%d jam",
d : "sehari",
dd : "%d hari",
M : "sebulan",
MM : "%d bulan",
y : "setahun",
yy : "%d tahun"
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
});
}));

@@ -5,111 +5,121 @@ // moment.js language configuration

function plural(n) {
if (n % 100 === 11) {
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function plural(n) {
if (n % 100 === 11) {
return true;
} else if (n % 10 === 1) {
return false;
}
return true;
} else if (n % 10 === 1) {
return false;
}
return true;
}
function translate(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';
}
return result + 'mínútu';
case 'hh':
if (plural(number)) {
return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');
}
return result + 'klukkustund';
case 'd':
if (withoutSuffix) {
return 'dagur';
}
return isFuture ? 'dag' : 'degi';
case 'dd':
if (plural(number)) {
function translate(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';
}
return result + 'mínútu';
case 'hh':
if (plural(number)) {
return result + (withoutSuffix || isFuture ? 'klukkustundir' : 'klukkustundum');
}
return result + 'klukkustund';
case 'd':
if (withoutSuffix) {
return result + 'dagar';
return 'dagur';
}
return result + (isFuture ? 'daga' : 'dögum');
} else if (withoutSuffix) {
return result + 'dagur';
}
return result + (isFuture ? 'dag' : 'degi');
case 'M':
if (withoutSuffix) {
return 'mánuður';
}
return isFuture ? 'mánuð' : 'mánuði';
case 'MM':
if (plural(number)) {
return isFuture ? 'dag' : 'degi';
case 'dd':
if (plural(number)) {
if (withoutSuffix) {
return result + 'dagar';
}
return result + (isFuture ? 'daga' : 'dögum');
} else if (withoutSuffix) {
return result + 'dagur';
}
return result + (isFuture ? 'dag' : 'degi');
case 'M':
if (withoutSuffix) {
return result + 'mánuðir';
return 'mánuður';
}
return result + (isFuture ? 'mánuði' : 'mánuðum');
} else if (withoutSuffix) {
return result + 'mánuður';
return isFuture ? 'mánuð' : 'mánuði';
case 'MM':
if (plural(number)) {
if (withoutSuffix) {
return result + 'mánuðir';
}
return result + (isFuture ? 'mánuði' : 'mánuðum');
} else if (withoutSuffix) {
return result + 'mánuður';
}
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');
}
return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
}
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');
}
return result + (withoutSuffix || isFuture ? 'ár' : 'ári');
}
}
require('../moment').lang('is', {
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 : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
moment.lang('is', {
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 : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -6,45 +6,55 @@ // moment.js language configuration

require('../moment').lang('it', {
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 : function (s) {
return ((/^[0-9].+$/).test(s) ? "tra" : "in") + " " + s;
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('it', {
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"
},
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: '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
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 : function (s) {
return ((/^[0-9].+$/).test(s) ? "tra" : "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: '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,45 +5,55 @@ // moment.js language configuration

require('../moment').lang('ja', {
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 "午後";
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('ja', {
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年"
}
},
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年"
}
});
});
}));

@@ -5,94 +5,105 @@ // moment.js language configuration

function monthsCaseReplace(m, format) {
var months = {
'nominative': 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),
'accusative': 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_')
},
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
nounCase = (/D[oD] *MMMM?/).test(format) ?
'accusative' :
'nominative';
function monthsCaseReplace(m, format) {
var months = {
'nominative': 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split('_'),
'accusative': 'იანვარს_თებერვალს_მარტს_აპრილის_მაისს_ივნისს_ივლისს_აგვისტს_სექტემბერს_ოქტომბერს_ნოემბერს_დეკემბერს'.split('_')
},
return months[nounCase][m.month()];
}
nounCase = (/D[oD] *MMMM?/).test(format) ?
'accusative' :
'nominative';
function weekdaysCaseReplace(m, format) {
var weekdays = {
'nominative': 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'),
'accusative': 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_')
},
return months[nounCase][m.month()];
}
nounCase = (/(წინა|შემდეგ)/).test(format) ?
'accusative' :
'nominative';
function weekdaysCaseReplace(m, format) {
var weekdays = {
'nominative': 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split('_'),
'accusative': 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split('_')
},
return weekdays[nounCase][m.day()];
}
nounCase = (/(წინა|შემდეგ)/).test(format) ?
'accusative' :
'nominative';
require('../moment').lang('ka', {
months : monthsCaseReplace,
monthsShort : "იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),
weekdays : weekdaysCaseReplace,
weekdaysShort : "კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),
weekdaysMin : "კვ_ორ_სა_ოთ_ხუ_პა_შა".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 : '[დღეს] LT[-ზე]',
nextDay : '[ხვალ] LT[-ზე]',
lastDay : '[გუშინ] LT[-ზე]',
nextWeek : '[შემდეგ] dddd LT[-ზე]',
lastWeek : '[წინა] dddd LT-ზე',
sameElse : 'L'
},
relativeTime : {
future : function (s) {
return (/(წამი|წუთი|საათი|წელი)/).test(s) ?
s.replace(/ი$/, "ში") :
s + "ში";
return weekdays[nounCase][m.day()];
}
moment.lang('ka', {
months : monthsCaseReplace,
monthsShort : "იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),
weekdays : weekdaysCaseReplace,
weekdaysShort : "კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),
weekdaysMin : "კვ_ორ_სა_ოთ_ხუ_პა_შა".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"
},
past : function (s) {
if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {
return s.replace(/(ი|ე)$/, "ის წინ");
calendar : {
sameDay : '[დღეს] LT[-ზე]',
nextDay : '[ხვალ] LT[-ზე]',
lastDay : '[გუშინ] LT[-ზე]',
nextWeek : '[შემდეგ] dddd LT[-ზე]',
lastWeek : '[წინა] dddd LT-ზე',
sameElse : 'L'
},
relativeTime : {
future : function (s) {
return (/(წამი|წუთი|საათი|წელი)/).test(s) ?
s.replace(/ი$/, "ში") :
s + "ში";
},
past : function (s) {
if ((/(წამი|წუთი|საათი|დღე|თვე)/).test(s)) {
return s.replace(/(ი|ე)$/, "ის წინ");
}
if ((/წელი/).test(s)) {
return s.replace(/წელი$/, "წლის წინ");
}
},
s : "რამდენიმე წამი",
m : "წუთი",
mm : "%d წუთი",
h : "საათი",
hh : "%d საათი",
d : "დღე",
dd : "%d დღე",
M : "თვე",
MM : "%d თვე",
y : "წელი",
yy : "%d წელი"
},
ordinal : function (number) {
if (number === 0) {
return number;
}
if ((/წელი/).test(s)) {
return s.replace(/წელი$/, "წლის წინ");
if (number === 1) {
return number + "-ლი";
}
},
s : "რამდენიმე წამი",
m : "წუთი",
mm : "%d წუთი",
h : "საათი",
hh : "%d საათი",
d : "დღე",
dd : "%d დღე",
M : "თვე",
MM : "%d თვე",
y : "წელი",
yy : "%d წელი"
},
ordinal : function (number) {
if (number === 0) {
return number;
}
if (number === 1) {
return number + "-ლი";
}
if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) {
return "მე-" + number;
}
if ((number < 20) || (number <= 100 && (number % 20 === 0)) || (number % 100 === 0)) {
return "მე-" + number;
return number + "-ე";
},
week : {
dow : 1,
doy : 7
}
return number + "-ე";
},
week : {
dow : 1,
doy : 7
}
});
});
}));

@@ -5,43 +5,53 @@ // moment.js language configuration

require('../moment').lang('ko', {
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 : '%d일'
});
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('ko', {
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 : '%d일'
});
}));

@@ -5,64 +5,74 @@ // moment.js language configuration

var units = {
'mm': 'minūti_minūtes_minūte_minūtes',
'hh': 'stundu_stundas_stunda_stundas',
'dd': 'dienu_dienas_diena_dienas',
'MM': 'mēnesi_mēnešus_mēnesis_mēneši',
'yy': 'gadu_gadus_gads_gadi'
};
function format(word, number, withoutSuffix) {
var forms = word.split('_');
if (withoutSuffix) {
return number % 10 === 1 && number !== 11 ? forms[2] : forms[3];
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
return number % 10 === 1 && number !== 11 ? forms[0] : forms[1];
factory(window.moment); // Browser global
}
}
}(function (moment) {
var units = {
'mm': 'minūti_minūtes_minūte_minūtes',
'hh': 'stundu_stundas_stunda_stundas',
'dd': 'dienu_dienas_diena_dienas',
'MM': 'mēnesi_mēnešus_mēnesis_mēneši',
'yy': 'gadu_gadus_gads_gadi'
};
function relativeTimeWithPlural(number, withoutSuffix, key) {
return number + ' ' + format(units[key], number, withoutSuffix);
}
function format(word, number, withoutSuffix) {
var forms = word.split('_');
if (withoutSuffix) {
return number % 10 === 1 && number !== 11 ? forms[2] : forms[3];
} else {
return number % 10 === 1 && number !== 11 ? forms[0] : forms[1];
}
}
require('../moment').lang('lv', {
months : "janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),
monthsShort : "jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),
weekdays : "svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),
weekdaysShort : "Sv_P_O_T_C_Pk_S".split("_"),
weekdaysMin : "Sv_P_O_T_C_Pk_S".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD.MM.YYYY",
LL : "YYYY. [gada] D. MMMM",
LLL : "YYYY. [gada] D. MMMM, LT",
LLLL : "YYYY. [gada] D. MMMM, dddd, LT"
},
calendar : {
sameDay : '[Šodien pulksten] LT',
nextDay : '[Rīt pulksten] LT',
nextWeek : 'dddd [pulksten] LT',
lastDay : '[Vakar pulksten] LT',
lastWeek : '[Pagājušā] dddd [pulksten] LT',
sameElse : 'L'
},
relativeTime : {
future : "%s vēlāk",
past : "%s agrāk",
s : "dažas sekundes",
m : "minūti",
mm : relativeTimeWithPlural,
h : "stundu",
hh : relativeTimeWithPlural,
d : "dienu",
dd : relativeTimeWithPlural,
M : "mēnesi",
MM : relativeTimeWithPlural,
y : "gadu",
yy : relativeTimeWithPlural
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
function relativeTimeWithPlural(number, withoutSuffix, key) {
return number + ' ' + format(units[key], number, withoutSuffix);
}
});
moment.lang('lv', {
months : "janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),
monthsShort : "jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),
weekdays : "svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),
weekdaysShort : "Sv_P_O_T_C_Pk_S".split("_"),
weekdaysMin : "Sv_P_O_T_C_Pk_S".split("_"),
longDateFormat : {
LT : "HH:mm",
L : "DD.MM.YYYY",
LL : "YYYY. [gada] D. MMMM",
LLL : "YYYY. [gada] D. MMMM, LT",
LLLL : "YYYY. [gada] D. MMMM, dddd, LT"
},
calendar : {
sameDay : '[Šodien pulksten] LT',
nextDay : '[Rīt pulksten] LT',
nextWeek : 'dddd [pulksten] LT',
lastDay : '[Vakar pulksten] LT',
lastWeek : '[Pagājušā] dddd [pulksten] LT',
sameElse : 'L'
},
relativeTime : {
future : "%s vēlāk",
past : "%s agrāk",
s : "dažas sekundes",
m : "minūti",
mm : relativeTimeWithPlural,
h : "stundu",
hh : relativeTimeWithPlural,
d : "dienu",
dd : relativeTimeWithPlural,
M : "mēnesi",
MM : relativeTimeWithPlural,
y : "gadu",
yy : relativeTimeWithPlural
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,53 +5,63 @@ // moment.js language configuration

require('../moment').lang('ms-my', {
months : "Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),
monthsShort : "Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),
weekdays : "Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),
weekdaysShort : "Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),
weekdaysMin : "Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),
longDateFormat : {
LT : "HH.mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY [pukul] LT",
LLLL : "dddd, D MMMM YYYY [pukul] LT"
},
meridiem : function (hours, minutes, isLower) {
if (hours < 11) {
return 'pagi';
} else if (hours < 15) {
return 'tengahari';
} else if (hours < 19) {
return 'petang';
} else {
return 'malam';
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('ms-my', {
months : "Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),
monthsShort : "Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),
weekdays : "Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),
weekdaysShort : "Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),
weekdaysMin : "Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),
longDateFormat : {
LT : "HH.mm",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY [pukul] LT",
LLLL : "dddd, D MMMM YYYY [pukul] LT"
},
meridiem : function (hours, minutes, isLower) {
if (hours < 11) {
return 'pagi';
} else if (hours < 15) {
return 'tengahari';
} else if (hours < 19) {
return 'petang';
} else {
return 'malam';
}
},
calendar : {
sameDay : '[Hari ini pukul] LT',
nextDay : '[Esok pukul] LT',
nextWeek : 'dddd [pukul] LT',
lastDay : '[Kelmarin pukul] LT',
lastWeek : 'dddd [lepas pukul] LT',
sameElse : 'L'
},
relativeTime : {
future : "dalam %s",
past : "%s yang lepas",
s : "beberapa saat",
m : "seminit",
mm : "%d minit",
h : "sejam",
hh : "%d jam",
d : "sehari",
dd : "%d hari",
M : "sebulan",
MM : "%d bulan",
y : "setahun",
yy : "%d tahun"
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
},
calendar : {
sameDay : '[Hari ini pukul] LT',
nextDay : '[Esok pukul] LT',
nextWeek : 'dddd [pukul] LT',
lastDay : '[Kelmarin pukul] LT',
lastWeek : 'dddd [lepas pukul] LT',
sameElse : 'L'
},
relativeTime : {
future : "dalam %s",
past : "%s yang lepas",
s : "beberapa saat",
m : "seminit",
mm : "%d minit",
h : "sejam",
hh : "%d jam",
d : "sehari",
dd : "%d hari",
M : "sebulan",
MM : "%d bulan",
y : "setahun",
yy : "%d tahun"
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
});
}));
// moment.js language configuration
// language : norwegian bokmål (nb)
// author : Espen Hovlandsdal : https://github.com/rexxars
// authors : Espen Hovlandsdal : https://github.com/rexxars
// Sigurd Gartmann : https://github.com/sigurdga
require('../moment').lang('nb', {
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 : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('nb', {
months : "januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),
monthsShort : "jan._feb._mars_april_mai_juni_juli_aug._sep._okt._nov._des.".split("_"),
weekdays : "søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),
weekdaysShort : "sø._ma._ti._on._to._fr._lø.".split("_"),
weekdaysMin : "sø_ma_ti_on_to_fr_lø".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: '[i dag kl.] LT',
nextDay: '[i morgen kl.] LT',
nextWeek: 'dddd [kl.] LT',
lastDay: '[i går kl.] LT',
lastWeek: '[forrige] dddd [kl.] 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 : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,92 +5,102 @@ // moment.js language configuration

var symbolMap = {
'1': '१',
'2': '२',
'3': '३',
'4': '४',
'5': '५',
'6': '६',
'7': '७',
'8': '८',
'9': '९',
'0': '०'
},
numberMap = {
'१': '1',
'२': '2',
'३': '3',
'४': '4',
'५': '5',
'६': '6',
'७': '7',
'८': '8',
'९': '9',
'०': '0'
};
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var symbolMap = {
'1': '१',
'2': '२',
'3': '३',
'4': '४',
'5': '५',
'6': '६',
'7': '७',
'8': '८',
'9': '९',
'0': '०'
},
numberMap = {
'१': '1',
'२': '2',
'३': '3',
'४': '4',
'५': '5',
'६': '6',
'७': '7',
'८': '8',
'९': '9',
'०': '0'
};
require('../moment').lang('ne', {
months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split("_"),
monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split("_"),
weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split("_"),
weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split("_"),
weekdaysMin : 'आइ._सो._मङ्_बु._बि._शु._श.'.split("_"),
longDateFormat : {
LT : "Aको h:mm बजे",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY, LT",
LLLL : "dddd, D MMMM YYYY, LT"
},
preparse: function (string) {
return string.replace(/[१२३४५६७८९०]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
meridiem : function (hour, minute, isLower) {
if (hour < 3) {
return "राती";
} else if (hour < 10) {
return "बिहान";
} else if (hour < 15) {
return "दिउँसो";
} else if (hour < 18) {
return "बेलुका";
} else if (hour < 20) {
return "साँझ";
} else {
return "राती";
moment.lang('ne', {
months : 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split("_"),
monthsShort : 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split("_"),
weekdays : 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split("_"),
weekdaysShort : 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split("_"),
weekdaysMin : 'आइ._सो._मङ्_बु._बि._शु._श.'.split("_"),
longDateFormat : {
LT : "Aको h:mm बजे",
L : "DD/MM/YYYY",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY, LT",
LLLL : "dddd, D MMMM YYYY, LT"
},
preparse: function (string) {
return string.replace(/[१२३४५६७८९०]/g, function (match) {
return numberMap[match];
});
},
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];
});
},
meridiem : function (hour, minute, isLower) {
if (hour < 3) {
return "राती";
} else if (hour < 10) {
return "बिहान";
} else if (hour < 15) {
return "दिउँसो";
} else if (hour < 18) {
return "बेलुका";
} else if (hour < 20) {
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 : "एक मिनेट",
mm : "%d मिनेट",
h : "एक घण्टा",
hh : "%d घण्टा",
d : "एक दिन",
dd : "%d दिन",
M : "एक महिना",
MM : "%d महिना",
y : "एक बर्ष",
yy : "%d बर्ष"
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
},
calendar : {
sameDay : '[आज] LT',
nextDay : '[भोली] LT',
nextWeek : '[आउँदो] dddd[,] LT',
lastDay : '[हिजो] LT',
lastWeek : '[गएको] 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 बर्ष"
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
});
}));

@@ -5,54 +5,64 @@ // moment.js language configuration

var monthsShortWithDots = "jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),
monthsShortWithoutDots = "jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_");
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var monthsShortWithDots = "jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),
monthsShortWithoutDots = "jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_");
require('../moment').lang('nl', {
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()];
moment.lang('nl', {
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 + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
},
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 + ((number === 1 || number === 8 || number >= 20) ? 'ste' : 'de');
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
});
}));

@@ -5,43 +5,53 @@ // moment.js language configuration

require('../moment').lang('nn', {
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 : "sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),
weekdaysShort : "sun_mån_tys_ons_tor_fre_lau".split("_"),
weekdaysMin : "su_må_ty_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 klokka] LT',
nextDay: '[I morgon klokka] LT',
nextWeek: 'dddd [klokka] LT',
lastDay: '[I går klokka] LT',
lastWeek: '[Føregående] dddd [klokka] LT',
sameElse: 'L'
},
relativeTime : {
future : "om %s",
past : "for %s siden",
s : "noen sekund",
m : "ett minutt",
mm : "%d minutt",
h : "en time",
hh : "%d timar",
d : "en dag",
dd : "%d dagar",
M : "en månad",
MM : "%d månader",
y : "ett år",
yy : "%d år"
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('nn', {
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 : "sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),
weekdaysShort : "sun_mån_tys_ons_tor_fre_lau".split("_"),
weekdaysMin : "su_må_ty_on_to_fr_lø".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: '[I dag klokka] LT',
nextDay: '[I morgon klokka] LT',
nextWeek: 'dddd [klokka] LT',
lastDay: '[I går klokka] LT',
lastWeek: '[Føregående] dddd [klokka] LT',
sameElse: 'L'
},
relativeTime : {
future : "om %s",
past : "for %s siden",
s : "noen sekund",
m : "ett minutt",
mm : "%d minutt",
h : "en time",
hh : "%d timar",
d : "en dag",
dd : "%d dagar",
M : "en månad",
MM : "%d månader",
y : "ett år",
yy : "%d år"
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,85 +5,95 @@ // moment.js language configuration

var monthsNominative = "styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),
monthsSubjective = "stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var monthsNominative = "styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),
monthsSubjective = "stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_");
function plural(n) {
return (n % 10 < 5) && (n % 10 > 1) && (~~(n / 10) !== 1);
}
function plural(n) {
return (n % 10 < 5) && (n % 10 > 1) && (~~(n / 10) !== 1);
}
function translate(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');
function translate(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');
}
}
}
require('../moment').lang('pl', {
months : function (momentToFormat, format) {
if (/D MMMM/.test(format)) {
return monthsSubjective[momentToFormat.month()];
} else {
return monthsNominative[momentToFormat.month()];
}
},
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: function () {
switch (this.day()) {
case 0:
return '[W zeszłą niedzielę o] LT';
case 3:
return '[W zeszłą środę o] LT';
case 6:
return '[W zeszłą sobotę o] LT';
default:
return '[W zeszły] dddd [o] LT';
moment.lang('pl', {
months : function (momentToFormat, format) {
if (/D MMMM/.test(format)) {
return monthsSubjective[momentToFormat.month()];
} else {
return monthsNominative[momentToFormat.month()];
}
},
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 : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
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: function () {
switch (this.day()) {
case 0:
return '[W zeszłą niedzielę o] LT';
case 3:
return '[W zeszłą środę o] LT';
case 6:
return '[W zeszłą sobotę o] LT';
default:
return '[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 : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,43 +5,53 @@ // moment.js language configuration

require('../moment').lang('pt-br', {
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
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('pt-br', {
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"
},
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 : '%dº'
});
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 : '%dº'
});
}));

@@ -5,47 +5,57 @@ // moment.js language configuration

require('../moment').lang('pt', {
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
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('pt', {
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"
},
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 : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
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 : '%dº',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -6,42 +6,52 @@ // moment.js language configuration

require('../moment').lang('ro', {
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"
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('ro', {
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"
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

@@ -6,121 +6,144 @@ // moment.js language configuration

function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
}
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
'mm': 'минута_минуты_минут',
'hh': 'час_часа_часов',
'dd': 'день_дня_дней',
'MM': 'месяц_месяца_месяцев',
'yy': 'год_года_лет'
};
if (key === 'm') {
return withoutSuffix ? 'минута' : 'минуту';
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
'mm': 'минута_минуты_минут',
'hh': 'час_часа_часов',
'dd': 'день_дня_дней',
'MM': 'месяц_месяца_месяцев',
'yy': 'год_года_лет'
};
if (key === 'm') {
return withoutSuffix ? 'минута' : 'минуту';
}
else {
return number + ' ' + plural(format[key], +number);
}
}
else {
return number + ' ' + plural(format[key], +number);
function monthsCaseReplace(m, format) {
var months = {
'nominative': 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),
'accusative': 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_')
},
nounCase = (/D[oD]? *MMMM?/).test(format) ?
'accusative' :
'nominative';
return months[nounCase][m.month()];
}
}
function monthsCaseReplace(m, format) {
var months = {
'nominative': 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split('_'),
'accusative': 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_')
},
function monthsShortCaseReplace(m, format) {
var monthsShort = {
'nominative': 'янв_фев_мар_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),
'accusative': 'янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек'.split('_')
},
nounCase = (/D[oD]? *MMMM?/).test(format) ?
'accusative' :
'nominative';
nounCase = (/D[oD]? *MMMM?/).test(format) ?
'accusative' :
'nominative';
return months[nounCase][m.month()];
}
return monthsShort[nounCase][m.month()];
}
function weekdaysCaseReplace(m, format) {
var weekdays = {
'nominative': 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
'accusative': 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_')
},
function weekdaysCaseReplace(m, format) {
var weekdays = {
'nominative': 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split('_'),
'accusative': 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split('_')
},
nounCase = (/\[ ?[Вв] ?(?:прошлую|следующую)? ?\] ?dddd/).test(format) ?
'accusative' :
'nominative';
nounCase = (/\[ ?[Вв] ?(?:прошлую|следующую)? ?\] ?dddd/).test(format) ?
'accusative' :
'nominative';
return weekdays[nounCase][m.day()];
}
return weekdays[nounCase][m.day()];
}
require('../moment').lang('ru', {
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';
moment.lang('ru', {
months : monthsCaseReplace,
monthsShort : monthsShortCaseReplace,
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"
},
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';
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'
},
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, period) {
switch (period) {
case 'M':
case 'd':
case 'DDD':
return number + '-й';
case 'D':
return number + '-го';
case 'w':
case 'W':
return number + '-я';
default:
return number;
}
},
sameElse: 'L'
},
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, period) {
switch (period) {
case 'M':
case 'd':
case 'DDD':
return number + '-й';
case 'D':
return number + '-го';
case 'w':
case 'W':
return number + '-я';
default:
return number;
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
});
}));

@@ -6,142 +6,152 @@ // moment.js language configuration

var months = "január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),
monthsShort = "jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
var months = "január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),
monthsShort = "jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");
function plural(n) {
return (n > 1) && (n < 5);
}
function plural(n) {
return (n > 1) && (n < 5);
}
function translate(number, withoutSuffix, key, isFuture) {
var result = number + " ";
switch (key) {
case 's': // a few seconds / in a few seconds / a few seconds ago
return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
case 'm': // a minute / in a minute / a minute ago
return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'minúty' : 'minút');
} else {
return result + 'minútami';
function translate(number, withoutSuffix, key, isFuture) {
var result = number + " ";
switch (key) {
case 's': // a few seconds / in a few seconds / a few seconds ago
return (withoutSuffix || isFuture) ? 'pár sekúnd' : 'pár sekundami';
case 'm': // a minute / in a minute / a minute ago
return withoutSuffix ? 'minúta' : (isFuture ? 'minútu' : 'minútou');
case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'minúty' : 'minút');
} else {
return result + 'minútami';
}
break;
case 'h': // an hour / in an hour / an hour ago
return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
case 'hh': // 9 hours / in 9 hours / 9 hours ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'hodiny' : 'hodín');
} else {
return result + 'hodinami';
}
break;
case 'd': // a day / in a day / a day ago
return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
case 'dd': // 9 days / in 9 days / 9 days ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'dni' : 'dní');
} else {
return result + 'dňami';
}
break;
case 'M': // a month / in a month / a month ago
return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
case 'MM': // 9 months / in 9 months / 9 months ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'mesiace' : 'mesiacov');
} else {
return result + 'mesiacmi';
}
break;
case 'y': // a year / in a year / a year ago
return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
case 'yy': // 9 years / in 9 years / 9 years ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'roky' : 'rokov');
} else {
return result + 'rokmi';
}
break;
}
break;
case 'h': // an hour / in an hour / an hour ago
return withoutSuffix ? 'hodina' : (isFuture ? 'hodinu' : 'hodinou');
case 'hh': // 9 hours / in 9 hours / 9 hours ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'hodiny' : 'hodín');
} else {
return result + 'hodinami';
}
break;
case 'd': // a day / in a day / a day ago
return (withoutSuffix || isFuture) ? 'deň' : 'dňom';
case 'dd': // 9 days / in 9 days / 9 days ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'dni' : 'dní');
} else {
return result + 'dňami';
}
break;
case 'M': // a month / in a month / a month ago
return (withoutSuffix || isFuture) ? 'mesiac' : 'mesiacom';
case 'MM': // 9 months / in 9 months / 9 months ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'mesiace' : 'mesiacov');
} else {
return result + 'mesiacmi';
}
break;
case 'y': // a year / in a year / a year ago
return (withoutSuffix || isFuture) ? 'rok' : 'rokom';
case 'yy': // 9 years / in 9 years / 9 years ago
if (withoutSuffix || isFuture) {
return result + (plural(number) ? 'roky' : 'rokov');
} else {
return result + 'rokmi';
}
break;
}
}
require('../moment').lang('sk', {
months : months,
monthsShort : monthsShort,
monthsParse : (function (months, monthsShort) {
var i, _monthsParse = [];
for (i = 0; i < 12; i++) {
// use custom parser to solve problem with July (červenec)
_monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
}
return _monthsParse;
}(months, monthsShort)),
weekdays : "nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),
weekdaysShort : "ne_po_ut_st_št_pi_so".split("_"),
weekdaysMin : "ne_po_ut_st_št_pi_so".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: "[dnes o] LT",
nextDay: '[zajtra o] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[v nedeľu o] LT';
case 1:
case 2:
return '[v] dddd [o] LT';
case 3:
return '[v stredu o] LT';
case 4:
return '[vo štvrtok o] LT';
case 5:
return '[v piatok o] LT';
case 6:
return '[v sobotu o] LT';
moment.lang('sk', {
months : months,
monthsShort : monthsShort,
monthsParse : (function (months, monthsShort) {
var i, _monthsParse = [];
for (i = 0; i < 12; i++) {
// use custom parser to solve problem with July (červenec)
_monthsParse[i] = new RegExp('^' + months[i] + '$|^' + monthsShort[i] + '$', 'i');
}
return _monthsParse;
}(months, monthsShort)),
weekdays : "nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),
weekdaysShort : "ne_po_ut_st_št_pi_so".split("_"),
weekdaysMin : "ne_po_ut_st_št_pi_so".split("_"),
longDateFormat : {
LT: "H:mm",
L : "DD.MM.YYYY",
LL : "D. MMMM YYYY",
LLL : "D. MMMM YYYY LT",
LLLL : "dddd D. MMMM YYYY LT"
},
lastDay: '[včera o] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[minulú nedeľu o] LT';
case 1:
case 2:
return '[minulý] dddd [o] LT';
case 3:
return '[minulú stredu o] LT';
case 4:
case 5:
return '[minulý] dddd [o] LT';
case 6:
return '[minulú sobotu o] LT';
}
calendar : {
sameDay: "[dnes o] LT",
nextDay: '[zajtra o] LT',
nextWeek: function () {
switch (this.day()) {
case 0:
return '[v nedeľu o] LT';
case 1:
case 2:
return '[v] dddd [o] LT';
case 3:
return '[v stredu o] LT';
case 4:
return '[vo štvrtok o] LT';
case 5:
return '[v piatok o] LT';
case 6:
return '[v sobotu o] LT';
}
},
lastDay: '[včera o] LT',
lastWeek: function () {
switch (this.day()) {
case 0:
return '[minulú nedeľu o] LT';
case 1:
case 2:
return '[minulý] dddd [o] LT';
case 3:
return '[minulú stredu o] LT';
case 4:
case 5:
return '[minulý] dddd [o] LT';
case 6:
return '[minulú sobotu o] LT';
}
},
sameElse: "L"
},
sameElse: "L"
},
relativeTime : {
future : "za %s",
past : "pred %s",
s : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
relativeTime : {
future : "za %s",
past : "pred %s",
s : translate,
m : translate,
mm : translate,
h : translate,
hh : translate,
d : translate,
dd : translate,
M : translate,
MM : translate,
y : translate,
yy : translate
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,131 +5,141 @@ // moment.js language configuration

function translate(number, withoutSuffix, key) {
var result = number + " ";
switch (key) {
case 'm':
return withoutSuffix ? 'ena minuta' : 'eno minuto';
case 'mm':
if (number === 1) {
result += 'minuta';
} else if (number === 2) {
result += 'minuti';
} else if (number === 3 || number === 4) {
result += 'minute';
} else {
result += 'minut';
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
function translate(number, withoutSuffix, key) {
var result = number + " ";
switch (key) {
case 'm':
return withoutSuffix ? 'ena minuta' : 'eno minuto';
case 'mm':
if (number === 1) {
result += 'minuta';
} else if (number === 2) {
result += 'minuti';
} else if (number === 3 || number === 4) {
result += 'minute';
} else {
result += 'minut';
}
return result;
case 'h':
return withoutSuffix ? 'ena ura' : 'eno uro';
case 'hh':
if (number === 1) {
result += 'ura';
} else if (number === 2) {
result += 'uri';
} else if (number === 3 || number === 4) {
result += 'ure';
} else {
result += 'ur';
}
return result;
case 'dd':
if (number === 1) {
result += 'dan';
} else {
result += 'dni';
}
return result;
case 'MM':
if (number === 1) {
result += 'mesec';
} else if (number === 2) {
result += 'meseca';
} else if (number === 3 || number === 4) {
result += 'mesece';
} else {
result += 'mesecev';
}
return result;
case 'yy':
if (number === 1) {
result += 'leto';
} else if (number === 2) {
result += 'leti';
} else if (number === 3 || number === 4) {
result += 'leta';
} else {
result += 'let';
}
return result;
}
return result;
case 'h':
return withoutSuffix ? 'ena ura' : 'eno uro';
case 'hh':
if (number === 1) {
result += 'ura';
} else if (number === 2) {
result += 'uri';
} else if (number === 3 || number === 4) {
result += 'ure';
} else {
result += 'ur';
}
return result;
case 'dd':
if (number === 1) {
result += 'dan';
} else {
result += 'dni';
}
return result;
case 'MM':
if (number === 1) {
result += 'mesec';
} else if (number === 2) {
result += 'meseca';
} else if (number === 3 || number === 4) {
result += 'mesece';
} else {
result += 'mesecev';
}
return result;
case 'yy':
if (number === 1) {
result += 'leto';
} else if (number === 2) {
result += 'leti';
} else if (number === 3 || number === 4) {
result += 'leta';
} else {
result += 'let';
}
return result;
}
}
require('../moment').lang('sl', {
months : "januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),
monthsShort : "jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),
weekdays : "nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),
weekdaysShort : "ned._pon._tor._sre._čet._pet._sob.".split("_"),
weekdaysMin : "ne_po_to_sr_če_pe_so".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 : '[danes ob] LT',
nextDay : '[jutri ob] LT',
moment.lang('sl', {
months : "januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),
monthsShort : "jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),
weekdays : "nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),
weekdaysShort : "ned._pon._tor._sre._čet._pet._sob.".split("_"),
weekdaysMin : "ne_po_to_sr_če_pe_so".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 : '[danes ob] LT',
nextDay : '[jutri ob] LT',
nextWeek : function () {
switch (this.day()) {
case 0:
return '[v] [nedeljo] [ob] LT';
case 3:
return '[v] [sredo] [ob] LT';
case 6:
return '[v] [soboto] [ob] LT';
case 1:
case 2:
case 4:
case 5:
return '[v] dddd [ob] LT';
}
nextWeek : function () {
switch (this.day()) {
case 0:
return '[v] [nedeljo] [ob] LT';
case 3:
return '[v] [sredo] [ob] LT';
case 6:
return '[v] [soboto] [ob] LT';
case 1:
case 2:
case 4:
case 5:
return '[v] dddd [ob] LT';
}
},
lastDay : '[včeraj ob] LT',
lastWeek : function () {
switch (this.day()) {
case 0:
case 3:
case 6:
return '[prejšnja] dddd [ob] LT';
case 1:
case 2:
case 4:
case 5:
return '[prejšnji] dddd [ob] LT';
}
},
sameElse : 'L'
},
lastDay : '[včeraj ob] LT',
lastWeek : function () {
switch (this.day()) {
case 0:
case 3:
case 6:
return '[prejšnja] dddd [ob] LT';
case 1:
case 2:
case 4:
case 5:
return '[prejšnji] dddd [ob] LT';
}
relativeTime : {
future : "čez %s",
past : "%s nazaj",
s : "nekaj sekund",
m : translate,
mm : translate,
h : translate,
hh : translate,
d : "en dan",
dd : translate,
M : "en mesec",
MM : translate,
y : "eno leto",
yy : translate
},
sameElse : 'L'
},
relativeTime : {
future : "čez %s",
past : "%s nazaj",
s : "nekaj sekund",
m : translate,
mm : translate,
h : translate,
hh : translate,
d : "en dan",
dd : translate,
M : "en mesec",
MM : translate,
y : "eno leto",
yy : translate
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
}));

@@ -6,43 +6,53 @@ // moment.js language configuration

require('../moment').lang('sq', {
months : "Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),
monthsShort : "Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),
weekdays : "E Diel_E Hënë_E Marte_E Mërkure_E Enjte_E Premte_E Shtunë".split("_"),
weekdaysShort : "Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),
weekdaysMin : "D_H_Ma_Më_E_P_Sh".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 : '[Sot në] LT',
nextDay : '[Neser në] LT',
nextWeek : 'dddd [në] LT',
lastDay : '[Dje në] LT',
lastWeek : 'dddd [e kaluar në] LT',
sameElse : 'L'
},
relativeTime : {
future : "në %s",
past : "%s me parë",
s : "disa seconda",
m : "një minut",
mm : "%d minutea",
h : "një orë",
hh : "%d orë",
d : "një ditë",
dd : "%d ditë",
M : "një muaj",
MM : "%d muaj",
y : "një vit",
yy : "%d vite"
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('sq', {
months : "Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),
monthsShort : "Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),
weekdays : "E Diel_E Hënë_E Marte_E Mërkure_E Enjte_E Premte_E Shtunë".split("_"),
weekdaysShort : "Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),
weekdaysMin : "D_H_Ma_Më_E_P_Sh".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 : '[Sot në] LT',
nextDay : '[Neser në] LT',
nextWeek : 'dddd [në] LT',
lastDay : '[Dje në] LT',
lastWeek : 'dddd [e kaluar në] LT',
sameElse : 'L'
},
relativeTime : {
future : "në %s",
past : "%s me parë",
s : "disa seconda",
m : "një minut",
mm : "%d minutea",
h : "një orë",
hh : "%d orë",
d : "një ditë",
dd : "%d ditë",
M : "një muaj",
MM : "%d muaj",
y : "një vit",
yy : "%d vite"
},
ordinal : '%d.',
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,50 +5,60 @@ // moment.js language configuration

require('../moment').lang('sv', {
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] LT',
nextDay: '[Imorgon] LT',
lastDay: '[Igår] LT',
nextWeek: 'dddd LT',
lastWeek: '[Förra] dddd[en] LT',
sameElse: 'L'
},
relativeTime : {
future : "om %s",
past : "för %s sedan",
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,
output = (~~ (number % 100 / 10) === 1) ? 'e' :
(b === 1) ? 'a' :
(b === 2) ? 'a' :
(b === 3) ? 'e' : 'e';
return number + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('sv', {
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] LT',
nextDay: '[Imorgon] LT',
lastDay: '[Igår] LT',
nextWeek: 'dddd LT',
lastWeek: '[Förra] dddd[en] LT',
sameElse: 'L'
},
relativeTime : {
future : "om %s",
past : "för %s sedan",
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,
output = (~~ (number % 100 / 10) === 1) ? 'e' :
(b === 1) ? 'a' :
(b === 2) ? 'a' :
(b === 3) ? 'e' : 'e';
return number + output;
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 4 // The week that contains Jan 4th is the first week of the year.
}
});
}));

@@ -5,45 +5,55 @@ // moment.js language configuration

require('../moment').lang('th', {
months : "มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),
monthsShort : "มกรา_กุมภา_มีนา_เมษา_พฤษภา_มิถุนา_กรกฎา_สิงหา_กันยา_ตุลา_พฤศจิกา_ธันวา".split("_"),
weekdays : "อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),
weekdaysShort : "อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"), // yes, three characters difference
weekdaysMin : "อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),
longDateFormat : {
LT : "H นาฬิกา m นาที",
L : "YYYY/MM/DD",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY เวลา LT",
LLLL : "วันddddที่ D MMMM YYYY เวลา LT"
},
meridiem : function (hour, minute, isLower) {
if (hour < 12) {
return "ก่อนเที่ยง";
} else {
return "หลังเที่ยง";
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('th', {
months : "มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),
monthsShort : "มกรา_กุมภา_มีนา_เมษา_พฤษภา_มิถุนา_กรกฎา_สิงหา_กันยา_ตุลา_พฤศจิกา_ธันวา".split("_"),
weekdays : "อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),
weekdaysShort : "อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"), // yes, three characters difference
weekdaysMin : "อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),
longDateFormat : {
LT : "H นาฬิกา m นาที",
L : "YYYY/MM/DD",
LL : "D MMMM YYYY",
LLL : "D MMMM YYYY เวลา LT",
LLLL : "วันddddที่ D MMMM YYYY เวลา LT"
},
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 ปี"
}
},
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 ปี"
}
});
});
}));

@@ -6,78 +6,89 @@ // moment.js language configuration

var suffixes = {
1: "'inci",
5: "'inci",
8: "'inci",
70: "'inci",
80: "'inci",
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
2: "'nci",
7: "'nci",
20: "'nci",
50: "'nci",
var suffixes = {
1: "'inci",
5: "'inci",
8: "'inci",
70: "'inci",
80: "'inci",
3: "'üncü",
4: "'üncü",
100: "'üncü",
2: "'nci",
7: "'nci",
20: "'nci",
50: "'nci",
6: "'ncı",
3: "'üncü",
4: "'üncü",
100: "'üncü",
9: "'uncu",
10: "'uncu",
30: "'uncu",
6: "'ncı",
60: "'ıncı",
90: "'ıncı"
};
9: "'uncu",
10: "'uncu",
30: "'uncu",
require('../moment').lang('tr', {
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 number + "'ıncı";
60: "'ıncı",
90: "'ıncı"
};
moment.lang('tr', {
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 number + "'ıncı";
}
var a = number % 10,
b = number % 100 - a,
c = number >= 100 ? 100 : null;
return number + (suffixes[a] || suffixes[b] || suffixes[c]);
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
var a = number % 10,
b = number % 100 - a,
c = number >= 100 ? 100 : null;
return number + (suffixes[a] || suffixes[b] || suffixes[c]);
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
});
}));

@@ -5,42 +5,52 @@ // moment.js language configuration

require('../moment').lang('tzm-la', {
months : "innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),
monthsShort : "innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),
weekdays : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
weekdaysShort : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
weekdaysMin : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".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: "[asdkh g] LT",
nextDay: '[aska g] LT',
nextWeek: 'dddd [g] LT',
lastDay: '[assant g] LT',
lastWeek: 'dddd [g] LT',
sameElse: 'L'
},
relativeTime : {
future : "dadkh s yan %s",
past : "yan %s",
s : "imik",
m : "minuḍ",
mm : "%d minuḍ",
h : "saɛa",
hh : "%d tassaɛin",
d : "ass",
dd : "%d ossan",
M : "ayowr",
MM : "%d iyyirn",
y : "asgas",
yy : "%d isgasn"
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('tzm-la', {
months : "innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),
monthsShort : "innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),
weekdays : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
weekdaysShort : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),
weekdaysMin : "asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".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: "[asdkh g] LT",
nextDay: '[aska g] LT',
nextWeek: 'dddd [g] LT',
lastDay: '[assant g] LT',
lastWeek: 'dddd [g] LT',
sameElse: 'L'
},
relativeTime : {
future : "dadkh s yan %s",
past : "yan %s",
s : "imik",
m : "minuḍ",
mm : "%d minuḍ",
h : "saɛa",
hh : "%d tassaɛin",
d : "ass",
dd : "%d ossan",
M : "ayowr",
MM : "%d iyyirn",
y : "asgas",
yy : "%d isgasn"
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
}));

@@ -5,42 +5,52 @@ // moment.js language configuration

require('../moment').lang('tzm', {
months : "ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),
monthsShort : "ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),
weekdays : "ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),
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',
nextWeek: 'dddd [ⴴ] LT',
lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
lastWeek: 'dddd [ⴴ] LT',
sameElse: 'L'
},
relativeTime : {
future : "ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",
past : "ⵢⴰⵏ %s",
s : "ⵉⵎⵉⴽ",
m : "ⵎⵉⵏⵓⴺ",
mm : "%d ⵎⵉⵏⵓⴺ",
h : "ⵙⴰⵄⴰ",
hh : "%d ⵜⴰⵙⵙⴰⵄⵉⵏ",
d : "ⴰⵙⵙ",
dd : "%d oⵙⵙⴰⵏ",
M : "ⴰⵢoⵓⵔ",
MM : "%d ⵉⵢⵢⵉⵔⵏ",
y : "ⴰⵙⴳⴰⵙ",
yy : "%d ⵉⵙⴳⴰⵙⵏ"
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
});
}(function (moment) {
moment.lang('tzm', {
months : "ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),
monthsShort : "ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),
weekdays : "ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),
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',
nextWeek: 'dddd [ⴴ] LT',
lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT',
lastWeek: 'dddd [ⴴ] LT',
sameElse: 'L'
},
relativeTime : {
future : "ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",
past : "ⵢⴰⵏ %s",
s : "ⵉⵎⵉⴽ",
m : "ⵎⵉⵏⵓⴺ",
mm : "%d ⵎⵉⵏⵓⴺ",
h : "ⵙⴰⵄⴰ",
hh : "%d ⵜⴰⵙⵙⴰⵄⵉⵏ",
d : "ⴰⵙⵙ",
dd : "%d oⵙⵙⴰⵏ",
M : "ⴰⵢoⵓⵔ",
MM : "%d ⵉⵢⵢⵉⵔⵏ",
y : "ⴰⵙⴳⴰⵙ",
yy : "%d ⵉⵙⴳⴰⵙⵏ"
},
week : {
dow : 6, // Saturday is the first day of the week.
doy : 12 // The week that contains Jan 1st is the first week of the year.
}
});
}));

@@ -6,128 +6,138 @@ // moment.js language configuration

function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
}
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
'mm': 'хвилина_хвилини_хвилин',
'hh': 'година_години_годин',
'dd': 'день_дні_днів',
'MM': 'місяць_місяці_місяців',
'yy': 'рік_роки_років'
};
if (key === 'm') {
return withoutSuffix ? 'хвилина' : 'хвилину';
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
else if (key === 'h') {
return withoutSuffix ? 'година' : 'годину';
}(function (moment) {
function plural(word, num) {
var forms = word.split('_');
return num % 10 === 1 && num % 100 !== 11 ? forms[0] : (num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2]);
}
else {
return number + ' ' + plural(format[key], +number);
function relativeTimeWithPlural(number, withoutSuffix, key) {
var format = {
'mm': 'хвилина_хвилини_хвилин',
'hh': 'година_години_годин',
'dd': 'день_дні_днів',
'MM': 'місяць_місяці_місяців',
'yy': 'рік_роки_років'
};
if (key === 'm') {
return withoutSuffix ? 'хвилина' : 'хвилину';
}
else if (key === 'h') {
return withoutSuffix ? 'година' : 'годину';
}
else {
return number + ' ' + plural(format[key], +number);
}
}
}
function monthsCaseReplace(m, format) {
var months = {
'nominative': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_'),
'accusative': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_')
},
function monthsCaseReplace(m, format) {
var months = {
'nominative': 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split('_'),
'accusative': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_')
},
nounCase = (/D[oD]? *MMMM?/).test(format) ?
'accusative' :
'nominative';
nounCase = (/D[oD]? *MMMM?/).test(format) ?
'accusative' :
'nominative';
return months[nounCase][m.month()];
}
return months[nounCase][m.month()];
}
function weekdaysCaseReplace(m, format) {
var weekdays = {
'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
},
function weekdaysCaseReplace(m, format) {
var weekdays = {
'nominative': 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split('_'),
'accusative': 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split('_'),
'genitive': 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split('_')
},
nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
'accusative' :
((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
'genitive' :
'nominative');
nounCase = (/(\[[ВвУу]\]) ?dddd/).test(format) ?
'accusative' :
((/\[?(?:минулої|наступної)? ?\] ?dddd/).test(format) ?
'genitive' :
'nominative');
return weekdays[nounCase][m.day()];
}
return weekdays[nounCase][m.day()];
}
function processHoursFunction(str) {
return function () {
return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
};
}
function processHoursFunction(str) {
return function () {
return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT';
};
}
require('../moment').lang('uk', {
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: processHoursFunction('[Сьогодні '),
nextDay: processHoursFunction('[Завтра '),
lastDay: processHoursFunction('[Вчора '),
nextWeek: processHoursFunction('[У] dddd ['),
lastWeek: function () {
switch (this.day()) {
case 0:
case 3:
case 5:
case 6:
return processHoursFunction('[Минулої] dddd [').call(this);
case 1:
case 2:
case 4:
return processHoursFunction('[Минулого] dddd [').call(this);
moment.lang('uk', {
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: processHoursFunction('[Сьогодні '),
nextDay: processHoursFunction('[Завтра '),
lastDay: processHoursFunction('[Вчора '),
nextWeek: processHoursFunction('[У] dddd ['),
lastWeek: function () {
switch (this.day()) {
case 0:
case 3:
case 5:
case 6:
return processHoursFunction('[Минулої] dddd [').call(this);
case 1:
case 2:
case 4:
return processHoursFunction('[Минулого] dddd [').call(this);
}
},
sameElse: 'L'
},
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, period) {
switch (period) {
case 'M':
case 'd':
case 'DDD':
case 'w':
case 'W':
return number + '-й';
case 'D':
return number + '-го';
default:
return number;
}
},
sameElse: 'L'
},
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, period) {
switch (period) {
case 'M':
case 'd':
case 'DDD':
case 'w':
case 'W':
return number + '-й';
case 'D':
return number + '-го';
default:
return number;
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
},
week : {
dow : 1, // Monday is the first day of the week.
doy : 7 // The week that contains Jan 1st is the first week of the year.
}
});
});
}));

@@ -5,70 +5,80 @@ // moment.js language configuration

require('../moment').lang('zh-cn', {
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",
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 "晚上";
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('zh-cn', {
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",
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'
},
ordinal : function (number, period) {
switch (period) {
case "d" :
case "D" :
case "DDD" :
return number + "日";
case "M" :
return number + "月";
case "w" :
case "W" :
return number + "周";
default :
return number;
}
},
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年"
}
},
calendar : {
sameDay : '[今天]LT',
nextDay : '[明天]LT',
nextWeek : '[下]ddddLT',
lastDay : '[昨天]LT',
lastWeek : '[上]ddddLT',
sameElse : 'L'
},
ordinal : function (number, period) {
switch (period) {
case "d" :
case "D" :
case "DDD" :
return number + "日";
case "M" :
return number + "月";
case "w" :
case "W" :
return number + "周";
default :
return number;
}
},
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年"
}
});
});
}));

@@ -5,70 +5,80 @@ // moment.js language configuration

require('../moment').lang('zh-tw', {
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",
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 "晚上";
(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
factory(require('../moment')); // Node
} else {
factory(window.moment); // Browser global
}
}(function (moment) {
moment.lang('zh-tw', {
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",
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'
},
ordinal : function (number, period) {
switch (period) {
case "d" :
case "D" :
case "DDD" :
return number + "日";
case "M" :
return number + "月";
case "w" :
case "W" :
return number + "週";
default :
return number;
}
},
relativeTime : {
future : "%s內",
past : "%s前",
s : "幾秒",
m : "一分鐘",
mm : "%d分鐘",
h : "一小時",
hh : "%d小時",
d : "一天",
dd : "%d天",
M : "一個月",
MM : "%d個月",
y : "一年",
yy : "%d年"
}
},
calendar : {
sameDay : '[今天]LT',
nextDay : '[明天]LT',
nextWeek : '[下]ddddLT',
lastDay : '[昨天]LT',
lastWeek : '[上]ddddLT',
sameElse : 'L'
},
ordinal : function (number, period) {
switch (period) {
case "d" :
case "D" :
case "DDD" :
return number + "日";
case "M" :
return number + "月";
case "w" :
case "W" :
return number + "週";
default :
return number;
}
},
relativeTime : {
future : "%s內",
past : "%s前",
s : "幾秒",
m : "一分鐘",
mm : "%d分鐘",
h : "一小時",
hh : "%d小時",
d : "一天",
dd : "%d天",
M : "一個月",
MM : "%d個月",
y : "一年",
yy : "%d年"
}
});
});
}));

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

// moment.js
// version : 2.1.0
// author : Tim Wood
// license : MIT
// momentjs.com
!function(t){function e(t,e){return function(n){return u(t.call(this,n),e)}}function n(t,e){return function(n){return this.lang().ordinal(t.call(this,n),e)}}function s(){}function i(t){a(this,t)}function r(t){var e=t.years||t.year||t.y||0,n=t.months||t.month||t.M||0,s=t.weeks||t.week||t.w||0,i=t.days||t.day||t.d||0,r=t.hours||t.hour||t.h||0,a=t.minutes||t.minute||t.m||0,o=t.seconds||t.second||t.s||0,u=t.milliseconds||t.millisecond||t.ms||0;this._input=t,this._milliseconds=u+1e3*o+6e4*a+36e5*r,this._days=i+7*s,this._months=n+12*e,this._data={},this._bubble()}function a(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function o(t){return 0>t?Math.ceil(t):Math.floor(t)}function u(t,e){for(var n=t+"";n.length<e;)n="0"+n;return n}function h(t,e,n,s){var i,r,a=e._milliseconds,o=e._days,u=e._months;a&&t._d.setTime(+t._d+a*n),(o||u)&&(i=t.minute(),r=t.hour()),o&&t.date(t.date()+o*n),u&&t.month(t.month()+u*n),a&&!s&&H.updateOffset(t),(o||u)&&(t.minute(i),t.hour(r))}function d(t){return"[object Array]"===Object.prototype.toString.call(t)}function c(t,e){var n,s=Math.min(t.length,e.length),i=Math.abs(t.length-e.length),r=0;for(n=0;s>n;n++)~~t[n]!==~~e[n]&&r++;return r+i}function f(t){return t?ie[t]||t.toLowerCase().replace(/(.)s$/,"$1"):t}function l(t,e){return e.abbr=t,x[t]||(x[t]=new s),x[t].set(e),x[t]}function _(t){if(!t)return H.fn._lang;if(!x[t]&&A)try{require("./lang/"+t)}catch(e){return H.fn._lang}return x[t]}function m(t){return t.match(/\[.*\]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function y(t){var e,n,s=t.match(E);for(e=0,n=s.length;n>e;e++)s[e]=ue[s[e]]?ue[s[e]]:m(s[e]);return function(i){var r="";for(e=0;n>e;e++)r+=s[e]instanceof Function?s[e].call(i,t):s[e];return r}}function M(t,e){function n(e){return t.lang().longDateFormat(e)||e}for(var s=5;s--&&N.test(e);)e=e.replace(N,n);return re[e]||(re[e]=y(e)),re[e](t)}function g(t,e){switch(t){case"DDDD":return V;case"YYYY":return X;case"YYYYY":return $;case"S":case"SS":case"SSS":case"DDD":return I;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return R;case"a":case"A":return _(e._l)._meridiemParse;case"X":return B;case"Z":case"ZZ":return j;case"T":return q;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 J;default:return new RegExp(t.replace("\\",""))}}function p(t){var e=(j.exec(t)||[])[0],n=(e+"").match(ee)||["-",0,0],s=+(60*n[1])+~~n[2];return"+"===n[0]?-s:s}function D(t,e,n){var s,i=n._a;switch(t){case"M":case"MM":i[1]=null==e?0:~~e-1;break;case"MMM":case"MMMM":s=_(n._l).monthsParse(e),null!=s?i[1]=s:n._isValid=!1;break;case"D":case"DD":case"DDD":case"DDDD":null!=e&&(i[2]=~~e);break;case"YY":i[0]=~~e+(~~e>68?1900:2e3);break;case"YYYY":case"YYYYY":i[0]=~~e;break;case"a":case"A":n._isPm=_(n._l).isPM(e);break;case"H":case"HH":case"h":case"hh":i[3]=~~e;break;case"m":case"mm":i[4]=~~e;break;case"s":case"ss":i[5]=~~e;break;case"S":case"SS":case"SSS":i[6]=~~(1e3*("0."+e));break;case"X":n._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=p(e)}null==e&&(n._isValid=!1)}function Y(t){var e,n,s=[];if(!t._d){for(e=0;7>e;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];s[3]+=~~((t._tzm||0)/60),s[4]+=~~((t._tzm||0)%60),n=new Date(0),t._useUTC?(n.setUTCFullYear(s[0],s[1],s[2]),n.setUTCHours(s[3],s[4],s[5],s[6])):(n.setFullYear(s[0],s[1],s[2]),n.setHours(s[3],s[4],s[5],s[6])),t._d=n}}function w(t){var e,n,s=t._f.match(E),i=t._i;for(t._a=[],e=0;e<s.length;e++)n=(g(s[e],t).exec(i)||[])[0],n&&(i=i.slice(i.indexOf(n)+n.length)),ue[s[e]]&&D(s[e],n,t);i&&(t._il=i),t._isPm&&t._a[3]<12&&(t._a[3]+=12),t._isPm===!1&&12===t._a[3]&&(t._a[3]=0),Y(t)}function k(t){var e,n,s,r,o,u=99;for(r=0;r<t._f.length;r++)e=a({},t),e._f=t._f[r],w(e),n=new i(e),o=c(e._a,n.toArray()),n._il&&(o+=n._il.length),u>o&&(u=o,s=n);a(t,s)}function v(t){var e,n=t._i,s=K.exec(n);if(s){for(t._f="YYYY-MM-DD"+(s[2]||" "),e=0;4>e;e++)if(te[e][1].exec(n)){t._f+=te[e][0];break}j.exec(n)&&(t._f+=" Z"),w(t)}else t._d=new Date(n)}function T(e){var n=e._i,s=G.exec(n);n===t?e._d=new Date:s?e._d=new Date(+s[1]):"string"==typeof n?v(e):d(n)?(e._a=n.slice(0),Y(e)):e._d=n instanceof Date?new Date(+n):new Date(n)}function b(t,e,n,s,i){return i.relativeTime(e||1,!!n,t,s)}function S(t,e,n){var s=W(Math.abs(t)/1e3),i=W(s/60),r=W(i/60),a=W(r/24),o=W(a/365),u=45>s&&["s",s]||1===i&&["m"]||45>i&&["mm",i]||1===r&&["h"]||22>r&&["hh",r]||1===a&&["d"]||25>=a&&["dd",a]||45>=a&&["M"]||345>a&&["MM",W(a/30)]||1===o&&["y"]||["yy",o];return u[2]=e,u[3]=t>0,u[4]=n,b.apply({},u)}function F(t,e,n){var s,i=n-e,r=n-t.day();return r>i&&(r-=7),i-7>r&&(r+=7),s=H(t).add("d",r),{week:Math.ceil(s.dayOfYear()/7),year:s.year()}}function O(t){var e=t._i,n=t._f;return null===e||""===e?null:("string"==typeof e&&(t._i=e=_().preparse(e)),H.isMoment(e)?(t=a({},e),t._d=new Date(+e._d)):n?d(n)?k(t):w(t):T(t),new i(t))}function z(t,e){H.fn[t]=H.fn[t+"s"]=function(t){var n=this._isUTC?"UTC":"";return null!=t?(this._d["set"+n+e](t),H.updateOffset(this),this):this._d["get"+n+e]()}}function C(t){H.duration.fn[t]=function(){return this._data[t]}}function L(t,e){H.duration.fn["as"+t]=function(){return+this/e}}for(var H,P,U="2.1.0",W=Math.round,x={},A="undefined"!=typeof module&&module.exports,G=/^\/?Date\((\-?\d+)/i,Z=/(\-)?(\d*)?\.?(\d+)\:(\d+)\:(\d+)\.?(\d{3})?/,E=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,N=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,J=/\d\d?/,I=/\d{1,3}/,V=/\d{3}/,X=/\d{1,4}/,$=/[+\-]?\d{1,6}/,R=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,j=/Z|[\+\-]\d\d:?\d\d/i,q=/T/i,B=/[\+\-]?\d+(\.\d{1,3})?/,K=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,Q="YYYY-MM-DDTHH:mm:ssZ",te=[["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/]],ee=/([\+\-]|\d\d)/gi,ne="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),se={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},ie={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",w:"week",M:"month",y:"year"},re={},ae="DDD w W M D d".split(" "),oe="M D H h m s w W".split(" "),ue={M:function(){return this.month()+1},MMM:function(t){return this.lang().monthsShort(this,t)},MMMM:function(t){return this.lang().months(this,t)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(t){return this.lang().weekdaysMin(this,t)},ddd:function(t){return this.lang().weekdaysShort(this,t)},dddd:function(t){return this.lang().weekdays(this,t)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return u(this.year()%100,2)},YYYY:function(){return u(this.year(),4)},YYYYY:function(){return u(this.year(),5)},gg:function(){return u(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return u(this.weekYear(),5)},GG:function(){return u(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return u(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return u(~~(this.milliseconds()/10),2)},SSS:function(){return u(this.milliseconds(),3)},Z:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+u(~~(t/60),2)+":"+u(~~t%60,2)},ZZ:function(){var t=-this.zone(),e="+";return 0>t&&(t=-t,e="-"),e+u(~~(10*t/6),4)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()}};ae.length;)P=ae.pop(),ue[P+"o"]=n(ue[P],P);for(;oe.length;)P=oe.pop(),ue[P+P]=e(ue[P],2);for(ue.DDDD=e(ue.DDD,3),s.prototype={set:function(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]},monthsParse:function(t){var e,n,s;for(this._monthsParse||(this._monthsParse=[]),e=0;12>e;e++)if(this._monthsParse[e]||(n=H([2e3,e]),s="^"+this.months(n,"")+"|^"+this.monthsShort(n,""),this._monthsParse[e]=new RegExp(s.replace(".",""),"i")),this._monthsParse[e].test(t))return e},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},weekdaysParse:function(t){var e,n,s;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++)if(this._weekdaysParse[e]||(n=H([2e3,1]).day(e),s="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(s.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},isPM:function(t){return"p"===(t+"").toLowerCase()[0]},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(t,e){var n=this._calendar[t];return"function"==typeof n?n.apply(e):n},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(t,e,n,s){var i=this._relativeTime[n];return"function"==typeof i?i(t,e,n,s):i.replace(/%d/i,t)},pastFuture:function(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",preparse:function(t){return t},postformat:function(t){return t},week:function(t){return F(t,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6}},H=function(t,e,n){return O({_i:t,_f:e,_l:n,_isUTC:!1})},H.utc=function(t,e,n){return O({_useUTC:!0,_isUTC:!0,_l:n,_i:t,_f:e})},H.unix=function(t){return H(1e3*t)},H.duration=function(t,e){var n,s,i=H.isDuration(t),a="number"==typeof t,o=i?t._input:a?{}:t,u=Z.exec(t);return a?e?o[e]=t:o.milliseconds=t:u&&(n="-"===u[1]?-1:1,o={y:0,d:~~u[2]*n,h:~~u[3]*n,m:~~u[4]*n,s:~~u[5]*n,ms:~~u[6]*n}),s=new r(o),i&&t.hasOwnProperty("_lang")&&(s._lang=t._lang),s},H.version=U,H.defaultFormat=Q,H.updateOffset=function(){},H.lang=function(t,e){return t?(e?l(t,e):x[t]||_(t),H.duration.fn._lang=H.fn._lang=_(t),void 0):H.fn._lang._abbr},H.langData=function(t){return t&&t._lang&&t._lang._abbr&&(t=t._lang._abbr),_(t)},H.isMoment=function(t){return t instanceof i},H.isDuration=function(t){return t instanceof r},H.fn=i.prototype={clone:function(){return H(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){return M(H(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var t=this;return[t.year(),t.month(),t.date(),t.hours(),t.minutes(),t.seconds(),t.milliseconds()]},isValid:function(){return null==this._isValid&&(this._isValid=this._a?!c(this._a,(this._isUTC?H.utc(this._a):H(this._a)).toArray()):!isNaN(this._d.getTime())),!!this._isValid},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(t){var e=M(this,t||H.defaultFormat);return this.lang().postformat(e)},add:function(t,e){var n;return n="string"==typeof t?H.duration(+e,t):H.duration(t,e),h(this,n,1),this},subtract:function(t,e){var n;return n="string"==typeof t?H.duration(+e,t):H.duration(t,e),h(this,n,-1),this},diff:function(t,e,n){var s,i,r=this._isUTC?H(t).zone(this._offset||0):H(t).local(),a=6e4*(this.zone()-r.zone());return e=f(e),"year"===e||"month"===e?(s=432e5*(this.daysInMonth()+r.daysInMonth()),i=12*(this.year()-r.year())+(this.month()-r.month()),i+=(this-H(this).startOf("month")-(r-H(r).startOf("month")))/s,i-=6e4*(this.zone()-H(this).startOf("month").zone()-(r.zone()-H(r).startOf("month").zone()))/s,"year"===e&&(i/=12)):(s=this-r,i="second"===e?s/1e3:"minute"===e?s/6e4:"hour"===e?s/36e5:"day"===e?(s-a)/864e5:"week"===e?(s-a)/6048e5:s),n?i:o(i)},from:function(t,e){return H.duration(this.diff(t)).lang(this.lang()._abbr).humanize(!e)},fromNow:function(t){return this.from(H(),t)},calendar:function(){var t=this.diff(H().startOf("day"),"days",!0),e=-6>t?"sameElse":-1>t?"lastWeek":0>t?"lastDay":1>t?"sameDay":2>t?"nextDay":7>t?"nextWeek":"sameElse";return this.format(this.lang().calendar(e,this))},isLeapYear:function(){var t=this.year();return 0===t%4&&0!==t%100||0===t%400},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?"string"==typeof t&&(t=this.lang().weekdaysParse(t),"number"!=typeof t)?this:this.add({d:t-e}):e},month:function(t){var e,n=this._isUTC?"UTC":"";return null!=t?"string"==typeof t&&(t=this.lang().monthsParse(t),"number"!=typeof t)?this:(e=this.date(),this.date(1),this._d["set"+n+"Month"](t),this.date(Math.min(e,this.daysInMonth())),H.updateOffset(this),this):this._d["get"+n+"Month"]()},startOf:function(t){switch(t=f(t)){case"year":this.month(0);case"month":this.date(1);case"week":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t&&this.weekday(0),this},endOf:function(t){return this.startOf(t).add(t,1).subtract("ms",1)},isAfter:function(t,e){return e="undefined"!=typeof e?e:"millisecond",+this.clone().startOf(e)>+H(t).startOf(e)},isBefore:function(t,e){return e="undefined"!=typeof e?e:"millisecond",+this.clone().startOf(e)<+H(t).startOf(e)},isSame:function(t,e){return e="undefined"!=typeof e?e:"millisecond",+this.clone().startOf(e)===+H(t).startOf(e)},min:function(t){return t=H.apply(null,arguments),this>t?this:t},max:function(t){return t=H.apply(null,arguments),t>this?this:t},zone:function(t){var e=this._offset||0;return null==t?this._isUTC?e:this._d.getTimezoneOffset():("string"==typeof t&&(t=p(t)),Math.abs(t)<16&&(t=60*t),this._offset=t,this._isUTC=!0,e!==t&&h(this,H.duration(e-t,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},daysInMonth:function(){return H.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(t){var e=W((H(this).startOf("day")-H(this).startOf("year"))/864e5)+1;return null==t?e:this.add("d",t-e)},weekYear:function(t){var e=F(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==t?e:this.add("y",t-e)},isoWeekYear:function(t){var e=F(this,1,4).year;return null==t?e:this.add("y",t-e)},week:function(t){var e=this.lang().week(this);return null==t?e:this.add("d",7*(t-e))},isoWeek:function(t){var e=F(this,1,4).week;return null==t?e:this.add("d",7*(t-e))},weekday:function(t){var e=(this._d.getDay()+7-this.lang()._week.dow)%7;return null==t?e:this.add("d",t-e)},isoWeekday:function(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)},lang:function(e){return e===t?this._lang:(this._lang=_(e),this)}},P=0;P<ne.length;P++)z(ne[P].toLowerCase().replace(/s$/,""),ne[P]);z("year","FullYear"),H.fn.days=H.fn.day,H.fn.months=H.fn.month,H.fn.weeks=H.fn.week,H.fn.isoWeeks=H.fn.isoWeek,H.fn.toJSON=H.fn.toISOString,H.duration.fn=r.prototype={_bubble:function(){var t,e,n,s,i=this._milliseconds,r=this._days,a=this._months,u=this._data;u.milliseconds=i%1e3,t=o(i/1e3),u.seconds=t%60,e=o(t/60),u.minutes=e%60,n=o(e/60),u.hours=n%24,r+=o(n/24),u.days=r%30,a+=o(r/30),u.months=a%12,s=o(a/12),u.years=s},weeks:function(){return o(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+2592e6*(this._months%12)+31536e6*~~(this._months/12)},humanize:function(t){var e=+this,n=S(e,!t,this.lang());return t&&(n=this.lang().pastFuture(e,n)),this.lang().postformat(n)},add:function(t,e){var n=H.duration(t,e);return this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(t,e){var n=H.duration(t,e);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(t){return t=f(t),this[t.toLowerCase()+"s"]()},as:function(t){return t=f(t),this["as"+t.charAt(0).toUpperCase()+t.slice(1)+"s"]()},lang:H.fn.lang};for(P in se)se.hasOwnProperty(P)&&(L(P,se[P]),C(P.toLowerCase()));L("Weeks",6048e5),H.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},H.lang("en",{ordinal:function(t){var e=t%10,n=1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),A&&(module.exports=H),"undefined"==typeof ender&&(this.moment=H),"function"==typeof define&&define.amd&&define("moment",[],function(){return H})}.call(this);
//! moment.js
//! version : 2.2.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
(function(a){function b(a,b){return function(c){return i(a.call(this,c),b)}}function c(a,b){return function(c){return this.lang().ordinal(a.call(this,c),b)}}function d(){}function e(a){g(this,a)}function f(a){var b=a.years||a.year||a.y||0,c=a.months||a.month||a.M||0,d=a.weeks||a.week||a.w||0,e=a.days||a.day||a.d||0,f=a.hours||a.hour||a.h||0,g=a.minutes||a.minute||a.m||0,h=a.seconds||a.second||a.s||0,i=a.milliseconds||a.millisecond||a.ms||0;this._input=a,this._milliseconds=+i+1e3*h+6e4*g+36e5*f,this._days=+e+7*d,this._months=+c+12*b,this._data={},this._bubble()}function g(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function h(a){return 0>a?Math.ceil(a):Math.floor(a)}function i(a,b){for(var c=a+"";c.length<b;)c="0"+c;return c}function j(a,b,c,d){var e,f,g=b._milliseconds,h=b._days,i=b._months;g&&a._d.setTime(+a._d+g*c),(h||i)&&(e=a.minute(),f=a.hour()),h&&a.date(a.date()+h*c),i&&a.month(a.month()+i*c),g&&!d&&L.updateOffset(a),(h||i)&&(a.minute(e),a.hour(f))}function k(a){return"[object Array]"===Object.prototype.toString.call(a)}function l(a,b){var c,d=Math.min(a.length,b.length),e=Math.abs(a.length-b.length),f=0;for(c=0;d>c;c++)~~a[c]!==~~b[c]&&f++;return f+e}function m(a){return a?ib[a]||a.toLowerCase().replace(/(.)s$/,"$1"):a}function n(a,b){return b.abbr=a,P[a]||(P[a]=new d),P[a].set(b),P[a]}function o(a){delete P[a]}function p(a){if(!a)return L.fn._lang;if(!P[a]&&Q)try{require("./lang/"+a)}catch(b){return L.fn._lang}return P[a]||L.fn._lang}function q(a){return a.match(/\[.*\]/)?a.replace(/^\[|\]$/g,""):a.replace(/\\/g,"")}function r(a){var b,c,d=a.match(T);for(b=0,c=d.length;c>b;b++)d[b]=mb[d[b]]?mb[d[b]]:q(d[b]);return function(e){var f="";for(b=0;c>b;b++)f+=d[b]instanceof Function?d[b].call(e,a):d[b];return f}}function s(a,b){return b=t(b,a.lang()),jb[b]||(jb[b]=r(b)),jb[b](a)}function t(a,b){function c(a){return b.longDateFormat(a)||a}for(var d=5;d--&&(U.lastIndex=0,U.test(a));)a=a.replace(U,c);return a}function u(a,b){switch(a){case"DDDD":return X;case"YYYY":return Y;case"YYYYY":return Z;case"S":case"SS":case"SSS":case"DDD":return W;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return $;case"a":case"A":return p(b._l)._meridiemParse;case"X":return bb;case"Z":case"ZZ":return _;case"T":return ab;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 V;default:return new RegExp(a.replace("\\",""))}}function v(a){var b=(_.exec(a)||[])[0],c=(b+"").match(fb)||["-",0,0],d=+(60*c[1])+~~c[2];return"+"===c[0]?-d:d}function w(a,b,c){var d,e=c._a;switch(a){case"M":case"MM":null!=b&&(e[1]=~~b-1);break;case"MMM":case"MMMM":d=p(c._l).monthsParse(b),null!=d?e[1]=d:c._isValid=!1;break;case"D":case"DD":null!=b&&(e[2]=~~b);break;case"DDD":case"DDDD":null!=b&&(e[1]=0,e[2]=~~b);break;case"YY":e[0]=~~b+(~~b>68?1900:2e3);break;case"YYYY":case"YYYYY":e[0]=~~b;break;case"a":case"A":c._isPm=p(c._l).isPM(b);break;case"H":case"HH":case"h":case"hh":e[3]=~~b;break;case"m":case"mm":e[4]=~~b;break;case"s":case"ss":e[5]=~~b;break;case"S":case"SS":case"SSS":e[6]=~~(1e3*("0."+b));break;case"X":c._d=new Date(1e3*parseFloat(b));break;case"Z":case"ZZ":c._useUTC=!0,c._tzm=v(b)}null==b&&(c._isValid=!1)}function x(a){var b,c,d,e=[];if(!a._d){for(d=z(a),b=0;3>b&&null==a._a[b];++b)a._a[b]=e[b]=d[b];for(;7>b;b++)a._a[b]=e[b]=null==a._a[b]?2===b?1:0:a._a[b];e[3]+=~~((a._tzm||0)/60),e[4]+=~~((a._tzm||0)%60),c=new Date(0),a._useUTC?(c.setUTCFullYear(e[0],e[1],e[2]),c.setUTCHours(e[3],e[4],e[5],e[6])):(c.setFullYear(e[0],e[1],e[2]),c.setHours(e[3],e[4],e[5],e[6])),a._d=c}}function y(a){var b=a._i;a._d||(a._a=[b.years||b.year||b.y,b.months||b.month||b.M,b.days||b.day||b.d,b.hours||b.hour||b.h,b.minutes||b.minute||b.m,b.seconds||b.second||b.s,b.milliseconds||b.millisecond||b.ms],x(a))}function z(a){var b=new Date;return a._useUTC?[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]:[b.getFullYear(),b.getMonth(),b.getDate()]}function A(a){var b,c,d,e=p(a._l),f=""+a._i;for(d=t(a._f,e).match(T),a._a=[],b=0;b<d.length;b++)c=(u(d[b],a).exec(f)||[])[0],c&&(f=f.slice(f.indexOf(c)+c.length)),mb[d[b]]&&w(d[b],c,a);f&&(a._il=f),a._isPm&&a._a[3]<12&&(a._a[3]+=12),a._isPm===!1&&12===a._a[3]&&(a._a[3]=0),x(a)}function B(a){var b,c,d,f,h,i=99;for(f=0;f<a._f.length;f++)b=g({},a),b._f=a._f[f],A(b),c=new e(b),h=l(b._a,c.toArray()),c._il&&(h+=c._il.length),i>h&&(i=h,d=c);g(a,d)}function C(a){var b,c=a._i,d=cb.exec(c);if(d){for(a._f="YYYY-MM-DD"+(d[2]||" "),b=0;4>b;b++)if(eb[b][1].exec(c)){a._f+=eb[b][0];break}_.exec(c)&&(a._f+=" Z"),A(a)}else a._d=new Date(c)}function D(b){var c=b._i,d=R.exec(c);c===a?b._d=new Date:d?b._d=new Date(+d[1]):"string"==typeof c?C(b):k(c)?(b._a=c.slice(0),x(b)):c instanceof Date?b._d=new Date(+c):"object"==typeof c?y(b):b._d=new Date(c)}function E(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function F(a,b,c){var d=O(Math.abs(a)/1e3),e=O(d/60),f=O(e/60),g=O(f/24),h=O(g/365),i=45>d&&["s",d]||1===e&&["m"]||45>e&&["mm",e]||1===f&&["h"]||22>f&&["hh",f]||1===g&&["d"]||25>=g&&["dd",g]||45>=g&&["M"]||345>g&&["MM",O(g/30)]||1===h&&["y"]||["yy",h];return i[2]=b,i[3]=a>0,i[4]=c,E.apply({},i)}function G(a,b,c){var d,e=c-b,f=c-a.day();return f>e&&(f-=7),e-7>f&&(f+=7),d=L(a).add("d",f),{week:Math.ceil(d.dayOfYear()/7),year:d.year()}}function H(a){var b=a._i,c=a._f;return null===b||""===b?null:("string"==typeof b&&(a._i=b=p().preparse(b)),L.isMoment(b)?(a=g({},b),a._d=new Date(+b._d)):c?k(c)?B(a):A(a):D(a),new e(a))}function I(a,b){L.fn[a]=L.fn[a+"s"]=function(a){var c=this._isUTC?"UTC":"";return null!=a?(this._d["set"+c+b](a),L.updateOffset(this),this):this._d["get"+c+b]()}}function J(a){L.duration.fn[a]=function(){return this._data[a]}}function K(a,b){L.duration.fn["as"+a]=function(){return+this/b}}for(var L,M,N="2.2.1",O=Math.round,P={},Q="undefined"!=typeof module&&module.exports,R=/^\/?Date\((\-?\d+)/i,S=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)\:(\d+)\.?(\d{3})?/,T=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|SS?S?|X|zz?|ZZ?|.)/g,U=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,V=/\d\d?/,W=/\d{1,3}/,X=/\d{3}/,Y=/\d{1,4}/,Z=/[+\-]?\d{1,6}/,$=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,_=/Z|[\+\-]\d\d:?\d\d/i,ab=/T/i,bb=/[\+\-]?\d+(\.\d{1,3})?/,cb=/^\s*\d{4}-\d\d-\d\d((T| )(\d\d(:\d\d(:\d\d(\.\d\d?\d?)?)?)?)?([\+\-]\d\d:?\d\d)?)?/,db="YYYY-MM-DDTHH:mm:ssZ",eb=[["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/]],fb=/([\+\-]|\d\d)/gi,gb="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),hb={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},ib={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",w:"week",W:"isoweek",M:"month",y:"year"},jb={},kb="DDD w W M D d".split(" "),lb="M D H h m s w W".split(" "),mb={M:function(){return this.month()+1},MMM:function(a){return this.lang().monthsShort(this,a)},MMMM:function(a){return this.lang().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.lang().weekdaysMin(this,a)},ddd:function(a){return this.lang().weekdaysShort(this,a)},dddd:function(a){return this.lang().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return i(this.year()%100,2)},YYYY:function(){return i(this.year(),4)},YYYYY:function(){return i(this.year(),5)},gg:function(){return i(this.weekYear()%100,2)},gggg:function(){return this.weekYear()},ggggg:function(){return i(this.weekYear(),5)},GG:function(){return i(this.isoWeekYear()%100,2)},GGGG:function(){return this.isoWeekYear()},GGGGG:function(){return i(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return~~(this.milliseconds()/100)},SS:function(){return i(~~(this.milliseconds()/10),2)},SSS:function(){return i(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+i(~~(a/60),2)+":"+i(~~a%60,2)},ZZ:function(){var a=-this.zone(),b="+";return 0>a&&(a=-a,b="-"),b+i(~~(10*a/6),4)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()}};kb.length;)M=kb.pop(),mb[M+"o"]=c(mb[M],M);for(;lb.length;)M=lb.pop(),mb[M+M]=b(mb[M],2);for(mb.DDDD=b(mb.DDD,3),g(d.prototype,{set:function(a){var b,c;for(c in a)b=a[c],"function"==typeof b?this[c]=b:this["_"+c]=b},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var b,c,d;for(this._monthsParse||(this._monthsParse=[]),b=0;12>b;b++)if(this._monthsParse[b]||(c=L.utc([2e3,b]),d="^"+this.months(c,"")+"|^"+this.monthsShort(c,""),this._monthsParse[b]=new RegExp(d.replace(".",""),"i")),this._monthsParse[b].test(a))return b},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var b,c,d;for(this._weekdaysParse||(this._weekdaysParse=[]),b=0;7>b;b++)if(this._weekdaysParse[b]||(c=L([2e3,1]).day(b),d="^"+this.weekdays(c,"")+"|^"+this.weekdaysShort(c,"")+"|^"+this.weekdaysMin(c,""),this._weekdaysParse[b]=new RegExp(d.replace(".",""),"i")),this._weekdaysParse[b].test(a))return b},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];return!b&&this._longDateFormat[a.toUpperCase()]&&(b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)}),this._longDateFormat[a]=b),b},isPM:function(a){return"p"===(a+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){return a>11?c?"pm":"PM":c?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return"function"==typeof c?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return"function"==typeof e?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return"function"==typeof c?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return G(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6}}),L=function(a,b,c){return H({_i:a,_f:b,_l:c,_isUTC:!1})},L.utc=function(a,b,c){return H({_useUTC:!0,_isUTC:!0,_l:c,_i:a,_f:b}).utc()},L.unix=function(a){return L(1e3*a)},L.duration=function(a,b){var c,d,e=L.isDuration(a),g="number"==typeof a,h=e?a._input:g?{}:a,i=S.exec(a);return g?b?h[b]=a:h.milliseconds=a:i&&(c="-"===i[1]?-1:1,h={y:0,d:~~i[2]*c,h:~~i[3]*c,m:~~i[4]*c,s:~~i[5]*c,ms:~~i[6]*c}),d=new f(h),e&&a.hasOwnProperty("_lang")&&(d._lang=a._lang),d},L.version=N,L.defaultFormat=db,L.updateOffset=function(){},L.lang=function(a,b){return a?(a=a.toLowerCase(),a=a.replace("_","-"),b?n(a,b):null===b?(o(a),a="en"):P[a]||p(a),L.duration.fn._lang=L.fn._lang=p(a),void 0):L.fn._lang._abbr},L.langData=function(a){return a&&a._lang&&a._lang._abbr&&(a=a._lang._abbr),p(a)},L.isMoment=function(a){return a instanceof e},L.isDuration=function(a){return a instanceof f},g(L.fn=e.prototype,{clone:function(){return L(this)},valueOf:function(){return+this._d+6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){return s(L(this).utc(),"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return null==this._isValid&&(this._isValid=this._a?!l(this._a,(this._isUTC?L.utc(this._a):L(this._a)).toArray()):!isNaN(this._d.getTime())),!!this._isValid},invalidAt:function(){var a,b=this._a,c=(this._isUTC?L.utc(this._a):L(this._a)).toArray();for(a=6;a>=0&&b[a]===c[a];--a);return a},utc:function(){return this.zone(0)},local:function(){return this.zone(0),this._isUTC=!1,this},format:function(a){var b=s(this,a||L.defaultFormat);return this.lang().postformat(b)},add:function(a,b){var c;return c="string"==typeof a?L.duration(+b,a):L.duration(a,b),j(this,c,1),this},subtract:function(a,b){var c;return c="string"==typeof a?L.duration(+b,a):L.duration(a,b),j(this,c,-1),this},diff:function(a,b,c){var d,e,f=this._isUTC?L(a).zone(this._offset||0):L(a).local(),g=6e4*(this.zone()-f.zone());return b=m(b),"year"===b||"month"===b?(d=432e5*(this.daysInMonth()+f.daysInMonth()),e=12*(this.year()-f.year())+(this.month()-f.month()),e+=(this-L(this).startOf("month")-(f-L(f).startOf("month")))/d,e-=6e4*(this.zone()-L(this).startOf("month").zone()-(f.zone()-L(f).startOf("month").zone()))/d,"year"===b&&(e/=12)):(d=this-f,e="second"===b?d/1e3:"minute"===b?d/6e4:"hour"===b?d/36e5:"day"===b?(d-g)/864e5:"week"===b?(d-g)/6048e5:d),c?e:h(e)},from:function(a,b){return L.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!b)},fromNow:function(a){return this.from(L(),a)},calendar:function(){var a=this.diff(L().zone(this.zone()).startOf("day"),"days",!0),b=-6>a?"sameElse":-1>a?"lastWeek":0>a?"lastDay":1>a?"sameDay":2>a?"nextDay":7>a?"nextWeek":"sameElse";return this.format(this.lang().calendar(b,this))},isLeapYear:function(){var a=this.year();return 0===a%4&&0!==a%100||0===a%400},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=a?"string"==typeof a&&(a=this.lang().weekdaysParse(a),"number"!=typeof a)?this:this.add({d:a-b}):b},month:function(a){var b,c=this._isUTC?"UTC":"";return null!=a?"string"==typeof a&&(a=this.lang().monthsParse(a),"number"!=typeof a)?this:(b=this.date(),this.date(1),this._d["set"+c+"Month"](a),this.date(Math.min(b,this.daysInMonth())),L.updateOffset(this),this):this._d["get"+c+"Month"]()},startOf:function(a){switch(a=m(a)){case"year":this.month(0);case"month":this.date(1);case"week":case"isoweek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===a?this.weekday(0):"isoweek"===a&&this.isoWeekday(1),this},endOf:function(a){return a=m(a),this.startOf(a).add("isoweek"===a?"week":a,1).subtract("ms",1)},isAfter:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)>+L(a).startOf(b)},isBefore:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)<+L(a).startOf(b)},isSame:function(a,b){return b="undefined"!=typeof b?b:"millisecond",+this.clone().startOf(b)===+L(a).startOf(b)},min:function(a){return a=L.apply(null,arguments),this>a?this:a},max:function(a){return a=L.apply(null,arguments),a>this?this:a},zone:function(a){var b=this._offset||0;return null==a?this._isUTC?b:this._d.getTimezoneOffset():("string"==typeof a&&(a=v(a)),Math.abs(a)<16&&(a=60*a),this._offset=a,this._isUTC=!0,b!==a&&j(this,L.duration(b-a,"m"),1,!0),this)},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},hasAlignedHourOffset:function(a){return a=a?L(a).zone():0,0===(this.zone()-a)%60},daysInMonth:function(){return L.utc([this.year(),this.month()+1,0]).date()},dayOfYear:function(a){var b=O((L(this).startOf("day")-L(this).startOf("year"))/864e5)+1;return null==a?b:this.add("d",a-b)},weekYear:function(a){var b=G(this,this.lang()._week.dow,this.lang()._week.doy).year;return null==a?b:this.add("y",a-b)},isoWeekYear:function(a){var b=G(this,1,4).year;return null==a?b:this.add("y",a-b)},week:function(a){var b=this.lang().week(this);return null==a?b:this.add("d",7*(a-b))},isoWeek:function(a){var b=G(this,1,4).week;return null==a?b:this.add("d",7*(a-b))},weekday:function(a){var b=(this._d.getDay()+7-this.lang()._week.dow)%7;return null==a?b:this.add("d",a-b)},isoWeekday:function(a){return null==a?this.day()||7:this.day(this.day()%7?a:a-7)},get:function(a){return a=m(a),this[a.toLowerCase()]()},set:function(a,b){a=m(a),this[a.toLowerCase()](b)},lang:function(b){return b===a?this._lang:(this._lang=p(b),this)}}),M=0;M<gb.length;M++)I(gb[M].toLowerCase().replace(/s$/,""),gb[M]);I("year","FullYear"),L.fn.days=L.fn.day,L.fn.months=L.fn.month,L.fn.weeks=L.fn.week,L.fn.isoWeeks=L.fn.isoWeek,L.fn.toJSON=L.fn.toISOString,g(L.duration.fn=f.prototype,{_bubble:function(){var a,b,c,d,e=this._milliseconds,f=this._days,g=this._months,i=this._data;i.milliseconds=e%1e3,a=h(e/1e3),i.seconds=a%60,b=h(a/60),i.minutes=b%60,c=h(b/60),i.hours=c%24,f+=h(c/24),i.days=f%30,g+=h(f/30),i.months=g%12,d=h(g/12),i.years=d},weeks:function(){return h(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+2592e6*(this._months%12)+31536e6*~~(this._months/12)},humanize:function(a){var b=+this,c=F(b,!a,this.lang());return a&&(c=this.lang().pastFuture(b,c)),this.lang().postformat(c)},add:function(a,b){var c=L.duration(a,b);return this._milliseconds+=c._milliseconds,this._days+=c._days,this._months+=c._months,this._bubble(),this},subtract:function(a,b){var c=L.duration(a,b);return this._milliseconds-=c._milliseconds,this._days-=c._days,this._months-=c._months,this._bubble(),this},get:function(a){return a=m(a),this[a.toLowerCase()+"s"]()},as:function(a){return a=m(a),this["as"+a.charAt(0).toUpperCase()+a.slice(1)+"s"]()},lang:L.fn.lang});for(M in hb)hb.hasOwnProperty(M)&&(K(M,hb[M]),J(M.toLowerCase()));K("Weeks",6048e5),L.duration.fn.asMonths=function(){return(+this-31536e6*this.years())/2592e6+12*this.years()},L.lang("en",{ordinal:function(a){var b=a%10,c=1===~~(a%100/10)?"th":1===b?"st":2===b?"nd":3===b?"rd":"th";return a+c}}),Q&&(module.exports=L),"undefined"==typeof ender&&(this.moment=L),"function"==typeof define&&define.amd&&define("moment",[],function(){return L})}).call(this);

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

// moment.js
// version : 2.1.0
// author : Tim Wood
// license : MIT
// momentjs.com
//! moment.js
//! version : 2.2.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com

@@ -14,3 +14,3 @@ (function (undefined) {

var moment,
VERSION = "2.1.0",
VERSION = "2.2.1",
round = Math.round, i,

@@ -25,3 +25,3 @@ // internal storage for language config files

aspNetJsonRegex = /^\/?Date\((\-?\d+)/i,
aspNetTimeSpanJsonRegex = /(\-)?(\d*)?\.?(\d+)\:(\d+)\:(\d+)\.?(\d{3})?/,
aspNetTimeSpanJsonRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)\:(\d+)\.?(\d{3})?/,

@@ -78,2 +78,3 @@ // format tokens

w : 'week',
W : 'isoweek',
M : 'month',

@@ -263,3 +264,3 @@ y : 'year'

// representation for dateAddRemove
this._milliseconds = milliseconds +
this._milliseconds = +milliseconds +
seconds * 1e3 + // 1000

@@ -270,3 +271,3 @@ minutes * 6e4 + // 1000 * 60

// day when working around DST, we need to store them separately
this._days = days +
this._days = +days +
weeks * 7;

@@ -276,3 +277,3 @@ // It is impossible translate months into days without knowing

// it separately.
this._months = months +
this._months = +months +
years * 12;

@@ -324,4 +325,3 @@

minutes,
hours,
currentDate;
hours;

@@ -381,3 +381,4 @@ if (milliseconds) {

Language.prototype = {
extend(Language.prototype, {
set : function (config) {

@@ -415,3 +416,3 @@ var prop, i;

if (!this._monthsParse[i]) {
mom = moment([2000, i]);
mom = moment.utc([2000, i]);
regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');

@@ -482,3 +483,5 @@ this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');

isPM : function (input) {
return ((input + '').toLowerCase()[0] === 'p');
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
// Using charAt should be more compatible.
return ((input + '').toLowerCase().charAt(0) === 'p');
},

@@ -554,3 +557,3 @@

}
};
});

@@ -570,2 +573,7 @@ // Loads a language definition into the `languages` cache. The function

// Remove a language from the `languages` cache. Mostly useful in tests.
function unloadLang(key) {
delete languages[key];
}
// Determines which language definition to use and returns it.

@@ -589,3 +597,3 @@ //

}
return languages[key];
return languages[key] || moment.fn._lang;
}

@@ -628,17 +636,25 @@

function formatMoment(m, format) {
format = expandFormat(format, m.lang());
if (!formatFunctions[format]) {
formatFunctions[format] = makeFormatFunction(format);
}
return formatFunctions[format](m);
}
function expandFormat(format, lang) {
var i = 5;
function replaceLongDateFormatTokens(input) {
return m.lang().longDateFormat(input) || input;
return lang.longDateFormat(input) || input;
}
while (i-- && localFormattingTokens.test(format)) {
while (i-- && (localFormattingTokens.lastIndex = 0,
localFormattingTokens.test(format))) {
format = format.replace(localFormattingTokens, replaceLongDateFormatTokens);
}
if (!formatFunctions[format]) {
formatFunctions[format] = makeFormatFunction(format);
}
return formatFunctions[format](m);
return format;
}

@@ -718,3 +734,5 @@

case 'MM' :
datePartArray[1] = (input == null) ? 0 : ~~input - 1;
if (input != null) {
datePartArray[1] = ~~input - 1;
}
break;

@@ -732,7 +750,13 @@ case 'MMM' : // fall through to MMMM

// DAY OF MONTH
case 'D' : // fall through to DDDD
case 'DD' : // fall through to DDDD
case 'D' : // fall through to DD
case 'DD' :
if (input != null) {
datePartArray[2] = ~~input;
}
break;
// DAY OF YEAR
case 'DDD' : // fall through to DDDD
case 'DDDD' :
if (input != null) {
datePartArray[1] = 0;
datePartArray[2] = ~~input;

@@ -800,3 +824,3 @@ }

function dateFromArray(config) {
var i, date, input = [];
var i, date, input = [], currentDate;

@@ -807,3 +831,14 @@ if (config._d) {

for (i = 0; i < 7; i++) {
// Default to current date.
// * if no year, month, day of month are given, default to today
// * if day of month is given, default month and year
// * if month is given, default only year
// * if year is given, don't default anything
currentDate = currentDateArray(config);
for (i = 0; i < 3 && config._a[i] == null; ++i) {
config._a[i] = input[i] = currentDate[i];
}
// Zero out whatever was not defaulted, including time
for (; i < 7; i++) {
config._a[i] = input[i] = (config._a[i] == null) ? (i === 2 ? 1 : 0) : config._a[i];

@@ -829,9 +864,44 @@ }

function dateFromObject(config) {
var o = config._i;
if (config._d) {
return;
}
config._a = [
o.years || o.year || o.y,
o.months || o.month || o.M,
o.days || o.day || o.d,
o.hours || o.hour || o.h,
o.minutes || o.minute || o.m,
o.seconds || o.second || o.s,
o.milliseconds || o.millisecond || o.ms
];
dateFromArray(config);
}
function currentDateArray(config) {
var now = new Date();
if (config._useUTC) {
return [
now.getUTCFullYear(),
now.getUTCMonth(),
now.getUTCDate()
];
} else {
return [now.getFullYear(), now.getMonth(), now.getDate()];
}
}
// date from string and format string
function makeDateFromStringAndFormat(config) {
// This array is used to make a Date, either with `new Date` or `Date.UTC`
var tokens = config._f.match(formattingTokens),
string = config._i,
i, parsedInput;
var lang = getLangDefinition(config._l),
string = '' + config._i,
i, parsedInput, tokens;
tokens = expandFormat(config._f, lang).match(formattingTokens);
config._a = [];

@@ -937,4 +1007,8 @@

dateFromArray(config);
} else if (input instanceof Date) {
config._d = new Date(+input);
} else if (typeof(input) === 'object') {
dateFromObject(config);
} else {
config._d = input instanceof Date ? new Date(+input) : new Date(input);
config._d = new Date(input);
}

@@ -1060,3 +1134,3 @@ }

_f : format
});
}).utc();
};

@@ -1122,4 +1196,9 @@

}
key = key.toLowerCase();
key = key.replace('_', '-');
if (values) {
loadLang(key, values);
} else if (values === null) {
unloadLang(key);
key = 'en';
} else if (!languages[key]) {

@@ -1155,3 +1234,3 @@ getLangDefinition(key);

moment.fn = Moment.prototype = {
extend(moment.fn = Moment.prototype, {

@@ -1206,2 +1285,10 @@ clone : function () {

invalidAt: function () {
var i, arr1 = this._a, arr2 = (this._isUTC ? moment.utc(this._a) : moment(this._a)).toArray();
for (i = 6; i >= 0 && arr1[i] === arr2[i]; --i) {
// empty loop body
}
return i;
},
utc : function () {

@@ -1289,3 +1376,3 @@ return this.zone(0);

calendar : function () {
var diff = this.diff(moment().startOf('day'), 'days', true),
var diff = this.diff(moment().zone(this.zone()).startOf('day'), 'days', true),
format = diff < -6 ? 'sameElse' :

@@ -1327,4 +1414,3 @@ diff < -1 ? 'lastWeek' :

var utc = this._isUTC ? 'UTC' : '',
dayOfMonth,
daysInMonth;
dayOfMonth;

@@ -1363,2 +1449,3 @@ if (input != null) {

case 'week':
case 'isoweek':
case 'day':

@@ -1381,2 +1468,4 @@ this.hours(0);

this.weekday(0);
} else if (units === 'isoweek') {
this.isoWeekday(1);
}

@@ -1388,3 +1477,4 @@

endOf: function (units) {
return this.startOf(units).add(units, 1).subtract('ms', 1);
units = normalizeUnits(units);
return this.startOf(units).add((units === 'isoweek' ? 'week' : units), 1).subtract('ms', 1);
},

@@ -1445,2 +1535,13 @@

hasAlignedHourOffset : function (input) {
if (!input) {
input = 0;
}
else {
input = moment(input).zone();
}
return (this.zone() - input) % 60 === 0;
},
daysInMonth : function () {

@@ -1487,2 +1588,12 @@ return moment.utc([this.year(), this.month() + 1, 0]).date();

get : function (units) {
units = normalizeUnits(units);
return this[units.toLowerCase()]();
},
set : function (units, value) {
units = normalizeUnits(units);
this[units.toLowerCase()](value);
},
// If passed a language key, it will set the language for this

@@ -1499,3 +1610,3 @@ // instance. Otherwise, it will return the language configuration

}
};
});

@@ -1538,3 +1649,4 @@ // helper for adding shortcuts

moment.duration.fn = Duration.prototype = {
extend(moment.duration.fn = Duration.prototype, {
_bubble : function () {

@@ -1628,3 +1740,3 @@ var milliseconds = this._milliseconds,

lang : moment.fn.lang
};
});

@@ -1673,2 +1785,3 @@ function makeDurationGetter(name) {

/* EMBED_LANGUAGES */

@@ -1675,0 +1788,0 @@ /************************************

{
"name": "moment",
"version": "2.1.0",
"version": "2.2.1",
"description": "Parse, manipulate, and display dates.",
"homepage": "http://momentjs.com",
"author": "Tim Wood <washwithcare@gmail.com> (http://timwoodcreates.com/)",
"author": "Iskren Ivov Chernev <iskren.chernev@gmail.com> (https://github.com/ichernev)",
"contributors": [
"Tim Wood <washwithcare@gmail.com> (http://timwoodcreates.com/)",
"Rocky Meza (http://rockymeza.com)",
"Iskren Ivov Chernev <iskren.chernev@gmail.com> (https://github.com/ichernev)"
"Matt Johnson <mj1856@hotmail.com> (http://codeofmatt.com)",
"Isaac Cambron <isaac@isaaccambron.com> (http://drunkencoder.net/)"
],

@@ -28,6 +30,6 @@ "keywords": [

"type": "git",
"url": "https://github.com/timrwood/moment.git"
"url": "https://github.com/moment/moment.git"
},
"bugs": {
"url": "https://github.com/timrwood/moment/issues"
"url": "https://github.com/moment/moment/issues"
},

@@ -34,0 +36,0 @@ "licenses" : [

@@ -27,5 +27,5 @@ A lightweight javascript date library for parsing, validating, manipulating, and formatting dates.

Develop [![Build Status](https://travis-ci.org/timrwood/moment.png?branch=develop)](https://travis-ci.org/timrwood/moment)
Develop [![Build Status](https://travis-ci.org/moment/moment.png?branch=develop)](https://travis-ci.org/moment/moment)
Master [![Build Status](https://travis-ci.org/timrwood/moment.png)](https://travis-ci.org/timrwood/moment)
Master [![Build Status](https://travis-ci.org/moment/moment.png?branch=master)](https://travis-ci.org/moment/moment)

@@ -35,2 +35,17 @@ Changelog

### 2.2.1
Fixed bug in string prototype test.
Updated authors and contributors.
### 2.2.0 [See changelog](https://gist.github.com/ichernev/00f837a9baf46a3565e4)
Added bower support.
Languge files now use UMD.
Creating moment defaults to current date/month/year.
Added a bundle of moment and all language files.
### 2.1.0 [See changelog](https://gist.github.com/timrwood/b8c2d90d528eddb53ab5)

@@ -262,11 +277,1 @@

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.

@@ -1,104 +0,60 @@

var path = require('path'),
nodeunit = require('nodeunit'),
moment = require('../moment');
var fs = require('fs');
module.exports = function (grunt) {
// placeholder for an array of timezones
var ALL_ZONES,
INITIAL_ZONE,
var ZONE_TAB = '/usr/share/zoneinfo/zone.tab';
done;
grunt.registerTask('zones', 'Run the unit tests in different timezones.', function () {
var done = this.async();
/******************************
Grunt task
******************************/
grunt.registerTask('zones', 'Run the unit tests in different timezones.', function () {
done = this.async();
getCurrentTimezone(function (zone) {
// save the initial timezone so we dont break our computers
INITIAL_ZONE = zone;
getAllTimezones(function (zones) {
// store all the timezones
ALL_ZONES = zones;
// start running the tests
nextTest(function () {
// reset the timezone like nothing ever happened
resetTimezone();
getAllTimezones(function (err, zones) {
if (err != null) {
throw err;
}
(function iterator(i) {
if (i >= zones.length) {
return done();
}
runTestsInZone(zones[i], function (err) {
if (err != null) {
throw err;
}
iterator(i+1);
});
});
}(0));
});
});
/******************************
Timezones
******************************/
function resetTimezone() {
setTimezone(INITIAL_ZONE, function () {
grunt.log.writeln("Resetting timezone back to " + INITIAL_ZONE);
done();
function getAllTimezones (callback) {
fs.readFile(ZONE_TAB, 'ascii', function (err, content) {
if (err != null) {
callback(err);
}
callback(null, content.split(/\r\n|\r|\n/)
// remove empty and commented lines
.filter(function (line) { return line && !/^#/.test(line); })
// country code TAB coordinates TAB timezone
.map(function (line) { return line.split('\t')[2]; }));
});
}
};
function getCurrentTimezone(cb) {
function runTestsInZone (zone, next) {
grunt.log.ok("Running tests in zone " + zone);
grunt.util.spawn({
cmd: "systemsetup",
args: ["gettimezone"]
}, function (err, result, code) {
cb(result.stdout.replace('Time Zone: ', ''));
});
}
function getAllTimezones(cb) {
grunt.util.spawn({
cmd: "systemsetup",
args: ["listtimezones"]
}, function (err, result, code) {
var zones = result.stdout.replace('Time Zones:', '');
zones = zones.match(/\S+/g);
cb(zones);
});
}
function setTimezone(zone, cb) {
grunt.util.spawn({
cmd: "systemsetup",
args: ["settimezone", zone]
}, function (err, result, code) {
cb();
});
}
/******************************
Tests
******************************/
function nextTest(cb) {
var zone = ALL_ZONES.pop();
if (zone) {
setTimezone(zone, function () {
testZone(zone, function () {
nextTest(cb);
});
});
} else {
cb();
}
}
function testZone(zone, cb) {
grunt.util.spawn({
cmd: "grunt",
args: ["zone"]
opts: { env: {
"PATH": process.env.PATH,
"TZ": zone
} },
args: ["--no-color", "nodeunit"]
}, function (err, result, code) {
if (err) {
resetTimezone();
throw err;
if (code !== 0) {
grunt.log.error(result.stdout.split(/\r\n|\r|\n/)
.filter(function (line) { return /^(>>|Warning:|$)/.test(line) })
.map(function (line) { return (line.substr(0, 3) === '>> ' ? line.substr(3) : line); })
.join('\n'));
}
console.log(result.stdout);
cb();
next();
});
}
};
};

@@ -16,6 +16,5 @@ // moment.js Moroccan arabic (ar-ma) tests

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'يناير:يناير_فبراير:فبراير_مارس:مارس_أبريل:أبريل_ماي:ماي_يونيو:يونيو_يوليوز:يوليوز_غشت:غشت_شتنبر:شتنبر_أكتوبر:أكتوبر_نونبر:نونبر_دجنبر:دجنبر'.split("_");
var i;
var tests = 'يناير:يناير_فبراير:فبراير_مارس:مارس_أبريل:أبريل_ماي:ماي_يونيو:يونيو_يوليوز:يوليوز_غشت:غشت_شتنبر:شتنبر_أكتوبر:أكتوبر_نونبر:نونبر_دجنبر:دجنبر'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -38,3 +37,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -73,3 +72,3 @@ var a = [

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -113,6 +112,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1', '1');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'يناير يناير_فبراير فبراير_مارس مارس_أبريل أبريل_ماي ماي_يونيو يونيو_يوليوز يوليوز_غشت غشت_شتنبر شتنبر_أكتوبر أكتوبر_نونبر نونبر_دجنبر دجنبر'.split("_");
var i;
var expected = 'يناير يناير_فبراير فبراير_مارس مارس_أبريل أبريل_ماي ماي_يونيو يونيو_يوليوز يوليوز_غشت غشت_شتنبر شتنبر_أكتوبر أكتوبر_نونبر نونبر_دجنبر دجنبر'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -124,6 +122,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'الأحد احد ح_الإتنين اتنين ن_الثلاثاء ثلاثاء ث_الأربعاء اربعاء ر_الخميس خميس خ_الجمعة جمعة ج_السبت سبت س'.split("_");
var i;
var expected = 'الأحد احد ح_الإتنين اتنين ن_الثلاثاء ثلاثاء ث_الأربعاء اربعاء ر_الخميس خميس خ_الجمعة جمعة ج_السبت سبت س'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -135,39 +132,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -179,3 +176,3 @@ test.equal(moment(30000).from(0), "في ثوان", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -186,10 +183,10 @@ test.equal(moment().fromNow(), "منذ ثوان", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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({s: 30}).fromNow(), "في ثوان", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "في 5 أيام", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -208,8 +205,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -226,7 +221,8 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i, m;
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
m = moment().subtract({d: i});
test.equal(m.calendar(), m.format('dddd [على الساعة] LT'), "Today - " + i + " days current time");

@@ -241,6 +237,6 @@ m.hours(0).minutes(0).seconds(0).milliseconds(0);

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -262,3 +258,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -275,3 +271,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -288,3 +284,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -302,3 +298,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -316,3 +312,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -330,3 +326,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(5);

@@ -343,3 +339,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -356,3 +352,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -359,0 +355,0 @@

@@ -16,6 +16,5 @@ // moment.js arabic (ar) tests

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'يناير/ كانون الثاني:يناير/ كانون الثاني_فبراير/ شباط:فبراير/ شباط_مارس/ آذار:مارس/ آذار_أبريل/ نيسان:أبريل/ نيسان_مايو/ أيار:مايو/ أيار_يونيو/ حزيران:يونيو/ حزيران_يوليو/ تموز:يوليو/ تموز_أغسطس/ آب:أغسطس/ آب_سبتمبر/ أيلول:سبتمبر/ أيلول_أكتوبر/ تشرين الأول:أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني:نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول:ديسمبر/ كانون الأول'.split("_");
var i;
var tests = 'يناير/ كانون الثاني:يناير/ كانون الثاني_فبراير/ شباط:فبراير/ شباط_مارس/ آذار:مارس/ آذار_أبريل/ نيسان:أبريل/ نيسان_مايو/ أيار:مايو/ أيار_يونيو/ حزيران:يونيو/ حزيران_يوليو/ تموز:يوليو/ تموز_أغسطس/ آب:أغسطس/ آب_سبتمبر/ أيلول:سبتمبر/ أيلول_أكتوبر/ تشرين الأول:أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني:نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول:ديسمبر/ كانون الأول'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -38,3 +37,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1) + ' instead is month ' + moment(input, mmm).month());

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -73,3 +72,3 @@ var a = [

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -113,6 +112,6 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1', '1');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'يناير/ كانون الثاني يناير/ كانون الثاني_فبراير/ شباط فبراير/ شباط_مارس/ آذار مارس/ آذار_أبريل/ نيسان أبريل/ نيسان_مايو/ أيار مايو/ أيار_يونيو/ حزيران يونيو/ حزيران_يوليو/ تموز يوليو/ تموز_أغسطس/ آب أغسطس/ آب_سبتمبر/ أيلول سبتمبر/ أيلول_أكتوبر/ تشرين الأول أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول ديسمبر/ كانون الأول'.split("_");
var i;
var expected = 'يناير/ كانون الثاني يناير/ كانون الثاني_فبراير/ شباط فبراير/ شباط_مارس/ آذار مارس/ آذار_أبريل/ نيسان أبريل/ نيسان_مايو/ أيار مايو/ أيار_يونيو/ حزيران يونيو/ حزيران_يوليو/ تموز يوليو/ تموز_أغسطس/ آب أغسطس/ آب_سبتمبر/ أيلول سبتمبر/ أيلول_أكتوبر/ تشرين الأول أكتوبر/ تشرين الأول_نوفمبر/ تشرين الثاني نوفمبر/ تشرين الثاني_ديسمبر/ كانون الأول ديسمبر/ كانون الأول'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -124,6 +123,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'الأحد الأحد ح_الإثنين الإثنين ن_الثلاثاء الثلاثاء ث_الأربعاء الأربعاء ر_الخميس الخميس خ_الجمعة الجمعة ج_السبت السبت س'.split("_");
var i;
var expected = 'الأحد الأحد ح_الإثنين الإثنين ن_الثلاثاء الثلاثاء ث_الأربعاء الأربعاء ر_الخميس الخميس خ_الجمعة الجمعة ج_السبت السبت س'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -135,39 +134,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -179,3 +179,3 @@ test.equal(moment(30000).from(0), "في ثوان", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -186,10 +186,10 @@ test.equal(moment().fromNow(), "منذ ثوان", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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({s: 30}).fromNow(), "في ثوان", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "في 5 أيام", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -208,8 +208,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -226,5 +224,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i, m;
for (i = 2; i < 7; i++) {

@@ -241,7 +240,8 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });
test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

@@ -262,3 +262,3 @@ test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 1 week");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -275,3 +275,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -288,3 +288,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -302,3 +302,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -316,3 +316,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -330,3 +330,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(5);

@@ -343,3 +343,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -356,3 +356,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -359,0 +359,0 @@

@@ -19,6 +19,5 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'януари янр_февруари фев_март мар_април апр_май май_юни юни_юли юли_август авг_септември сеп_октомври окт_ноември ное_декември дек'.split("_");
var i;
var tests = 'януари янр_февруари фев_март мар_април апр_май май_юни юни_юли юли_август авг_септември сеп_октомври окт_ноември ное_декември дек'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -41,3 +40,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -76,3 +75,3 @@ var a = [

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -116,6 +115,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1-ви', '1-ви');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'януари янр_февруари фев_март мар_април апр_май май_юни юни_юли юли_август авг_септември сеп_октомври окт_ноември ное_декември дек'.split("_");
var i;
var expected = 'януари янр_февруари фев_март мар_април апр_май май_юни юни_юли юли_август авг_септември сеп_октомври окт_ноември ное_декември дек'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -127,6 +125,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'неделя нед нд_понеделник пон пн_вторник вто вт_сряда сря ср_четвъртък чет чт_петък пет пт_събота съб сб'.split("_");
var i;
var expected = 'неделя нед нд_понеделник пон пн_вторник вто вт_сряда сря ср_четвъртък чет чт_петък пет пт_събота съб сб'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -138,39 +135,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -182,3 +179,3 @@ test.equal(moment(30000).from(0), "след няколко секунди", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -189,10 +186,10 @@ test.equal(moment().fromNow(), "преди няколко секунди", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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({s: 30}).fromNow(), "след няколко секунди", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "след 5 дни", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -211,8 +208,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -229,7 +224,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -261,6 +255,6 @@ function makeFormat(d) {

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -281,3 +275,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -294,3 +288,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -307,3 +301,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -321,3 +315,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -335,3 +329,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -349,3 +343,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -363,3 +357,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -377,3 +371,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -380,0 +374,0 @@

@@ -19,6 +19,5 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = "Genver Gen_C'hwevrer C'hwe_Meurzh Meu_Ebrel Ebr_Mae Mae_Mezheven Eve_Gouere Gou_Eost Eos_Gwengolo Gwe_Here Her_Du Du_Kerzu Ker".split("_");
var i;
var tests = "Genver Gen_C'hwevrer C'hwe_Meurzh Meu_Ebrel Ebr_Mae Mae_Mezheven Eve_Gouere Gou_Eost Eos_Gwengolo Gwe_Here Her_Du Du_Kerzu Ker".split("_"), i;
function equalTest(input, mmm, i) {

@@ -39,5 +38,5 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

test.done();
} ,
},
"format" : function(test) {
"format" : function (test) {
test.expect(17);

@@ -72,3 +71,3 @@ moment.lang('br');

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -113,7 +112,6 @@ moment.lang('br');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
moment.lang('br');
var expected = "Genver Gen_C'hwevrer C'hwe_Meurzh Meu_Ebrel Ebr_Mae Mae_Mezheven Eve_Gouere Gou_Eost Eos_Gwengolo Gwe_Here Her_Du Du_Kerzu Ker".split("_");
var i;
var expected = "Genver Gen_C'hwevrer C'hwe_Meurzh Meu_Ebrel Ebr_Mae Mae_Mezheven Eve_Gouere Gou_Eost Eos_Gwengolo Gwe_Here Her_Du Du_Kerzu Ker".split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -125,7 +123,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
moment.lang('br');
var expected = "Sul Sul Su_Lun Lun Lu_Meurzh Meu Me_Merc'her Mer Mer_Yaou Yao Ya_Gwener Gwe Gw_Sadorn Sad Sa".split("_");
var i;
var expected = "Sul Sul Su_Lun Lun Lu_Meurzh Meu Me_Merc'her Mer Mer_Yaou Yao Ya_Gwener Gwe Gw_Sadorn Sad Sa".split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -137,40 +134,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
moment.lang('br');
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "un nebeud segondennoù", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "ur vunutenn", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "ur vunutenn", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 vunutenn", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 munutenn", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "un eur", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "un eur", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 eur", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 eur", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 eur", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "un devezh", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "un devezh", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 zevezh", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "un devezh", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 devezh", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 devezh", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "ur miz", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "ur miz", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "ur miz", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 viz", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 viz", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 miz", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "ur miz", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 miz", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 miz", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "ur bloaz", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "ur bloaz", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 vloaz", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "ur bloaz", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 bloaz", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "un nebeud segondennoù", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "ur vunutenn", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "ur vunutenn", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 vunutenn", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 munutenn", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "un eur", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "un eur", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 eur", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 eur", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 eur", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "un devezh", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "un devezh", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 zevezh", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "un devezh", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 devezh", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 devezh", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "ur miz", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "ur miz", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "ur miz", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 viz", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 viz", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 miz", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "ur miz", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 miz", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 miz", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "ur bloaz", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "ur bloaz", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 vloaz", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "ur bloaz", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 bloaz", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -183,3 +180,3 @@ moment.lang('br');

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -191,11 +188,11 @@ moment.lang('br');

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
moment.lang('br');
test.equal(moment().add({s:30}).fromNow(), "a-benn un nebeud segondennoù", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "a-benn 5 devezh", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "a-benn un nebeud segondennoù", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "a-benn 5 devezh", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -215,9 +212,7 @@ moment.lang('br');

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
moment.lang('br');
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -234,6 +229,7 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
moment.lang('br');
var i, m;
for (i = 2; i < 7; i++) {

@@ -250,7 +246,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
moment.lang('br');
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -257,0 +253,0 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

@@ -19,8 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
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;
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("_"), i;
function equalTest(input, mmm, i) {

@@ -43,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -83,6 +81,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -94,7 +91,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
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;
var expected = "Diumenge Dg. Dg_Dilluns Dl. Dl_Dimarts Dt. Dt_Dimecres Dc. Dc_Dijous Dj. Dj_Divendres Dv. Dv_Dissabte Ds. Ds".split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -106,39 +101,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -150,3 +145,3 @@ test.equal(moment(30000).from(0), "en uns segons", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -157,10 +152,10 @@ test.equal(moment().fromNow(), "fa uns segons", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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.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) {
"calendar day" : function (test) {
test.expect(7);

@@ -180,8 +175,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -198,8 +191,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -216,6 +207,6 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -237,3 +228,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -250,3 +241,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -263,3 +254,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -277,3 +268,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -291,3 +282,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -305,3 +296,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -319,3 +310,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -333,10 +324,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52º', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1º' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1º' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2º' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2º' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1º', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1º', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2º', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2º', "Jan 15 2012 should be week 2");

@@ -343,0 +334,0 @@ test.done();

@@ -19,9 +19,9 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'leden led_únor úno_březen bře_duben dub_květen kvě_červen čvn_červenec čvc_srpen srp_září zář_říjen říj_listopad lis_prosinec pro'.split("_");
var tests = 'leden led_únor úno_březen bře_duben dub_květen kvě_červen čvn_červenec čvc_srpen srp_září zář_říjen říj_listopad lis_prosinec pro'.split("_"), i;
function equalTest(input, mmm, monthIndex) {
test.equal(moment(input, mmm).month(), monthIndex, input + ' should be month ' + (monthIndex + 1));
}
for (var i = 0; i < 12; i++) {
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');

@@ -40,3 +40,3 @@ equalTest(tests[i][0], 'MMM', i);

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -75,3 +75,3 @@ var a = [

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -115,6 +115,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'leden led_únor úno_březen bře_duben dub_květen kvě_červen čvn_červenec čvc_srpen srp_září zář_říjen říj_listopad lis_prosinec pro'.split("_");
var i;
var expected = 'leden led_únor úno_březen bře_duben dub_květen kvě_červen čvn_červenec čvc_srpen srp_září zář_říjen říj_listopad lis_prosinec pro'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -126,6 +125,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'neděle ne ne_pondělí po po_úterý út út_středa st st_čtvrtek čt čt_pátek pá pá_sobota so so'.split("_");
var i;
var expected = 'neděle ne ne_pondělí po po_úterý út út_středa st st_čtvrtek čt čt_pátek pá pá_sobota so so'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -137,39 +135,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "pár vteřin", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minuta", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minuta", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuty", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minut", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "hodina", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "hodina", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 hodiny", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 hodin", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 hodin", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "den", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "den", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dny", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "den", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dní", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dní", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "měsíc", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "měsíc", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "měsíc", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 měsíce", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 měsíce", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 měsíce", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "měsíc", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 měsíců", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 měsíců", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "rok", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "rok", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 roky", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "rok", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 let", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "pár vteřin", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "minuta", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "minuta", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 minuty", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 minut", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "hodina", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "hodina", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 hodiny", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 hodin", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 hodin", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "den", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "den", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 dny", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "den", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 dní", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 dní", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "měsíc", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "měsíc", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "měsíc", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 měsíce", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 měsíce", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 měsíce", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "měsíc", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 měsíců", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 měsíců", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "rok", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "rok", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 roky", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "rok", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 let", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -181,3 +179,3 @@ test.equal(moment(30000).from(0), "za pár vteřin", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -188,45 +186,45 @@ test.equal(moment().fromNow(), "před pár vteřinami", "now from now should display as in the past");

"fromNow (future)" : function(test) {
"fromNow (future)" : function (test) {
test.expect(16);
test.equal(moment().add({s:30}).fromNow(), "za pár vteřin", "in a few seconds");
test.equal(moment().add({m:1}).fromNow(), "za minutu", "in a minute");
test.equal(moment().add({m:3}).fromNow(), "za 3 minuty", "in 3 minutes");
test.equal(moment().add({m:10}).fromNow(), "za 10 minut", "in 10 minutes");
test.equal(moment().add({h:1}).fromNow(), "za hodinu", "in an hour");
test.equal(moment().add({h:3}).fromNow(), "za 3 hodiny", "in 3 hours");
test.equal(moment().add({h:10}).fromNow(), "za 10 hodin", "in 10 hours");
test.equal(moment().add({d:1}).fromNow(), "za den", "in a day");
test.equal(moment().add({d:3}).fromNow(), "za 3 dny", "in 3 days");
test.equal(moment().add({d:10}).fromNow(), "za 10 dní", "in 10 days");
test.equal(moment().add({M:1}).fromNow(), "za měsíc", "in a month");
test.equal(moment().add({M:3}).fromNow(), "za 3 měsíce", "in 3 months");
test.equal(moment().add({M:10}).fromNow(), "za 10 měsíců", "in 10 months");
test.equal(moment().add({y:1}).fromNow(), "za rok", "in a year");
test.equal(moment().add({y:3}).fromNow(), "za 3 roky", "in 3 years");
test.equal(moment().add({y:10}).fromNow(), "za 10 let", "in 10 years");
test.equal(moment().add({s: 30}).fromNow(), "za pár vteřin", "in a few seconds");
test.equal(moment().add({m: 1}).fromNow(), "za minutu", "in a minute");
test.equal(moment().add({m: 3}).fromNow(), "za 3 minuty", "in 3 minutes");
test.equal(moment().add({m: 10}).fromNow(), "za 10 minut", "in 10 minutes");
test.equal(moment().add({h: 1}).fromNow(), "za hodinu", "in an hour");
test.equal(moment().add({h: 3}).fromNow(), "za 3 hodiny", "in 3 hours");
test.equal(moment().add({h: 10}).fromNow(), "za 10 hodin", "in 10 hours");
test.equal(moment().add({d: 1}).fromNow(), "za den", "in a day");
test.equal(moment().add({d: 3}).fromNow(), "za 3 dny", "in 3 days");
test.equal(moment().add({d: 10}).fromNow(), "za 10 dní", "in 10 days");
test.equal(moment().add({M: 1}).fromNow(), "za měsíc", "in a month");
test.equal(moment().add({M: 3}).fromNow(), "za 3 měsíce", "in 3 months");
test.equal(moment().add({M: 10}).fromNow(), "za 10 měsíců", "in 10 months");
test.equal(moment().add({y: 1}).fromNow(), "za rok", "in a year");
test.equal(moment().add({y: 3}).fromNow(), "za 3 roky", "in 3 years");
test.equal(moment().add({y: 10}).fromNow(), "za 10 let", "in 10 years");
test.done();
},
"fromNow (past)" : function(test) {
"fromNow (past)" : function (test) {
test.expect(16);
test.equal(moment().subtract({s:30}).fromNow(), "před pár vteřinami", "a few seconds ago");
test.equal(moment().subtract({m:1}).fromNow(), "před minutou", "a minute ago");
test.equal(moment().subtract({m:3}).fromNow(), "před 3 minutami", "3 minutes ago");
test.equal(moment().subtract({m:10}).fromNow(), "před 10 minutami", "10 minutes ago");
test.equal(moment().subtract({h:1}).fromNow(), "před hodinou", "an hour ago");
test.equal(moment().subtract({h:3}).fromNow(), "před 3 hodinami", "3 hours ago");
test.equal(moment().subtract({h:10}).fromNow(), "před 10 hodinami", "10 hours ago");
test.equal(moment().subtract({d:1}).fromNow(), "před dnem", "a day ago");
test.equal(moment().subtract({d:3}).fromNow(), "před 3 dny", "3 days ago");
test.equal(moment().subtract({d:10}).fromNow(), "před 10 dny", "10 days ago");
test.equal(moment().subtract({M:1}).fromNow(), "před měsícem", "a month ago");
test.equal(moment().subtract({M:3}).fromNow(), "před 3 měsíci", "3 months ago");
test.equal(moment().subtract({M:10}).fromNow(), "před 10 měsíci", "10 months ago");
test.equal(moment().subtract({y:1}).fromNow(), "před rokem", "a year ago");
test.equal(moment().subtract({y:3}).fromNow(), "před 3 lety", "3 years ago");
test.equal(moment().subtract({y:10}).fromNow(), "před 10 lety", "10 years ago");
test.equal(moment().subtract({s: 30}).fromNow(), "před pár vteřinami", "a few seconds ago");
test.equal(moment().subtract({m: 1}).fromNow(), "před minutou", "a minute ago");
test.equal(moment().subtract({m: 3}).fromNow(), "před 3 minutami", "3 minutes ago");
test.equal(moment().subtract({m: 10}).fromNow(), "před 10 minutami", "10 minutes ago");
test.equal(moment().subtract({h: 1}).fromNow(), "před hodinou", "an hour ago");
test.equal(moment().subtract({h: 3}).fromNow(), "před 3 hodinami", "3 hours ago");
test.equal(moment().subtract({h: 10}).fromNow(), "před 10 hodinami", "10 hours ago");
test.equal(moment().subtract({d: 1}).fromNow(), "před dnem", "a day ago");
test.equal(moment().subtract({d: 3}).fromNow(), "před 3 dny", "3 days ago");
test.equal(moment().subtract({d: 10}).fromNow(), "před 10 dny", "10 days ago");
test.equal(moment().subtract({M: 1}).fromNow(), "před měsícem", "a month ago");
test.equal(moment().subtract({M: 3}).fromNow(), "před 3 měsíci", "3 months ago");
test.equal(moment().subtract({M: 10}).fromNow(), "před 10 měsíci", "10 months ago");
test.equal(moment().subtract({y: 1}).fromNow(), "před rokem", "a year ago");
test.equal(moment().subtract({y: 3}).fromNow(), "před 3 lety", "3 years ago");
test.equal(moment().subtract({y: 10}).fromNow(), "před 10 lety", "10 years ago");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -245,16 +243,31 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
for (var i = 2; i < 7; i++) {
var m = moment().add({ d: i });
var nextDay = '';
var i, m, nextDay;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
nextDay = '';
switch (m.day()) {
case 0: nextDay = 'v neděli'; break;
case 1: nextDay = 'v pondělí'; break;
case 2: nextDay = 'v úterý'; break;
case 3: nextDay = 've středu'; break;
case 4: nextDay = 've čtvrtek'; break;
case 5: nextDay = 'v pátek'; break;
case 6: nextDay = 'v sobotu'; break;
case 0:
nextDay = 'v neděli';
break;
case 1:
nextDay = 'v pondělí';
break;
case 2:
nextDay = 'v úterý';
break;
case 3:
nextDay = 've středu';
break;
case 4:
nextDay = 've čtvrtek';
break;
case 5:
nextDay = 'v pátek';
break;
case 6:
nextDay = 'v sobotu';
break;
}

@@ -270,16 +283,31 @@ test.equal(m.calendar(), m.format('[' + nextDay + '] [v] LT'), "Today + " + i + " days current time");

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
for (var i = 2; i < 7; i++) {
var m = moment().subtract({ d: i });
var lastDay = '';
var i, m, lastDay;
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
lastDay = '';
switch (m.day()) {
case 0: lastDay = 'minulou neděli'; break;
case 1: lastDay = 'minulé pondělí'; break;
case 2: lastDay = 'minulé úterý'; break;
case 3: lastDay = 'minulou středu'; break;
case 4: lastDay = 'minulý čtvrtek'; break;
case 5: lastDay = 'minulý pátek'; break;
case 6: lastDay = 'minulou sobotu'; break;
case 0:
lastDay = 'minulou neděli';
break;
case 1:
lastDay = 'minulé pondělí';
break;
case 2:
lastDay = 'minulé úterý';
break;
case 3:
lastDay = 'minulou středu';
break;
case 4:
lastDay = 'minulý čtvrtek';
break;
case 5:
lastDay = 'minulý pátek';
break;
case 6:
lastDay = 'minulou sobotu';
break;
}

@@ -295,6 +323,6 @@ test.equal(m.calendar(), m.format('[' + lastDay + '] [v] LT'), "Today - " + i + " days current time");

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -312,3 +340,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"humanize duration" : function(test) {
"humanize duration" : function (test) {
test.expect(4);

@@ -325,3 +353,3 @@ test.equal(moment.duration(1, "minutes").humanize(), "minuta", "a minute (future)");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -338,3 +366,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -351,3 +379,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -365,3 +393,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -379,3 +407,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -393,3 +421,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -407,3 +435,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -421,10 +449,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52.', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");

@@ -431,0 +459,0 @@ test.done();

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'кăрлач кăр_нарăс нар_пуш пуш_ака ака_май май_çĕртме çĕр_утă утă_çурла çур_авăн ав_юпа юпа_чӳк чӳк_раштав раш'.split("_");
var i;
var tests = 'кăрлач кăр_нарăс нар_пуш пуш_ака ака_май май_çĕртме çĕр_утă утă_çурла çур_авăн ав_юпа юпа_чӳк чӳк_раштав раш'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,3 +77,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -119,7 +118,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'кăрлач кăр_нарăс нар_пуш пуш_ака ака_май май_çĕртме çĕр_утă утă_çурла çур_авăн ав_юпа юпа_чӳк чӳк_раштав раш'.split("_");
var i;
var expected = 'кăрлач кăр_нарăс нар_пуш пуш_ака ака_май май_çĕртме çĕр_утă утă_çурла çур_авăн ав_юпа юпа_чӳк чӳк_раштав раш'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -131,7 +129,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'вырсарникун выр вр_тунтикун тун тн_ытларикун ытл ыт_юнкун юн юн_кĕçнерникун кĕç кç_эрнекун эрн эр_шăматкун шăм шм'.split("_");
var i;
var expected = 'вырсарникун выр вр_тунтикун тун тн_ытларикун ытл ыт_юнкун юн юн_кĕçнерникун кĕç кç_эрнекун эрн эр_шăматкун шăм шм'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -143,40 +140,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -188,3 +185,3 @@ test.equal(moment(30000).from(0), "пĕр-ик çеккунтран", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -195,12 +192,12 @@ test.equal(moment().fromNow(), "пĕр-ик çеккунт каялла", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(4);
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.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) {
"calendar day" : function (test) {
test.expect(6);

@@ -217,7 +214,6 @@ var a = moment().hours(2).minutes(0).seconds(0);

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -235,7 +231,6 @@ for (i = 2; i < 7; i++) {

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -253,6 +248,6 @@ for (i = 2; i < 7; i++) {

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -273,3 +268,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -286,3 +281,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -299,3 +294,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -313,3 +308,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -327,3 +322,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -341,3 +336,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -355,3 +350,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -369,3 +364,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -372,0 +367,0 @@

@@ -19,6 +19,5 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
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;
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("_"), i;
function equalTest(input, mmm, i) {

@@ -41,11 +40,11 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);
var a = [
['dddd [den] Do MMMM YYYY, h:mm:ss a', 'Søndag den 14. Februar 2010, 3:25:50 pm'],
['ddd hA', 'Søn 3PM'],
['M Mo MM MMMM MMM', '2 2. 02 Februar Feb'],
['dddd [den] Do MMMM YYYY, h:mm:ss a', 'søndag den 14. februar 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ø'],
['d do dddd ddd dd', '0 0. søndag søn sø'],
['DDD DDDo DDDD', '45 45. 045'],

@@ -60,9 +59,9 @@ ['w wo ww', '6 6. 06'],

['L', '14/02/2010'],
['LL', '14 Februar 2010'],
['LLL', '14 Februar 2010 15:25'],
['LLLL', 'Søndag 14. Februar, 2010 15:25'],
['LL', '14 februar 2010'],
['LLL', '14 februar 2010 15:25'],
['LLLL', 'søndag 14. februar, 2010 15:25'],
['l', '14/2/2010'],
['ll', '14 Feb 2010'],
['lll', '14 Feb 2010 15:25'],
['llll', 'Søn 14. Feb, 2010 15:25']
['ll', '14 feb 2010'],
['lll', '14 feb 2010 15:25'],
['llll', 'søn 14. feb, 2010 15:25']
],

@@ -77,3 +76,3 @@ b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -117,6 +116,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -128,6 +126,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -139,39 +136,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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), "et minut", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "et 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), "en time", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "en 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), "en dag", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "en 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), "en 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), "en måned", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "en måned", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "en måned", "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), "en måned", "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), "et år", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "et å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), "et å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({s: 44}), true), "få sekunder", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "et minut", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "et 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), "en time", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "en 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), "en dag", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "en 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), "en 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), "en måned", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "en måned", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "en måned", "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), "en måned", "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), "et år", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "et å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), "et å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) {
"suffix" : function (test) {
test.expect(2);

@@ -183,3 +180,3 @@ test.equal(moment(30000).from(0), "om få sekunder", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -190,6 +187,6 @@ test.equal(moment().fromNow(), "få sekunder siden", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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.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();

@@ -201,3 +198,3 @@ },

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -214,3 +211,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -227,3 +224,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -241,3 +238,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -255,3 +252,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -269,3 +266,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -283,3 +280,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -297,10 +294,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52.', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");

@@ -307,0 +304,0 @@ test.done();

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
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;
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("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,3 +77,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -119,7 +118,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -131,7 +129,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
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;
var expected = 'Sonntag So. So_Montag Mo. Mo_Dienstag Di. Di_Mittwoch Mi. Mi_Donnerstag Do. Do_Freitag Fr. Fr_Samstag Sa. Sa'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -143,39 +140,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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), "eine Minute", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "eine 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), "eine Stunde", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "eine 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), "ein Tag", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "ein Tag", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 Tage", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "ein Tag", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 Tage", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 Tage", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "ein Monat", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "ein Monat", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "ein Monat", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 Monate", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 Monate", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 Monate", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "ein Monat", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 Monate", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 Monate", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "ein Jahr", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "ein Jahr", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 Jahre", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "ein Jahr", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 Jahre", "5 years = 5 years");
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), "eine Minute", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "eine 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), "eine Stunde", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "eine 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), "ein Tag", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "ein Tag", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 Tage", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "ein Tag", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 Tage", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 Tage", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "ein Monat", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "ein Monat", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "ein Monat", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 Monate", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 Monate", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 Monate", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "ein Monat", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 Monate", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 Monate", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "ein Jahr", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "ein Jahr", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 Jahre", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "ein Jahr", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 Jahre", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -187,10 +184,10 @@ test.equal(moment(30000).from(0), "in ein paar Sekunden", "prefix");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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.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) {
"calendar day" : function (test) {
test.expect(6);

@@ -209,8 +206,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -227,5 +222,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i, m;
for (i = 2; i < 7; i++) {

@@ -242,7 +238,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -264,3 +260,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -277,3 +273,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -290,3 +286,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -304,3 +300,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -318,3 +314,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -332,3 +328,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -346,3 +342,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -360,10 +356,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52.', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");

@@ -370,0 +366,0 @@ test.done();

@@ -19,3 +19,3 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);

@@ -45,3 +45,3 @@

"format" : function(test) {
"format" : function (test) {
test.expect(24);

@@ -85,3 +85,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -126,3 +126,3 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);

@@ -139,3 +139,3 @@

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);

@@ -153,3 +153,3 @@

"from" : function(test) {
"from" : function (test) {
test.expect(30);

@@ -159,32 +159,32 @@

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.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");

@@ -194,3 +194,3 @@ test.done();

"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -204,3 +204,3 @@

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -213,7 +213,7 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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({s: 30}).fromNow(), "σε δευτερόλεπτα", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "σε 5 μέρες", "in 5 days");

@@ -223,3 +223,3 @@ test.done();

"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -239,10 +239,9 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i, m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [' + (m.hours()%12 === 1 ? 'στη' : 'στις') + '] LT'), "Today + " + i + " days current time");
test.equal(m.calendar(), m.format('dddd [' + (m.hours() % 12 === 1 ? 'στη' : 'στις') + '] LT'), "Today + " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);

@@ -256,10 +255,9 @@ test.equal(m.calendar(), m.format('dddd [στις] LT'), "Today + " + i + " days beginning of day");

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i, m;
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[την προηγούμενη] dddd [' + (m.hours()%12 === 1 ? 'στη' : 'στις') + '] LT'), "Today - " + i + " days current time");
test.equal(m.calendar(), m.format('[την προηγούμενη] dddd [' + (m.hours() % 12 === 1 ? 'στη' : 'στις') + '] LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);

@@ -273,3 +271,3 @@ test.equal(m.calendar(), m.format('[την προηγούμενη] dddd [στις] LT'), "Today - " + i + " days beginning of day");

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);

@@ -295,3 +293,3 @@

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -308,3 +306,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(6);

@@ -322,3 +320,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -336,3 +334,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -350,3 +348,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -364,3 +362,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(7);

@@ -379,3 +377,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -393,10 +391,10 @@

"weeks year starting sunday format" : function(test) {
"weeks year starting sunday format" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52η', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 7]).format('w ww wo'), '1 01 1η', "Jan 7 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1η', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2η', "Jan 14 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2η', "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 7]).format('w ww wo'), '1 01 1η', "Jan 7 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1η', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 14]).format('w ww wo'), '2 02 2η', "Jan 14 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2η', "Jan 15 2012 should be week 2");

@@ -403,0 +401,0 @@ test.done();

@@ -18,3 +18,3 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);

@@ -44,3 +44,3 @@

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -82,3 +82,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -124,3 +124,3 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);

@@ -138,3 +138,3 @@

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);

@@ -152,36 +152,36 @@

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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");

@@ -191,3 +191,3 @@ test.done();

"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -201,3 +201,3 @@

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -210,7 +210,7 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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.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");

@@ -220,3 +220,3 @@ test.done();

"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -235,3 +235,3 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);

@@ -252,3 +252,3 @@

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);

@@ -269,3 +269,3 @@

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);

@@ -291,3 +291,3 @@

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -304,3 +304,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(6);

@@ -318,6 +318,6 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);
test.equal(moment([2007, 11, 30]).week(), 1, "Dec 30 2007 should be week 1");
test.equal(moment([2007, 11, 29]).week(), 52, "Dec 29 2007 should be week 52");
test.equal(moment([2008, 0, 1]).week(), 1, "Jan 1 2008 should be week 1");

@@ -332,3 +332,3 @@ test.equal(moment([2008, 0, 5]).week(), 1, "Jan 5 2008 should be week 1");

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -346,3 +346,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -360,3 +360,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -374,3 +374,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -387,3 +387,3 @@

"weeks year starting sunday format" : function(test) {
"weeks year starting sunday format" : function (test) {
test.expect(5);

@@ -390,0 +390,0 @@

@@ -19,6 +19,5 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
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;
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("_"), i;
function equalTest(input, mmm, i) {

@@ -41,3 +40,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -76,3 +75,3 @@ var a = [

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -116,6 +115,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1st', '1st');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -127,6 +125,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
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;
var expected = 'Sunday Sun Su_Monday Mon Mo_Tuesday Tue Tu_Wednesday Wed We_Thursday Thu Th_Friday Fri Fr_Saturday Sat Sa'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -138,39 +135,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -182,3 +179,3 @@ test.equal(moment(30000).from(0), "in a few seconds", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -189,10 +186,10 @@ test.equal(moment().fromNow(), "a few seconds ago", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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.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) {
"calendar day" : function (test) {
test.expect(6);

@@ -211,8 +208,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -229,7 +224,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -247,7 +241,7 @@ for (i = 2; i < 7; i++) {

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -269,3 +263,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -282,3 +276,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -295,3 +289,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -309,3 +303,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -323,3 +317,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -337,3 +331,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -351,3 +345,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -365,10 +359,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52nd', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1st' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1st' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2nd' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2nd' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1st', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1st', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2nd', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2nd', "Jan 15 2012 should be week 2");

@@ -375,0 +369,0 @@ test.done();

@@ -19,3 +19,3 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);

@@ -45,3 +45,3 @@

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -83,3 +83,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -124,3 +124,3 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);

@@ -137,3 +137,3 @@

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);

@@ -151,3 +151,3 @@

"from" : function(test) {
"from" : function (test) {
test.expect(30);

@@ -157,32 +157,32 @@

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.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");

@@ -192,3 +192,3 @@ test.done();

"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -202,3 +202,3 @@

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -211,7 +211,7 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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.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");

@@ -221,3 +221,3 @@ test.done();

"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -237,3 +237,3 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);

@@ -254,3 +254,3 @@

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);

@@ -271,3 +271,3 @@

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);

@@ -293,3 +293,3 @@

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -306,3 +306,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(6);

@@ -320,6 +320,6 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);
test.equal(moment([2007, 11, 30]).week(), 1, "Dec 30 2007 should be week 1");
test.equal(moment([2007, 11, 29]).week(), 52, "Dec 29 2007 should be week 52");
test.equal(moment([2008, 0, 1]).week(), 1, "Jan 1 2008 should be week 1");

@@ -334,3 +334,3 @@ test.equal(moment([2008, 0, 5]).week(), 1, "Jan 5 2008 should be week 1");

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -348,3 +348,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -362,3 +362,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -376,3 +376,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -389,3 +389,3 @@

"weeks year starting sunday format" : function(test) {
"weeks year starting sunday format" : function (test) {
test.expect(5);

@@ -392,0 +392,0 @@

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'januaro jan_februaro feb_marto mar_aprilo apr_majo maj_junio jun_julio jul_aŭgusto aŭg_septembro sep_oktobro okt_novembro nov_decembro dec'.split("_");
var i;
var tests = 'januaro jan_februaro feb_marto mar_aprilo apr_majo maj_junio jun_julio jul_aŭgusto aŭg_septembro sep_oktobro okt_novembro nov_decembro dec'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,3 +77,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -119,7 +118,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'januaro jan_februaro feb_marto mar_aprilo apr_majo maj_junio jun_julio jul_aŭgusto aŭg_septembro sep_oktobro okt_novembro nov_decembro dec'.split("_");
var i;
var expected = 'januaro jan_februaro feb_marto mar_aprilo apr_majo maj_junio jun_julio jul_aŭgusto aŭg_septembro sep_oktobro okt_novembro nov_decembro dec'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -131,7 +129,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'Dimanĉo Dim Di_Lundo Lun Lu_Mardo Mard Ma_Merkredo Merk Me_Ĵaŭdo Ĵaŭ Ĵa_Vendredo Ven Ve_Sabato Sab Sa'.split("_");
var i;
var expected = 'Dimanĉo Dim Di_Lundo Lun Lu_Mardo Mard Ma_Merkredo Merk Me_Ĵaŭdo Ĵaŭ Ĵa_Vendredo Ven Ve_Sabato Sab Sa'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -143,40 +140,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "sekundoj", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minuto", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minuto", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutoj", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutoj", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "horo", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "horo", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 horoj", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 horoj", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 horoj", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "tago", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "tago", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 tagoj", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "tago", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 tagoj", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 tagoj", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "monato", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "monato", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "monato", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 monatoj", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 monatoj", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 monatoj", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "monato", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 monatoj", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 monatoj", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "jaro", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "jaro", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 jaroj", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "jaro", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 jaroj", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "sekundoj", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "minuto", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "minuto", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 minutoj", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 minutoj", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "horo", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "horo", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 horoj", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 horoj", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 horoj", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "tago", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "tago", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 tagoj", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "tago", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 tagoj", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 tagoj", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "monato", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "monato", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "monato", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 monatoj", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 monatoj", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 monatoj", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "monato", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 monatoj", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 monatoj", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "jaro", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "jaro", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 jaroj", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "jaro", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 jaroj", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -188,3 +185,3 @@ test.equal(moment(30000).from(0), "je sekundoj", "je prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -195,10 +192,10 @@ test.equal(moment().fromNow(), "antaŭ sekundoj", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "je sekundoj", "je sekundoj");
test.equal(moment().add({d:5}).fromNow(), "je 5 tagoj", "je 5 tagoj");
test.equal(moment().add({s: 30}).fromNow(), "je sekundoj", "je sekundoj");
test.equal(moment().add({d: 5}).fromNow(), "je 5 tagoj", "je 5 tagoj");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -217,7 +214,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -235,7 +231,6 @@ for (i = 2; i < 7; i++) {

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -253,7 +248,7 @@ for (i = 2; i < 7; i++) {

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -275,3 +270,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -288,3 +283,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -301,3 +296,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -315,3 +310,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -329,3 +324,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -343,3 +338,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -357,3 +352,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -371,3 +366,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -374,0 +369,0 @@

@@ -19,6 +19,5 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
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;
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("_"), i;
function equalTest(input, mmm, i) {

@@ -41,3 +40,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -76,3 +75,3 @@ var a = [

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -116,6 +115,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -127,6 +125,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -138,39 +135,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -182,3 +179,3 @@ test.equal(moment(30000).from(0), "en unos segundos", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -189,10 +186,10 @@ test.equal(moment().fromNow(), "hace unos segundos", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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.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) {
"calendar day" : function (test) {
test.expect(7);

@@ -212,7 +209,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -230,7 +226,6 @@ for (i = 2; i < 7; i++) {

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -248,7 +243,7 @@ for (i = 2; i < 7; i++) {

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -270,3 +265,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -283,3 +278,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -296,3 +291,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -310,3 +305,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -324,3 +319,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -338,3 +333,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -352,3 +347,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -366,10 +361,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52º', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1º' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1º' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2º' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2º' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1º', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1º', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2º', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2º', "Jan 15 2012 should be week 2");

@@ -376,0 +371,0 @@ test.done();

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
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;
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("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' peaks olema kuu ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,3 +77,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -119,7 +118,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -131,7 +129,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -143,40 +140,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -189,3 +186,3 @@

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -197,11 +194,11 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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.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) {
"calendar day" : function (test) {
test.expect(6);

@@ -220,8 +217,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -238,8 +233,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -256,7 +249,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -278,3 +271,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 nädal tagasi");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -291,3 +284,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -304,3 +297,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -318,3 +311,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -332,3 +325,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -346,3 +339,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -360,3 +353,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -374,10 +367,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52.', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");

@@ -384,0 +377,0 @@ test.done();

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
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;
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("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,3 +77,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -119,7 +118,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -131,7 +129,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
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;
var expected = 'igandea ig. ig_astelehena al. al_asteartea ar. ar_asteazkena az. az_osteguna og. og_ostirala ol. ol_larunbata lr. lr'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -143,40 +140,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -188,3 +185,3 @@ test.equal(moment(30000).from(0), "segundo batzuk barru", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -195,10 +192,10 @@ test.equal(moment().fromNow(), "duela segundo batzuk", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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.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) {
"calendar day" : function (test) {
test.expect(6);

@@ -217,8 +214,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -235,8 +230,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -253,7 +246,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -274,3 +267,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -287,3 +280,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -300,3 +293,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -314,3 +307,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -328,3 +321,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -342,3 +335,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -356,3 +349,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -370,3 +363,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -373,0 +366,0 @@

@@ -16,6 +16,5 @@ // moment.js Persian (fa) tests

"parse" : function(test) {
"parse" : function (test) {
test.expect(24);
var tests = 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split("_");
var i;
var tests = 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -31,11 +30,11 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1) + ' instead is month ' + moment(input, mmm).month());

"format" : function(test) {
"format" : function (test) {
test.expect(22);
var a = [
['dddd, MMMM Do YYYY, h:mm:ss a', 'یک‌شنبه، فوریه ۱۴م ۲۰۱۰، ۳:۲۵:۵۰ بعد از ظهر'],
['ddd, hA', 'یک‌شنبه، ۳بعد از ظهر'],
['dddd, MMMM Do YYYY, h:mm:ss a', 'یک\u200cشنبه، فوریه ۱۴م ۲۰۱۰، ۳:۲۵:۵۰ بعد از ظهر'],
['ddd, hA', 'یک\u200cشنبه، ۳بعد از ظهر'],
['M Mo MM MMMM MMM', '۲ ۲م ۰۲ فوریه فوریه'],
['YYYY YY', '۲۰۱۰ ۱۰'],
['D Do DD', '۱۴ ۱۴م ۱۴'],
['d do dddd ddd dd', '۰ ۰م یک‌شنبه یک‌شنبه ی'],
['d do dddd ddd dd', '۰ ۰م یک\u200cشنبه یک\u200cشنبه ی'],
['DDD DDDo DDDD', '۴۵ ۴۵م ۰۴۵'],

@@ -52,7 +51,7 @@ ['w wo ww', '۸ ۸م ۰۸'],

['LLL', '۱۴ فوریه ۲۰۱۰ ۱۵:۲۵'],
['LLLL', 'یک‌شنبه، ۱۴ فوریه ۲۰۱۰ ۱۵:۲۵'],
['LLLL', 'یک\u200cشنبه، ۱۴ فوریه ۲۰۱۰ ۱۵:۲۵'],
['l', '۱۴/۲/۲۰۱۰'],
['ll', '۱۴ فوریه ۲۰۱۰'],
['lll', '۱۴ فوریه ۲۰۱۰ ۱۵:۲۵'],
['llll', 'یک‌شنبه، ۱۴ فوریه ۲۰۱۰ ۱۵:۲۵']
['llll', 'یک\u200cشنبه، ۱۴ فوریه ۲۰۱۰ ۱۵:۲۵']
],

@@ -67,3 +66,3 @@ b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -107,6 +106,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '۱م', '1');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'ژانویه ژانویه_فوریه فوریه_مارس مارس_آوریل آوریل_مه مه_ژوئن ژوئن_ژوئیه ژوئیه_اوت اوت_سپتامبر سپتامبر_اکتبر اکتبر_نوامبر نوامبر_دسامبر دسامبر'.split("_");
var i;
var expected = 'ژانویه ژانویه_فوریه فوریه_مارس مارس_آوریل آوریل_مه مه_ژوئن ژوئن_ژوئیه ژوئیه_اوت اوت_سپتامبر سپتامبر_اکتبر اکتبر_نوامبر نوامبر_دسامبر دسامبر'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -118,6 +116,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'یک‌شنبه یک‌شنبه ی_دوشنبه دوشنبه د_سه‌شنبه سه‌شنبه س_چهارشنبه چهارشنبه چ_پنج‌شنبه پنج‌شنبه پ_جمعه جمعه ج_شنبه شنبه ش'.split("_");
var i;
var expected = 'یک\u200cشنبه یک\u200cشنبه ی_دوشنبه دوشنبه د_سه\u200cشنبه سه\u200cشنبه س_چهارشنبه چهارشنبه چ_پنج\u200cشنبه پنج\u200cشنبه پ_جمعه جمعه ج_شنبه شنبه ش'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -129,39 +126,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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), "۲ دقیقه", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "۴۴ دقیقه", "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), "۲ ساعت", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "۵ ساعت", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "۲۱ ساعت", "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), "۲ روز", "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 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "۲۵ روز", "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), "۲ ماه", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "۲ ماه", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "۳ ماه", "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 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "۱۱ ماه", "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), "۲ سال", "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 years = 5 years");
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), "۲ دقیقه", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "۴۴ دقیقه", "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), "۲ ساعت", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "۵ ساعت", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "۲۱ ساعت", "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), "۲ روز", "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 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "۲۵ روز", "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), "۲ ماه", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "۲ ماه", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "۳ ماه", "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 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "۱۱ ماه", "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), "۲ سال", "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 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -173,3 +170,3 @@ test.equal(moment(30000).from(0), "در چندین ثانیه", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -180,10 +177,10 @@ test.equal(moment().fromNow(), "چندین ثانیه پیش", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "در چندین ثانیه", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "در ۵ روز", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "در چندین ثانیه", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "در ۵ روز", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -202,8 +199,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -220,5 +215,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i, m;
for (i = 2; i < 7; i++) {

@@ -235,6 +231,6 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -256,3 +252,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -269,3 +265,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -282,3 +278,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -296,3 +292,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -310,3 +306,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -324,3 +320,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(5);

@@ -337,3 +333,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -350,3 +346,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -353,0 +349,0 @@

@@ -19,6 +19,5 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'tammikuu tammi_helmikuu helmi_maaliskuu maalis_huhtikuu huhti_toukokuu touko_kesäkuu kesä_heinäkuu heinä_elokuu elo_syyskuu syys_lokakuu loka_marraskuu marras_joulukuu joulu'.split("_");
var i;
var tests = 'tammikuu tammi_helmikuu helmi_maaliskuu maalis_huhtikuu huhti_toukokuu touko_kesäkuu kesä_heinäkuu heinä_elokuu elo_syyskuu syys_lokakuu loka_marraskuu marras_joulukuu joulu'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -41,3 +40,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -76,3 +75,3 @@ var a = [

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -116,6 +115,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1st');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'tammikuu tammi_helmikuu helmi_maaliskuu maalis_huhtikuu huhti_toukokuu touko_kesäkuu kesä_heinäkuu heinä_elokuu elo_syyskuu syys_lokakuu loka_marraskuu marras_joulukuu joulu'.split("_");
var i;
var expected = 'tammikuu tammi_helmikuu helmi_maaliskuu maalis_huhtikuu huhti_toukokuu touko_kesäkuu kesä_heinäkuu heinä_elokuu elo_syyskuu syys_lokakuu loka_marraskuu marras_joulukuu joulu'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -127,6 +125,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
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;
var expected = 'sunnuntai su su_maanantai ma ma_tiistai ti ti_keskiviikko ke ke_torstai to to_perjantai pe pe_lauantai la la'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -138,39 +135,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -182,3 +179,3 @@ test.equal(moment(30000).from(0), "muutaman sekunnin päästä", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -189,10 +186,10 @@ test.equal(moment().fromNow(), "muutama sekunti sitten", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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.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) {
"calendar day" : function (test) {
test.expect(6);

@@ -211,7 +208,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -229,10 +225,8 @@ for (i = 2; i < 7; i++) {

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
for (var i = 2; i < 7; i++) {
var m = moment().subtract({ d: i });
var i, m;
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[viime] dddd[na] [klo] LT'), "today - " + i + " days current time");

@@ -247,7 +241,7 @@ m.hours(0).minutes(0).seconds(0).milliseconds(0);

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -268,3 +262,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "yksi viikko sitten");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -281,3 +275,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -294,3 +288,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -308,3 +302,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -322,3 +316,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -336,3 +330,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -350,3 +344,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -364,10 +358,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52.', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");

@@ -374,0 +368,0 @@ test.done();

@@ -18,3 +18,3 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);

@@ -44,3 +44,3 @@

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -82,3 +82,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -124,3 +124,3 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);

@@ -138,3 +138,3 @@

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);

@@ -152,3 +152,3 @@

"from" : function(test) {
"from" : function (test) {
test.expect(30);

@@ -158,32 +158,32 @@

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), "un an", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un an", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 ans", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un an", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 ans", "5 years = 5 years");
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), "un an", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "un an", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 ans", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "un an", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 ans", "5 years = 5 years");

@@ -193,3 +193,3 @@ test.done();

"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -203,7 +203,7 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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.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");

@@ -213,3 +213,3 @@ test.done();

"same day" : function(test) {
"same day" : function (test) {
test.expect(6);

@@ -228,7 +228,6 @@

"same next week" : function(test) {
"same next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -246,3 +245,3 @@ for (i = 2; i < 7; i++) {

"same last week" : function(test) {
"same last week" : function (test) {
test.expect(15);

@@ -263,7 +262,7 @@

"same all else" : function(test) {
"same all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -285,3 +284,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -298,3 +297,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(6);

@@ -312,6 +311,6 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);
test.equal(moment([2007, 11, 30]).week(), 1, "Dec 30 2007 should be week 1");
test.equal(moment([2007, 11, 29]).week(), 52, "Dec 29 2007 should be week 52");
test.equal(moment([2008, 0, 1]).week(), 1, "Jan 1 2008 should be week 1");

@@ -326,3 +325,3 @@ test.equal(moment([2008, 0, 5]).week(), 1, "Jan 5 2008 should be week 1");

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -340,3 +339,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -354,3 +353,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -368,3 +367,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -381,3 +380,3 @@

"weeks year starting sunday format" : function(test) {
"weeks year starting sunday format" : function (test) {
test.expect(5);

@@ -384,0 +383,0 @@

@@ -19,7 +19,7 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
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;
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("_"),
i;
function equalTest(input, mmm, i) {

@@ -42,3 +42,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,3 +78,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -119,7 +119,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -131,7 +130,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
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;
var expected = 'dimanche dim. Di_lundi lun. Lu_mardi mar. Ma_mercredi mer. Me_jeudi jeu. Je_vendredi ven. Ve_samedi sam. Sa'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -143,40 +141,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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), "un an", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un an", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 ans", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un an", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 ans", "5 years = 5 years");
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), "un an", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "un an", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 ans", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "un an", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 ans", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -189,11 +187,11 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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.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) {
"same day" : function (test) {
test.expect(6);

@@ -212,7 +210,6 @@

"same next week" : function(test) {
"same next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -230,7 +227,6 @@ for (i = 2; i < 7; i++) {

"same last week" : function(test) {
"same last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -248,6 +244,6 @@ for (i = 2; i < 7; i++) {

"same all else" : function(test) {
"same all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -268,3 +264,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -281,3 +277,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -294,3 +290,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -308,3 +304,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -322,3 +318,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -336,3 +332,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -350,3 +346,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -364,10 +360,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1er' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1er' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1er', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1er', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2', "Jan 15 2012 should be week 2");

@@ -374,0 +370,0 @@ test.done();

@@ -19,8 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Outubro Out._Novembro Nov._Decembro Dec.".split("_");
var i;
var tests = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Outubro Out._Novembro Nov._Decembro Dec.".split("_"), i;
function equalTest(input, mmm, i) {

@@ -43,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -84,7 +82,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Outubro Out._Novembro Nov._Decembro Dec.".split("_");
var i;
var expected = "Xaneiro Xan._Febreiro Feb._Marzo Mar._Abril Abr._Maio Mai._Xuño Xuñ._Xullo Xul._Agosto Ago._Setembro Set._Outubro Out._Novembro Nov._Decembro Dec.".split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -96,8 +93,7 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
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;
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("_"),
i;
for (i = 0; i < expected.length; i++) {

@@ -109,3 +105,3 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);

@@ -115,36 +111,36 @@

test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "uns 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), "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.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "uns 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), "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) {
"suffix" : function (test) {
test.expect(2);

@@ -157,3 +153,3 @@

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -164,10 +160,10 @@ test.equal(moment().fromNow(), "hai uns segundos", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "nuns segundos", "en unos segundos");
test.equal(moment().add({d:5}).fromNow(), "en 5 días", "en 5 días");
test.equal(moment().add({s: 30}).fromNow(), "nuns 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) {
"calendar day" : function (test) {
test.expect(7);

@@ -187,7 +183,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -205,8 +200,6 @@ for (i = 2; i < 7; i++) {

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -223,7 +216,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -241,3 +234,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"regression tests" : function(test) {
"regression tests" : function (test) {
test.expect(1);

@@ -254,3 +247,3 @@

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -267,3 +260,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -280,3 +273,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -294,3 +287,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -308,3 +301,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -322,3 +315,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -336,3 +329,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -350,3 +343,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -353,0 +346,0 @@

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'ינואר ינו׳_פברואר פבר׳_מרץ מרץ_אפריל אפר׳_מאי מאי_יוני יוני_יולי יולי_אוגוסט אוג׳_ספטמבר ספט׳_אוקטובר אוק׳_נובמבר נוב׳_דצמבר דצמ׳'.split("_");
var i;
var tests = 'ינואר ינו׳_פברואר פבר׳_מרץ מרץ_אפריל אפר׳_מאי מאי_יוני יוני_יולי יולי_אוגוסט אוג׳_ספטמבר ספט׳_אוקטובר אוק׳_נובמבר נוב׳_דצמבר דצמ׳'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,6 +77,5 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'ינואר ינו׳_פברואר פבר׳_מרץ מרץ_אפריל אפר׳_מאי מאי_יוני יוני_יולי יולי_אוגוסט אוג׳_ספטמבר ספט׳_אוקטובר אוק׳_נובמבר נוב׳_דצמבר דצמ׳'.split("_");
var i;
var expected = 'ינואר ינו׳_פברואר פבר׳_מרץ מרץ_אפריל אפר׳_מאי מאי_יוני יוני_יולי יולי_אוגוסט אוג׳_ספטמבר ספט׳_אוקטובר אוק׳_נובמבר נוב׳_דצמבר דצמ׳'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -89,6 +87,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'ראשון א׳ א|שני ב׳ ב|שלישי ג׳ ג|רביעי ד׳ ד|חמישי ה׳ ה|שישי ו׳ ו|שבת ש׳ ש'.split("|");
var i;
var expected = 'ראשון א׳ א|שני ב׳ ב|שלישי ג׳ ג|רביעי ד׳ ד|חמישי ה׳ ה|שישי ו׳ ו|שבת ש׳ ש'.split("|"), i;
for (i = 0; i < expected.length; i++) {

@@ -100,39 +97,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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), "שעתיים", "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), "יומיים", "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), "חודשיים", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "חודשיים", "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), "שנתיים", "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) {
"suffix" : function (test) {
test.expect(2);

@@ -144,3 +141,3 @@ test.equal(moment(30000).from(0), "בעוד מספר שניות", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -151,10 +148,10 @@ test.equal(moment().fromNow(), "לפני מספר שניות", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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({s: 30}).fromNow(), "בעוד מספר שניות", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "בעוד 5 ימים", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -173,8 +170,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -191,8 +186,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -209,7 +202,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -231,3 +224,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -244,3 +237,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(6);

@@ -258,6 +251,6 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);
test.equal(moment([2007, 11, 30]).week(), 1, "Dec 30 2007 should be week 1");
test.equal(moment([2007, 11, 29]).week(), 52, "Dec 29 2007 should be week 52");
test.equal(moment([2008, 0, 1]).week(), 1, "Jan 1 2008 should be week 1");

@@ -272,3 +265,3 @@ test.equal(moment([2008, 0, 5]).week(), 1, "Jan 5 2008 should be week 1");

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -286,3 +279,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -300,3 +293,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -314,3 +307,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -327,3 +320,3 @@

"weeks year starting sunday format" : function(test) {
"weeks year starting sunday format" : function (test) {
test.expect(5);

@@ -330,0 +323,0 @@

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'जनवरी जन._फ़रवरी फ़र._मार्च मार्च_अप्रैल अप्रै._मई मई_जून जून_जुलाई जुल._अगस्त अग._सितम्बर सित._अक्टूबर अक्टू._नवम्बर नव._दिसम्बर दिस.'.split("_");
var i;
var tests = 'जनवरी जन._फ़रवरी फ़र._मार्च मार्च_अप्रैल अप्रै._मई मई_जून जून_जुलाई जुल._अगस्त अग._सितम्बर सित._अक्टूबर अक्टू._नवम्बर नव._दिसम्बर दिस.'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(21);

@@ -77,3 +76,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -87,3 +86,3 @@

test.equal(moment([2011, 0, 6]).format('DDDo'), '६', '६');
test.equal(moment([2011, 0, 7]).format('DDDo'), '७','७');
test.equal(moment([2011, 0, 7]).format('DDDo'), '७', '७');
test.equal(moment([2011, 0, 8]).format('DDDo'), '८', '८');

@@ -99,3 +98,3 @@ test.equal(moment([2011, 0, 9]).format('DDDo'), '९', '९');

test.equal(moment([2011, 0, 16]).format('DDDo'), '१६', '१६');
test.equal(moment([2011, 0, 17]).format('DDDo'), '१७','१७');
test.equal(moment([2011, 0, 17]).format('DDDo'), '१७', '१७');
test.equal(moment([2011, 0, 18]).format('DDDo'), '१८', '१८');

@@ -106,10 +105,10 @@ test.equal(moment([2011, 0, 19]).format('DDDo'), '१९', '१९');

test.equal(moment([2011, 0, 21]).format('DDDo'), '२१', '२१');
test.equal(moment([2011, 0, 22]).format('DDDo'), '२२','२२');
test.equal(moment([2011, 0, 22]).format('DDDo'), '२२', '२२');
test.equal(moment([2011, 0, 23]).format('DDDo'), '२३', '२३');
test.equal(moment([2011, 0, 24]).format('DDDo'), '२४','२४');
test.equal(moment([2011, 0, 25]).format('DDDo'), '२५','२५');
test.equal(moment([2011, 0, 26]).format('DDDo'), '२६','२६');
test.equal(moment([2011, 0, 27]).format('DDDo'), '२७','२७');
test.equal(moment([2011, 0, 28]).format('DDDo'), '२८','२८');
test.equal(moment([2011, 0, 29]).format('DDDo'), '२९','२९');
test.equal(moment([2011, 0, 24]).format('DDDo'), '२४', '२४');
test.equal(moment([2011, 0, 25]).format('DDDo'), '२५', '२५');
test.equal(moment([2011, 0, 26]).format('DDDo'), '२६', '२६');
test.equal(moment([2011, 0, 27]).format('DDDo'), '२७', '२७');
test.equal(moment([2011, 0, 28]).format('DDDo'), '२८', '२८');
test.equal(moment([2011, 0, 29]).format('DDDo'), '२९', '२९');
test.equal(moment([2011, 0, 30]).format('DDDo'), '३०', '३०');

@@ -121,7 +120,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'जनवरी जन._फ़रवरी फ़र._मार्च मार्च_अप्रैल अप्रै._मई मई_जून जून_जुलाई जुल._अगस्त अग._सितम्बर सित._अक्टूबर अक्टू._नवम्बर नव._दिसम्बर दिस.'.split("_");
var i;
var expected = 'जनवरी जन._फ़रवरी फ़र._मार्च मार्च_अप्रैल अप्रै._मई मई_जून जून_जुलाई जुल._अगस्त अग._सितम्बर सित._अक्टूबर अक्टू._नवम्बर नव._दिसम्बर दिस.'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -133,7 +131,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'रविवार रवि र_सोमवार सोम सो_मंगलवार मंगल मं_बुधवार बुध बु_गुरूवार गुरू गु_शुक्रवार शुक्र शु_शनिवार शनि श'.split("_");
var i;
var expected = 'रविवार रवि र_सोमवार सोम सो_मंगलवार मंगल मं_बुधवार बुध बु_गुरूवार गुरू गु_शुक्रवार शुक्र शु_शनिवार शनि श'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -145,40 +142,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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), "२ मिनट", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "४४ मिनट", "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), "२ घंटे", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "५ घंटे", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "२१ घंटे", "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), "२ दिन", "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 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "२५ दिन", "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), "२ महीने", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "२ महीने", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "३ महीने", "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 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "११ महीने", "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), "२ वर्ष", "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 years = 5 years");
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), "२ मिनट", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "४४ मिनट", "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), "२ घंटे", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "५ घंटे", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "२१ घंटे", "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), "२ दिन", "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 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "२५ दिन", "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), "२ महीने", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "२ महीने", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "३ महीने", "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 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "११ महीने", "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), "२ वर्ष", "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 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -190,3 +187,3 @@ test.equal(moment(30000).from(0), "कुछ ही क्षण में", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -197,10 +194,10 @@ test.equal(moment().fromNow(), "कुछ ही क्षण पहले", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "कुछ ही क्षण में", "कुछ ही क्षण में");
test.equal(moment().add({d:5}).fromNow(), "५ दिन में", "५ दिन में");
test.equal(moment().add({s: 30}).fromNow(), "कुछ ही क्षण में", "कुछ ही क्षण में");
test.equal(moment().add({d: 5}).fromNow(), "५ दिन में", "५ दिन में");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -219,8 +216,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -237,7 +232,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -255,6 +249,6 @@ for (i = 2; i < 7; i++) {

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -273,3 +267,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"meridiem" : function(test) {
"meridiem" : function (test) {
test.expect(12);

@@ -279,3 +273,3 @@

test.equal(moment([2011, 2, 23, 9, 30]).format('a'), "सुबह", "morning");
test.equal(moment([2011, 2, 23, 14, 30]).format('a'), "दोपहर","during day");
test.equal(moment([2011, 2, 23, 14, 30]).format('a'), "दोपहर", "during day");
test.equal(moment([2011, 2, 23, 17, 30]).format('a'), "शाम", "evening");

@@ -287,3 +281,3 @@ test.equal(moment([2011, 2, 23, 19, 30]).format('a'), "शाम", "late evening");

test.equal(moment([2011, 2, 23, 9, 30]).format('A'), "सुबह", "morning");
test.equal(moment([2011, 2, 23, 14, 30]).format('A'), "दोपहर","during day");
test.equal(moment([2011, 2, 23, 14, 30]).format('A'), "दोपहर", " during day");
test.equal(moment([2011, 2, 23, 17, 30]).format('A'), "शाम", "evening");

@@ -299,3 +293,3 @@ test.equal(moment([2011, 2, 23, 19, 30]).format('A'), "शाम", "late evening");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -312,3 +306,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(6);

@@ -326,6 +320,6 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);
test.equal(moment([2007, 11, 30]).week(), 1, "Dec 30 2007 should be week 1");
test.equal(moment([2007, 11, 29]).week(), 52, "Dec 29 2007 should be week 52");
test.equal(moment([2008, 0, 1]).week(), 1, "Jan 1 2008 should be week 1");

@@ -340,3 +334,3 @@ test.equal(moment([2008, 0, 5]).week(), 1, "Jan 5 2008 should be week 1");

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -354,3 +348,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -368,3 +362,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -382,3 +376,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -395,3 +389,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -398,0 +392,0 @@ test.expect(5);

@@ -18,7 +18,7 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
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;
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("_"),
i;
function equalTest(input, mmm, i) {

@@ -41,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(20);

@@ -75,3 +75,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -116,6 +116,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
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;
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("_"),
i;
for (i = 0; i < expected.length; i++) {

@@ -127,6 +127,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
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;
var expected = 'vasárnap v_hétfő h_kedd k_szerda sze_csütörtök cs_péntek p_szombat szo'.split("_"),
i;
for (i = 0; i < expected.length; i++) {

@@ -138,39 +138,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -182,3 +182,3 @@ test.equal(moment(30000).from(0), "néhány másodperc múlva", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -189,10 +189,10 @@ test.equal(moment().fromNow(), "néhány másodperce", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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.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) {
"calendar day" : function (test) {
test.expect(6);

@@ -211,16 +211,13 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var days = 'vasárnap_hétfőn_kedden_szerdán_csütörtökön_pénteken_szombaton'.split('_');
var i, m, 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");
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");
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.equal(m.calendar(), m.format('[' + days[m.day()] + '] LT[-kor]'), "today + " + i + " days end of day");
}

@@ -231,16 +228,14 @@

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var days = 'vasárnap_hétfőn_kedden_szerdán_csütörtökön_pénteken_szombaton'.split('_');
var i, m, 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");
for (i = 2; i < 7; i++) {
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");
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.equal(m.calendar(), m.format('[múlt ' + days[m.day()] + '] LT[-kor]'), "today - " + i + " days end of day");
}

@@ -251,7 +246,7 @@

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -272,3 +267,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "egy héte");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -285,3 +280,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -298,3 +293,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -312,3 +307,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -326,3 +321,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -340,3 +335,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -354,3 +349,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -368,3 +363,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -371,0 +366,0 @@

@@ -19,6 +19,5 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'Januari Jan_Februari Feb_Maret Mar_April Apr_Mei Mei_Juni Jun_Juli Jul_Agustus Ags_September Sep_Oktober Okt_November Nov_Desember Des'.split("_");
var i;
var tests = 'Januari Jan_Februari Feb_Maret Mar_April Apr_Mei Mei_Juni Jun_Juli Jul_Agustus Ags_September Sep_Oktober Okt_November Nov_Desember Des'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -41,3 +40,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -76,6 +75,5 @@ var a = [

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'Januari Jan_Februari Feb_Maret Mar_April Apr_Mei Mei_Juni Jun_Juli Jul_Agustus Ags_September Sep_Oktober Okt_November Nov_Desember Des'.split("_");
var i;
var expected = 'Januari Jan_Februari Feb_Maret Mar_April Apr_Mei Mei_Juni Jun_Juli Jul_Agustus Ags_September Sep_Oktober Okt_November Nov_Desember Des'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -87,6 +85,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'Minggu Min Mg_Senin Sen Sn_Selasa Sel Sl_Rabu Rab Rb_Kamis Kam Km_Jumat Jum Jm_Sabtu Sab Sb'.split("_");
var i;
var expected = 'Minggu Min Mg_Senin Sen Sn_Selasa Sel Sl_Rabu Rab Rb_Kamis Kam Km_Jumat Jum Jm_Sabtu Sab Sb'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -98,39 +95,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "beberapa detik", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "semenit", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "semenit", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 menit", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 menit", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "sejam", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "sejam", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 jam", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 jam", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 jam", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "sehari", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "sehari", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 hari", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "sehari", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 hari", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 hari", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "sebulan", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "sebulan", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "sebulan", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 bulan", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 bulan", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 bulan", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "sebulan", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 bulan", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 bulan", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "setahun", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "setahun", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 tahun", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "setahun", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 tahun", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "beberapa detik", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "semenit", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "semenit", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 menit", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 menit", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "sejam", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "sejam", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 jam", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 jam", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 jam", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "sehari", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "sehari", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 hari", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "sehari", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 hari", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 hari", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "sebulan", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "sebulan", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "sebulan", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 bulan", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 bulan", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 bulan", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "sebulan", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 bulan", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 bulan", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "setahun", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "setahun", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 tahun", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "setahun", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 tahun", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -142,3 +139,3 @@ test.equal(moment(30000).from(0), "dalam beberapa detik", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -149,10 +146,10 @@ test.equal(moment().fromNow(), "beberapa detik yang lalu", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "dalam beberapa detik", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "dalam 5 hari", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "dalam beberapa detik", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "dalam 5 hari", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -171,8 +168,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -189,8 +184,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -207,7 +200,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -228,3 +221,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -241,3 +234,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -254,3 +247,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -268,3 +261,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -282,3 +275,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -296,3 +289,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -310,3 +303,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -324,3 +317,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -327,0 +320,0 @@

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
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;
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("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,3 +77,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -119,7 +118,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -131,7 +129,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -143,52 +140,52 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(34);
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.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) {
"suffix" : function (test) {
test.expect(3);
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.equal(moment().subtract({m: 1}).fromNow(), "fyrir mínútu síðan", "a minute ago");
test.done();
},
"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -199,11 +196,11 @@ test.equal(moment().fromNow(), "fyrir nokkrum sekúndum síðan", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(3);
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.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) {
"calendar day" : function (test) {
test.expect(6);

@@ -222,8 +219,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -240,7 +235,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -258,7 +252,7 @@ for (i = 2; i < 7; i++) {

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -280,3 +274,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -293,3 +287,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -306,3 +300,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -320,3 +314,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -334,3 +328,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -348,3 +342,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -362,3 +356,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -376,10 +370,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52.', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");

@@ -386,0 +380,0 @@ test.done();

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
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;
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("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,3 +77,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -119,7 +118,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -131,7 +129,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
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;
var expected = 'Domenica Dom D_Lunedì Lun L_Martedì Mar Ma_Mercoledì Mer Me_Giovedì Gio G_Venerdì Ven V_Sabato Sab S'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -143,40 +140,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -189,11 +186,11 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "in secondi", "in seconds");
test.equal(moment().add({d:5}).fromNow(), "tra 5 giorni", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "in secondi", "in seconds");
test.equal(moment().add({d: 5}).fromNow(), "tra 5 giorni", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -212,8 +209,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -230,8 +225,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -248,7 +241,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -269,3 +262,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -282,3 +275,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -295,3 +288,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -309,3 +302,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -323,3 +316,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -337,3 +330,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -351,3 +344,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -365,10 +358,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52º', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1º' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1º' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2º' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2º' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1º', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1º', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2º', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2º', "Jan 15 2012 should be week 2");

@@ -375,0 +368,0 @@ test.done();

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
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;
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("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,7 +77,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -90,7 +88,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = '日曜日 日 日_月曜日 月 月_火曜日 火 火_水曜日 水 水_木曜日 木 木_金曜日 金 金_土曜日 土 土'.split("_");
var i;
var expected = '日曜日 日 日_月曜日 月 月_火曜日 火 火_水曜日 水 水_木曜日 木 木_金曜日 金 金_土曜日 土 土'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -102,40 +99,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -147,3 +144,3 @@ test.equal(moment(30000).from(0), "数秒後", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -154,10 +151,10 @@ test.equal(moment().fromNow(), "数秒前", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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({s: 30}).fromNow(), "数秒後", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "5日後", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -176,8 +173,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -194,8 +189,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -212,7 +205,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -233,3 +226,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -246,3 +239,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(6);

@@ -260,6 +253,6 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);
test.equal(moment([2007, 11, 30]).week(), 1, "Dec 30 2007 should be week 1");
test.equal(moment([2007, 11, 29]).week(), 52, "Dec 29 2007 should be week 52");
test.equal(moment([2008, 0, 1]).week(), 1, "Jan 1 2008 should be week 1");

@@ -274,3 +267,3 @@ test.equal(moment([2008, 0, 5]).week(), 1, "Jan 5 2008 should be week 1");

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -288,3 +281,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -302,3 +295,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -316,3 +309,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -329,3 +322,3 @@

"weeks year starting sunday format" : function(test) {
"weeks year starting sunday format" : function (test) {
test.expect(5);

@@ -332,0 +325,0 @@

@@ -18,3 +18,3 @@ // moment.js language configuration

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);

@@ -44,3 +44,3 @@

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -82,3 +82,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(35);

@@ -127,3 +127,3 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);

@@ -140,3 +140,3 @@

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);

@@ -154,3 +154,3 @@

"from" : function(test) {
"from" : function (test) {
test.expect(30);

@@ -160,32 +160,32 @@

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), "დღე", "1 დღე = დღე");
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), "წელი", "1 წელი = წელი");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 წელი", "5 წელი = 5 წელი");
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), "დღე", "1 დღე = დღე");
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), "წელი", "1 წელი = წელი");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 წელი", "5 წელი = 5 წელი");

@@ -195,3 +195,3 @@ test.done();

"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -205,3 +205,3 @@

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -214,7 +214,7 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "რამდენიმე წამში", "რამდენიმე წამში");
test.equal(moment().add({d:5}).fromNow(), "5 დღეში", "5 დღეში");
test.equal(moment().add({s: 30}).fromNow(), "რამდენიმე წამში", "რამდენიმე წამში");
test.equal(moment().add({d: 5}).fromNow(), "5 დღეში", "5 დღეში");

@@ -224,3 +224,3 @@ test.done();

"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -240,7 +240,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i, m;
for (i = 2; i < 7; i++) {

@@ -257,7 +256,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i, m;
for (i = 2; i < 7; i++) {

@@ -274,3 +272,3 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);

@@ -293,3 +291,3 @@

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -306,3 +304,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -319,3 +317,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -333,3 +331,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -347,3 +345,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -361,3 +359,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -375,3 +373,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -389,3 +387,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -392,0 +390,0 @@

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
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;
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("_"), i;
function equalTest(input, mmm, i) {

@@ -41,3 +40,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

},
"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -77,3 +76,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -118,7 +117,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
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;
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("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -130,7 +128,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = '일요일 일 일_월요일 월 월_화요일 화 화_수요일 수 수_목요일 목 목_금요일 금 금_토요일 토 토'.split("_");
var i;
var expected = '일요일 일 일_월요일 월 월_화요일 화 화_수요일 수 수_목요일 목 목_금요일 금 금_토요일 토 토'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -142,40 +139,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -189,3 +186,3 @@

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -198,7 +195,7 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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({s: 30}).fromNow(), "몇초 후", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "5일 후", "in 5 days");

@@ -208,3 +205,3 @@ test.done();

"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -224,8 +221,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -242,8 +237,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -260,7 +253,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -282,3 +275,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -295,3 +288,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(6);

@@ -309,6 +302,6 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);
test.equal(moment([2007, 11, 30]).week(), 1, "Dec 30 2007 should be week 1");
test.equal(moment([2007, 11, 29]).week(), 52, "Dec 29 2007 should be week 52");
test.equal(moment([2008, 0, 1]).week(), 1, "Jan 1 2008 should be week 1");

@@ -323,3 +316,3 @@ test.equal(moment([2008, 0, 5]).week(), 1, "Jan 5 2008 should be week 1");

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -337,3 +330,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -351,3 +344,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -365,3 +358,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -378,3 +371,3 @@

"weeks year starting sunday format" : function(test) {
"weeks year starting sunday format" : function (test) {
test.expect(5);

@@ -381,0 +374,0 @@

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'janvāris jan_februāris feb_marts mar_aprīlis apr_maijs mai_jūnijs jūn_jūlijs jūl_augusts aug_septembris sep_oktobris okt_novembris nov_decembris dec'.split("_");
var i;
var tests = 'janvāris jan_februāris feb_marts mar_aprīlis apr_maijs mai_jūnijs jūn_jūlijs jūl_augusts aug_septembris sep_oktobris okt_novembris nov_decembris dec'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,3 +77,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -119,7 +118,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'janvāris jan_februāris feb_marts mar_aprīlis apr_maijs mai_jūnijs jūn_jūlijs jūl_augusts aug_septembris sep_oktobris okt_novembris nov_decembris dec'.split("_");
var i;
var expected = 'janvāris jan_februāris feb_marts mar_aprīlis apr_maijs mai_jūnijs jūn_jūlijs jūl_augusts aug_septembris sep_oktobris okt_novembris nov_decembris dec'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -131,7 +129,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'svētdiena Sv Sv_pirmdiena P P_otrdiena O O_trešdiena T T_ceturtdiena C C_piektdiena Pk Pk_sestdiena S S'.split("_");
var i;
var expected = 'svētdiena Sv Sv_pirmdiena P P_otrdiena O O_trešdiena T T_ceturtdiena C C_piektdiena Pk Pk_sestdiena S S'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -143,40 +140,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "dažas sekundes", "44 seconds = seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minūti", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minūti", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minūtes", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minūtes", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "stundu", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "stundu", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 stundas", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 stundas", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 stunda", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "dienu", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "dienu", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dienas", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "dienu", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dienas", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dienas", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "mēnesi", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "mēnesi", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "mēnesi", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mēneši", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mēneši", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mēneši", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "mēnesi", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mēneši", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mēneši", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "gadu", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "gadu", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 gadi", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "gadu", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 gadi", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "dažas sekundes", "44 seconds = seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "minūti", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "minūti", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 minūtes", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 minūtes", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "stundu", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "stundu", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 stundas", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 stundas", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 stunda", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "dienu", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "dienu", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 dienas", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "dienu", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 dienas", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 dienas", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "mēnesi", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "mēnesi", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "mēnesi", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 mēneši", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 mēneši", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 mēneši", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "mēnesi", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 mēneši", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 mēneši", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "gadu", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "gadu", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 gadi", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "gadu", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 gadi", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -188,3 +185,3 @@ test.equal(moment(30000).from(0), "dažas sekundes vēlāk", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -195,10 +192,10 @@ test.equal(moment().fromNow(), "dažas sekundes agrāk", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "dažas sekundes vēlāk", "in seconds");
test.equal(moment().add({d:5}).fromNow(), "5 dienas vēlāk", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "dažas sekundes vēlāk", "in seconds");
test.equal(moment().add({d: 5}).fromNow(), "5 dienas vēlāk", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -217,8 +214,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -235,8 +230,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -253,6 +246,6 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -273,3 +266,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -286,3 +279,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -299,3 +292,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -313,3 +306,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -327,3 +320,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -341,3 +334,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -355,3 +348,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -369,10 +362,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52.', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");

@@ -379,0 +372,0 @@ test.done();

@@ -19,3 +19,3 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);

@@ -45,3 +45,3 @@

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -83,3 +83,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -124,3 +124,3 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);

@@ -137,3 +137,3 @@

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);

@@ -151,3 +151,3 @@

"from" : function(test) {
"from" : function (test) {
test.expect(30);

@@ -157,32 +157,32 @@

test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "beberapa saat", "44 saat = beberapa saat");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "seminit", "45 saat = seminit");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "seminit", "89 saat = seminit");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minit", "90 saat = 2 minit");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minit", "44 minit = 44 minit");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "sejam", "45 minit = sejam");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "sejam", "89 minit = sejam");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 jam", "90 minit = 2 jam");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 jam", "5 jam = 5 jam");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 jam", "21 jam = 21 jam");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "sehari", "22 jam = sehari");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "sehari", "35 jam = sehari");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 hari", "36 jam = 2 hari");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "sehari", "1 hari = sehari");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 hari", "5 hari = 5 hari");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 hari", "25 hari = 25 hari");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "sebulan", "26 hari = sebulan");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "sebulan", "30 hari = sebulan");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "sebulan", "45 hari = sebulan");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 bulan", "46 hari = 2 bulan");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 bulan", "75 hari = 2 bulan");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 bulan", "76 hari = 3 bulan");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "sebulan", "1 bulan = sebulan");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 bulan", "5 bulan = 5 bulan");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 bulan", "344 hari = 11 bulan");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "setahun", "345 hari = setahun");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "setahun", "547 hari = setahun");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 tahun", "548 hari = 2 tahun");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "setahun", "1 tahun = setahun");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 tahun", "5 tahun = 5 tahun");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "beberapa saat", "44 saat = beberapa saat");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "seminit", "45 saat = seminit");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "seminit", "89 saat = seminit");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 minit", "90 saat = 2 minit");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 minit", "44 minit = 44 minit");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "sejam", "45 minit = sejam");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "sejam", "89 minit = sejam");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 jam", "90 minit = 2 jam");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 jam", "5 jam = 5 jam");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 jam", "21 jam = 21 jam");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "sehari", "22 jam = sehari");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "sehari", "35 jam = sehari");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 hari", "36 jam = 2 hari");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "sehari", "1 hari = sehari");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 hari", "5 hari = 5 hari");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 hari", "25 hari = 25 hari");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "sebulan", "26 hari = sebulan");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "sebulan", "30 hari = sebulan");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "sebulan", "45 hari = sebulan");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 bulan", "46 hari = 2 bulan");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 bulan", "75 hari = 2 bulan");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 bulan", "76 hari = 3 bulan");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "sebulan", "1 bulan = sebulan");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 bulan", "5 bulan = 5 bulan");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 bulan", "344 hari = 11 bulan");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "setahun", "345 hari = setahun");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "setahun", "547 hari = setahun");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 tahun", "548 hari = 2 tahun");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "setahun", "1 tahun = setahun");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 tahun", "5 tahun = 5 tahun");

@@ -192,3 +192,3 @@ test.done();

"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -202,3 +202,3 @@

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -211,7 +211,7 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "dalam beberapa saat", "dalam beberapa saat");
test.equal(moment().add({d:5}).fromNow(), "dalam 5 hari", "dalam 5 hari");
test.equal(moment().add({s: 30}).fromNow(), "dalam beberapa saat", "dalam beberapa saat");
test.equal(moment().add({d: 5}).fromNow(), "dalam 5 hari", "dalam 5 hari");

@@ -221,3 +221,3 @@ test.done();

"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -237,7 +237,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i, m;
for (i = 2; i < 7; i++) {

@@ -254,7 +253,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i, m;
for (i = 2; i < 7; i++) {

@@ -271,3 +269,3 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);

@@ -293,3 +291,3 @@

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -306,3 +304,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(6);

@@ -320,3 +318,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -334,3 +332,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -348,3 +346,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -362,3 +360,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -376,3 +374,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -389,3 +387,3 @@

"weeks year starting sunday format" : function(test) {
"weeks year starting sunday format" : function (test) {
test.expect(5);

@@ -392,0 +390,0 @@

@@ -19,7 +19,7 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'januar jan_februar feb_mars mar_april apr_mai mai_juni jun_juli jul_august aug_september sep_oktober okt_november nov_desember des'.split("_");
var i;
var tests = 'januar jan_februar feb_mars mars_april april_mai mai_juni juni_juli juli_august aug_september sep_oktober okt_november nov_desember des'.split("_"),
i;
function equalTest(input, mmm, i) {

@@ -42,3 +42,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -48,7 +48,7 @@

['dddd, MMMM Do YYYY, h:mm:ss a', 'søndag, februar 14. 2010, 3:25:50 pm'],
['ddd, hA', 'søn, 3PM'],
['M Mo MM MMMM MMM', '2 2. 02 februar feb'],
['ddd, hA', 'sø., 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ø'],
['d do dddd ddd dd', '0 0. søndag sø. sø'],
['DDD DDDo DDDD', '45 45. 045'],

@@ -61,11 +61,11 @@ ['w wo ww', '6 6. 06'],

['a A', 'pm PM'],
['[the] DDDo [day of the year]', 'the 45. day of the year'],
['L', '2010-02-14'],
['LL', '14 februar 2010'],
['LLL', '14 februar 2010 15:25'],
['LLLL', 'søndag 14 februar 2010 15:25'],
['l', '2010-2-14'],
['ll', '14 feb 2010'],
['lll', '14 feb 2010 15:25'],
['llll', 'søn 14 feb 2010 15:25']
['[den] DDDo [dagen i året]', 'den 45. dagen i året'],
['L', '14.02.2010'],
['LL', '14. februar 2010'],
['LLL', '14. februar 2010 kl. 15.25'],
['LLLL', 'søndag 14. februar 2010 kl. 15.25'],
['l', '14.2.2010'],
['ll', '14. feb. 2010'],
['lll', '14. feb. 2010 kl. 15.25'],
['llll', 'sø. 14. feb. 2010 kl. 15.25']
],

@@ -80,3 +80,3 @@ b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -121,7 +121,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'januar jan_februar feb_mars mar_april apr_mai mai_juni jun_juli jul_august aug_september sep_oktober okt_november nov_desember des'.split("_");
var i;
var expected = 'januar jan._februar feb._mars mars_april april_mai mai_juni juni_juli juli_august aug._september sep._oktober okt._november nov._desember des.'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -133,7 +132,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
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;
var expected = 'søndag sø. sø_mandag ma. ma_tirsdag ti. ti_onsdag on. on_torsdag to. to_fredag fr. fr_lørdag lø. lø'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -145,40 +143,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "noen sekunder", "44 sekunder = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "ett minutt", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "ett minutt", "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), "en time", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "en 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), "en dag", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "en dag", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dager", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "en dag", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dager", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dager", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "en måned", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "en måned", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "en måned", "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), "en måned", "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), "ett år", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "ett å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), "ett å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({s: 44}), true), "noen sekunder", "44 sekunder = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "ett minutt", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "ett minutt", "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), "en time", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "en 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), "en dag", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "en dag", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 dager", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "en dag", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 dager", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 dager", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "en måned", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "en måned", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "en måned", "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), "en måned", "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), "ett år", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "ett å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), "ett å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) {
"suffix" : function (test) {
test.expect(2);

@@ -190,3 +188,3 @@ test.equal(moment(30000).from(0), "om noen sekunder", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -197,10 +195,10 @@ test.equal(moment().fromNow(), "for noen sekunder siden", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "om noen sekunder", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "om 5 dager", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "om noen sekunder", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "om 5 dager", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -210,24 +208,22 @@

test.equal(moment(a).calendar(), "I dag klokken 02:00", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "I dag klokken 02:25", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "I dag klokken 03:00", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "I morgen klokken 02:00", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "I dag klokken 01:00", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "I går klokken 02:00", "yesterday at the same time");
test.equal(moment(a).calendar(), "i dag kl. 2.00", "today at the same time");
test.equal(moment(a).add({ m: 25 }).calendar(), "i dag kl. 2.25", "Now plus 25 min");
test.equal(moment(a).add({ h: 1 }).calendar(), "i dag kl. 3.00", "Now plus 1 hour");
test.equal(moment(a).add({ d: 1 }).calendar(), "i morgen kl. 2.00", "tomorrow at the same time");
test.equal(moment(a).subtract({ h: 1 }).calendar(), "i dag kl. 1.00", "Now minus 1 hour");
test.equal(moment(a).subtract({ d: 1 }).calendar(), "i går kl. 2.00", "yesterday at the same time");
test.done();
},
"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
test.equal(m.calendar(), m.format('dddd [klokken] LT'), "Today + " + i + " days current time");
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 [klokken] LT'), "Today + " + i + " days beginning of day");
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 [klokken] LT'), "Today + " + i + " days end of day");
test.equal(m.calendar(), m.format('dddd [kl.] LT'), "Today + " + i + " days end of day");
}

@@ -237,15 +233,13 @@ test.done();

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
test.equal(m.calendar(), m.format('[Forrige] dddd [klokken] LT'), "Today - " + i + " days current time");
test.equal(m.calendar(), m.format('[forrige] dddd [kl.] LT'), "Today - " + i + " days current time");
m.hours(0).minutes(0).seconds(0).milliseconds(0);
test.equal(m.calendar(), m.format('[Forrige] dddd [klokken] LT'), "Today - " + i + " days beginning of day");
test.equal(m.calendar(), m.format('[forrige] dddd [kl.] LT'), "Today - " + i + " days beginning of day");
m.hours(23).minutes(59).seconds(59).milliseconds(999);
test.equal(m.calendar(), m.format('[Forrige] dddd [klokken] LT'), "Today - " + i + " days end of day");
test.equal(m.calendar(), m.format('[forrige] dddd [kl.] LT'), "Today - " + i + " days end of day");
}

@@ -255,6 +249,6 @@ test.done();

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -275,3 +269,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -288,3 +282,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -301,3 +295,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -315,3 +309,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -329,3 +323,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -343,3 +337,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -357,3 +351,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -371,10 +365,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52.', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");

@@ -381,0 +375,0 @@ test.done();

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'जनवरी जन._फेब्रुवरी फेब्रु._मार्च मार्च_अप्रिल अप्रि._मई मई_जुन जुन_जुलाई जुलाई._अगष्ट अग._सेप्टेम्बर सेप्ट._अक्टोबर अक्टो._नोभेम्बर नोभे._डिसेम्बर डिसे.'.split("_");
var i;
var tests = 'जनवरी जन._फेब्रुवरी फेब्रु._मार्च मार्च_अप्रिल अप्रि._मई मई_जुन जुन_जुलाई जुलाई._अगष्ट अग._सेप्टेम्बर सेप्ट._अक्टोबर अक्टो._नोभेम्बर नोभे._डिसेम्बर डिसे.'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,8 +41,8 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(21);
var a = [
['dddd, Do MMMM YYYY, aको h:mm:ss बजे','आइतबार, १४ फेब्रुवरी २०१०, बेलुकाको ३:२५:५० बजे'],
['ddd, aको h बजे', 'आइत., बेलुकाको ३ बजे'],
['dddd, Do MMMM YYYY, aको h:mm:ss बजे', 'आइतबार, १४ फेब्रुवरी २०१०, बेलुकाको ३:२५:५० बजे'],
['ddd, aको h बजे', 'आइत., बेलुकाको ३ बजे'],
['M Mo MM MMMM MMM', '२ २ ०२ फेब्रुवरी फेब्रु.'],

@@ -77,3 +76,3 @@ ['YYYY YY', '२०१० १०'],

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -87,3 +86,3 @@

test.equal(moment([2011, 0, 6]).format('DDDo'), '६', '६');
test.equal(moment([2011, 0, 7]).format('DDDo'), '७','७');
test.equal(moment([2011, 0, 7]).format('DDDo'), '७', '७');
test.equal(moment([2011, 0, 8]).format('DDDo'), '८', '८');

@@ -99,3 +98,3 @@ test.equal(moment([2011, 0, 9]).format('DDDo'), '९', '९');

test.equal(moment([2011, 0, 16]).format('DDDo'), '१६', '१६');
test.equal(moment([2011, 0, 17]).format('DDDo'), '१७','१७');
test.equal(moment([2011, 0, 17]).format('DDDo'), '१७', '१७');
test.equal(moment([2011, 0, 18]).format('DDDo'), '१८', '१८');

@@ -106,10 +105,10 @@ test.equal(moment([2011, 0, 19]).format('DDDo'), '१९', '१९');

test.equal(moment([2011, 0, 21]).format('DDDo'), '२१', '२१');
test.equal(moment([2011, 0, 22]).format('DDDo'), '२२','२२');
test.equal(moment([2011, 0, 22]).format('DDDo'), '२२', '२२');
test.equal(moment([2011, 0, 23]).format('DDDo'), '२३', '२३');
test.equal(moment([2011, 0, 24]).format('DDDo'), '२४','२४');
test.equal(moment([2011, 0, 25]).format('DDDo'), '२५','२५');
test.equal(moment([2011, 0, 26]).format('DDDo'), '२६','२६');
test.equal(moment([2011, 0, 27]).format('DDDo'), '२७','२७');
test.equal(moment([2011, 0, 28]).format('DDDo'), '२८','२८');
test.equal(moment([2011, 0, 29]).format('DDDo'), '२९','२९');
test.equal(moment([2011, 0, 24]).format('DDDo'), '२४', '२४');
test.equal(moment([2011, 0, 25]).format('DDDo'), '२५', '२५');
test.equal(moment([2011, 0, 26]).format('DDDo'), '२६', '२६');
test.equal(moment([2011, 0, 27]).format('DDDo'), '२७', '२७');
test.equal(moment([2011, 0, 28]).format('DDDo'), '२८', '२८');
test.equal(moment([2011, 0, 29]).format('DDDo'), '२९', '२९');
test.equal(moment([2011, 0, 30]).format('DDDo'), '३०', '३०');

@@ -121,7 +120,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'जनवरी जन._फेब्रुवरी फेब्रु._मार्च मार्च_अप्रिल अप्रि._मई मई_जुन जुन_जुलाई जुलाई._अगष्ट अग._सेप्टेम्बर सेप्ट._अक्टोबर अक्टो._नोभेम्बर नोभे._डिसेम्बर डिसे.'.split("_");
var i;
var expected = 'जनवरी जन._फेब्रुवरी फेब्रु._मार्च मार्च_अप्रिल अप्रि._मई मई_जुन जुन_जुलाई जुलाई._अगष्ट अग._सेप्टेम्बर सेप्ट._अक्टोबर अक्टो._नोभेम्बर नोभे._डिसेम्बर डिसे.'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -133,7 +131,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'आइतबार आइत. आइ._सोमबार सोम. सो._मङ्गलबार मङ्गल. मङ्_बुधबार बुध. बु._बिहिबार बिहि. बि._शुक्रबार शुक्र. शु._शनिबार शनि. श.'.split("_");
var i;
var expected = 'आइतबार आइत. आइ._सोमबार सोम. सो._मङ्गलबार मङ्गल. मङ्_बुधबार बुध. बु._बिहिबार बिहि. बि._शुक्रबार शुक्र. शु._शनिबार शनि. श.'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -145,40 +142,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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), "२ मिनेट", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "४४ मिनेट", "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), "२ घण्टा", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "५ घण्टा", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "२१ घण्टा", "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), "२ दिन", "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 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "२५ दिन", "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), "२ महिना", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "२ महिना", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "३ महिना", "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 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "११ महिना", "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), "२ बर्ष", "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 years = 5 years");
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), "२ मिनेट", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "४४ मिनेट", "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), "२ घण्टा", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "५ घण्टा", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "२१ घण्टा", "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), "२ दिन", "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 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "२५ दिन", "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), "२ महिना", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "२ महिना", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "३ महिना", "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 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "११ महिना", "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), "२ बर्ष", "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 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -190,3 +187,3 @@ test.equal(moment(30000).from(0), "केही समयमा", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -197,10 +194,10 @@ test.equal(moment().fromNow(), "केही समय अगाडी", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "केही समयमा", "केही समयमा");
test.equal(moment().add({d:5}).fromNow(), "५ दिनमा", "५ दिनमा");
test.equal(moment().add({s: 30}).fromNow(), "केही समयमा", "केही समयमा");
test.equal(moment().add({d: 5}).fromNow(), "५ दिनमा", "५ दिनमा");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -219,8 +216,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -237,8 +232,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -255,6 +248,6 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -273,3 +266,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"meridiem" : function(test) {
"meridiem" : function (test) {
test.expect(12);

@@ -279,3 +272,3 @@

test.equal(moment([2011, 2, 23, 9, 30]).format('a'), "बिहान", "morning");
test.equal(moment([2011, 2, 23, 14, 30]).format('a'), "दिउँसो","during day");
test.equal(moment([2011, 2, 23, 14, 30]).format('a'), "दिउँसो", "during day");
test.equal(moment([2011, 2, 23, 17, 30]).format('a'), "बेलुका", "evening");

@@ -287,3 +280,3 @@ test.equal(moment([2011, 2, 23, 19, 30]).format('a'), "साँझ", "late evening");

test.equal(moment([2011, 2, 23, 9, 30]).format('A'), "बिहान", "morning");
test.equal(moment([2011, 2, 23, 14, 30]).format('A'), "दिउँसो","during day");
test.equal(moment([2011, 2, 23, 14, 30]).format('A'), "दिउँसो", "during day");
test.equal(moment([2011, 2, 23, 17, 30]).format('A'), "बेलुका", "evening");

@@ -299,3 +292,3 @@ test.equal(moment([2011, 2, 23, 19, 30]).format('A'), "साँझ", "late evening");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -312,3 +305,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -325,3 +318,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -339,3 +332,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -353,3 +346,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -367,3 +360,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -381,3 +374,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -395,3 +388,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -398,0 +391,0 @@

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'januari jan._februari feb._maart mrt._april apr._mei mei._juni jun._juli jul._augustus aug._september sep._oktober okt._november nov._december dec.'.split("_");
var i;
var tests = 'januari jan._februari feb._maart mrt._april apr._mei mei._juni jun._juli jul._augustus aug._september sep._oktober okt._november nov._december dec.'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,3 +77,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -119,7 +118,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'januari jan._februari feb._maart mrt._april apr._mei mei_juni jun._juli jul._augustus aug._september sep._oktober okt._november nov._december dec.'.split("_");
var i;
var expected = 'januari jan._februari feb._maart mrt._april apr._mei mei_juni jun._juli jul._augustus aug._september sep._oktober okt._november nov._december dec.'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -131,7 +129,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'zondag zo. Zo_maandag ma. Ma_dinsdag di. Di_woensdag wo. Wo_donderdag do. Do_vrijdag vr. Vr_zaterdag za. Za'.split("_");
var i;
var expected = 'zondag zo. Zo_maandag ma. Ma_dinsdag di. Di_woensdag wo. Wo_donderdag do. Do_vrijdag vr. Vr_zaterdag za. Za'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -143,40 +140,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "een paar seconden", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "één minuut", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "één minuut", "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), "één uur", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "één uur", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 uur", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 uur", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 uur", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "één dag", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "één dag", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dagen", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "één dag", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dagen", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dagen", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "één maand", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "één maand", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "één maand", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 maanden", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 maanden", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 maanden", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "één maand", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 maanden", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 maanden", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "één jaar", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "één jaar", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 jaar", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "één jaar", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 jaar", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "een paar seconden", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "één minuut", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "één minuut", "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), "één uur", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "één uur", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 uur", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 uur", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 uur", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "één dag", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "één dag", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 dagen", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "één dag", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 dagen", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 dagen", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "één maand", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "één maand", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "één maand", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 maanden", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 maanden", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 maanden", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "één maand", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 maanden", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 maanden", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "één jaar", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "één jaar", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 jaar", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "één jaar", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 jaar", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -188,3 +185,3 @@ test.equal(moment(30000).from(0), "over een paar seconden", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -195,10 +192,10 @@ test.equal(moment().fromNow(), "een paar seconden geleden", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "over een paar seconden", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "over 5 dagen", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "over een paar seconden", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "over 5 dagen", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -217,8 +214,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -235,8 +230,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -253,7 +246,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -272,3 +265,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"month abbreviation" : function(test) {
"month abbreviation" : function (test) {
test.expect(2);

@@ -285,3 +278,3 @@

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -298,3 +291,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -311,3 +304,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -325,3 +318,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -339,3 +332,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -353,3 +346,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -367,3 +360,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -381,10 +374,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52ste', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1ste' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1ste' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2de' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2de' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1ste', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1ste', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2de', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2de', "Jan 15 2012 should be week 2");

@@ -391,0 +384,0 @@ test.done();

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'januar jan_februar feb_mars mar_april apr_mai mai_juni jun_juli jul_august aug_september sep_oktober okt_november nov_desember des'.split("_");
var i;
var tests = 'januar jan_februar feb_mars mar_april apr_mai mai_juni jun_juli jul_august aug_september sep_oktober okt_november nov_desember des'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -61,7 +60,7 @@

['[the] DDDo [day of the year]', 'the 45. day of the year'],
['L', '2010-02-14'],
['L', '14.02.2010'],
['LL', '14 februar 2010'],
['LLL', '14 februar 2010 15:25'],
['LLLL', 'sundag 14 februar 2010 15:25'],
['l', '2010-2-14'],
['l', '14.2.2010'],
['ll', '14 feb 2010'],

@@ -79,3 +78,3 @@ ['lll', '14 feb 2010 15:25'],

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -120,7 +119,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'januar jan_februar feb_mars mar_april apr_mai mai_juni jun_juli jul_august aug_september sep_oktober okt_november nov_desember des'.split("_");
var i;
var expected = 'januar jan_februar feb_mars mar_april apr_mai mai_juni jun_juli jul_august aug_september sep_oktober okt_november nov_desember des'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -132,7 +130,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'sundag sun su_måndag mån må_tysdag tys ty_onsdag ons on_torsdag tor to_fredag fre fr_laurdag lau lø'.split("_");
var i;
var expected = 'sundag sun su_måndag mån må_tysdag tys ty_onsdag ons on_torsdag tor to_fredag fre fr_laurdag lau lø'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -144,40 +141,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "noen sekund", "44 sekunder = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "ett minutt", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "ett minutt", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutt", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutt", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "en time", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "en time", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 timar", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 timar", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 timar", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "en dag", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "en dag", "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), "en dag", "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:26}), true), "en månad", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "en månad", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "en månad", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 månader", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 månader", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 månader", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "en månad", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 månader", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 månader", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "ett år", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "ett å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), "ett å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({s: 44}), true), "noen sekund", "44 sekunder = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "ett minutt", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "ett minutt", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 minutt", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 minutt", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "en time", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "en time", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 timar", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 timar", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 timar", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "en dag", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "en dag", "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), "en dag", "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: 26}), true), "en månad", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "en månad", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "en månad", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 månader", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 månader", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 månader", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "en månad", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 månader", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 månader", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "ett år", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "ett å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), "ett å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) {
"suffix" : function (test) {
test.expect(2);

@@ -189,3 +186,3 @@ test.equal(moment(30000).from(0), "om noen sekund", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -196,10 +193,10 @@ test.equal(moment().fromNow(), "for noen sekund siden", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "om noen sekund", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "om 5 dagar", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "om noen sekund", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "om 5 dagar", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -218,8 +215,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -236,8 +231,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -254,6 +247,6 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -274,3 +267,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -287,3 +280,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -300,3 +293,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -314,3 +307,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -328,3 +321,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -342,3 +335,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -356,3 +349,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -370,10 +363,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52.', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");

@@ -380,0 +373,0 @@ test.done();

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'styczeń sty_luty lut_marzec mar_kwiecień kwi_maj maj_czerwiec cze_lipiec lip_sierpień sie_wrzesień wrz_październik paź_listopad lis_grudzień gru'.split("_");
var i;
var tests = 'styczeń sty_luty lut_marzec mar_kwiecień kwi_maj maj_czerwiec cze_lipiec lip_sierpień sie_wrzesień wrz_październik paź_listopad lis_grudzień gru'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,3 +77,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -119,7 +118,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'styczeń sty_luty lut_marzec mar_kwiecień kwi_maj maj_czerwiec cze_lipiec lip_sierpień sie_wrzesień wrz_październik paź_listopad lis_grudzień gru'.split("_");
var i;
var expected = 'styczeń sty_luty lut_marzec mar_kwiecień kwi_maj maj_czerwiec cze_lipiec lip_sierpień sie_wrzesień wrz_październik paź_listopad lis_grudzień gru'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -131,7 +129,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'niedziela nie N_poniedziałek pon Pn_wtorek wt Wt_środa śr Śr_czwartek czw Cz_piątek pt Pt_sobota sb So'.split("_");
var i;
var expected = 'niedziela nie N_poniedziałek pon Pn_wtorek wt Wt_środa śr Śr_czwartek czw Cz_piątek pt Pt_sobota sb So'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -143,40 +140,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "kilka sekund", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minuta", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minuta", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuty", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuty", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "godzina", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "godzina", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 godziny", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 godzin", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 godzin", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "1 dzień", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "1 dzień", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dni", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "1 dzień", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dni", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dni", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "miesiąc", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "miesiąc", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "miesiąc", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 miesiące", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 miesiące", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 miesiące", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "miesiąc", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 miesięcy", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 miesięcy", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "rok", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "rok", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 lata", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "rok", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 lat", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "kilka sekund", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "minuta", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "minuta", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 minuty", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 minuty", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "godzina", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "godzina", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 godziny", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 godzin", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 godzin", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "1 dzień", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "1 dzień", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 dni", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "1 dzień", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 dni", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 dni", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "miesiąc", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "miesiąc", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "miesiąc", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 miesiące", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 miesiące", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 miesiące", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "miesiąc", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 miesięcy", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 miesięcy", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "rok", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "rok", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 lata", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "rok", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 lat", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -188,3 +185,3 @@ test.equal(moment(30000).from(0), "za kilka sekund", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -195,11 +192,11 @@ test.equal(moment().fromNow(), "kilka sekund temu", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(3);
test.equal(moment().add({s:30}).fromNow(), "za kilka sekund", "in a few seconds");
test.equal(moment().add({h:1}).fromNow(), "za godzinę", "in an hour");
test.equal(moment().add({d:5}).fromNow(), "za 5 dni", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "za kilka sekund", "in a few seconds");
test.equal(moment().add({h: 1}).fromNow(), "za godzinę", "in an hour");
test.equal(moment().add({d: 5}).fromNow(), "za 5 dni", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -218,8 +215,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -236,3 +231,3 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);

@@ -244,6 +239,10 @@

switch (d.day()) {
case 0: return '[W zeszłą niedzielę o] LT'
case 3: return '[W zeszłą środę o] LT'
case 6: return '[W zeszłą sobotę o] LT'
default: return '[W zeszły] dddd [o] LT'
case 0:
return '[W zeszłą niedzielę o] LT';
case 3:
return '[W zeszłą środę o] LT';
case 6:
return '[W zeszłą sobotę o] LT';
default:
return '[W zeszły] dddd [o] LT';
}

@@ -265,7 +264,7 @@ }

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -287,3 +286,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -300,3 +299,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -313,3 +312,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -327,3 +326,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -341,3 +340,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -355,3 +354,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -369,3 +368,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -383,10 +382,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52.', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");

@@ -393,0 +392,0 @@ test.done();

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'Janeiro Jan_Fevereiro Fev_Março Mar_Abril Abr_Maio Mai_Junho Jun_Julho Jul_Agosto Ago_Setembro Set_Outubro Out_Novembro Nov_Dezembro Dez'.split("_");
var i;
var tests = 'Janeiro Jan_Fevereiro Fev_Março Mar_Abril Abr_Maio Mai_Junho Jun_Julho Jul_Agosto Ago_Setembro Set_Outubro Out_Novembro Nov_Dezembro Dez'.split("_"), i;

@@ -45,3 +44,3 @@ function equalTest(input, mmm, i) {

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -81,3 +80,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -122,7 +121,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'Janeiro Jan_Fevereiro Fev_Março Mar_Abril Abr_Maio Mai_Junho Jun_Julho Jul_Agosto Ago_Setembro Set_Outubro Out_Novembro Nov_Dezembro Dez'.split("_");
var i;
var expected = 'Janeiro Jan_Fevereiro Fev_Março Mar_Abril Abr_Maio Mai_Junho Jun_Julho Jul_Agosto Ago_Setembro Set_Outubro Out_Novembro Nov_Dezembro Dez'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -134,7 +132,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'Domingo Dom_Segunda-feira Seg_Terça-feira Ter_Quarta-feira Qua_Quinta-feira Qui_Sexta-feira Sex_Sábado Sáb'.split("_");
var i;
var expected = 'Domingo Dom_Segunda-feira Seg_Terça-feira Ter_Quarta-feira Qua_Quinta-feira Qui_Sexta-feira Sex_Sábado Sáb'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -146,40 +143,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "segundos", "44 seconds = seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "um minuto", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "um 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), "uma hora", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "uma 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), "um dia", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "um dia", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dias", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "um dia", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dias", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dias", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "um mês", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "um mês", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "um mês", "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), "um mês", "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), "um ano", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "um 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), "um ano", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anos", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "segundos", "44 seconds = seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "um minuto", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "um 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), "uma hora", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "uma 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), "um dia", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "um dia", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 dias", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "um dia", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 dias", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 dias", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "um mês", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "um mês", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "um mês", "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), "um mês", "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), "um ano", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "um 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), "um 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) {
"suffix" : function (test) {
test.expect(2);

@@ -192,11 +189,11 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "em segundos", "in seconds");
test.equal(moment().add({d:5}).fromNow(), "em 5 dias", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "em segundos", "in seconds");
test.equal(moment().add({d: 5}).fromNow(), "em 5 dias", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -216,8 +213,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -234,8 +229,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -252,7 +245,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -274,3 +267,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -287,3 +280,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(6);

@@ -301,6 +294,6 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);
test.equal(moment([2007, 11, 30]).week(), 1, "Dec 30 2007 should be week 1");
test.equal(moment([2007, 11, 29]).week(), 52, "Dec 29 2007 should be week 52");
test.equal(moment([2008, 0, 1]).week(), 1, "Jan 1 2008 should be week 1");

@@ -315,3 +308,3 @@ test.equal(moment([2008, 0, 5]).week(), 1, "Jan 5 2008 should be week 1");

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -329,3 +322,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -343,3 +336,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -357,3 +350,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -370,3 +363,3 @@

"weeks year starting sunday format" : function(test) {
"weeks year starting sunday format" : function (test) {
test.expect(5);

@@ -373,0 +366,0 @@

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'Janeiro Jan_Fevereiro Fev_Março Mar_Abril Abr_Maio Mai_Junho Jun_Julho Jul_Agosto Ago_Setembro Set_Outubro Out_Novembro Nov_Dezembro Dez'.split("_");
var i;
var tests = 'Janeiro Jan_Fevereiro Fev_Março Mar_Abril Abr_Maio Mai_Junho Jun_Julho Jul_Agosto Ago_Setembro Set_Outubro Out_Novembro Nov_Dezembro Dez'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,3 +77,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -118,6 +117,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1º', '1º');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'Janeiro Jan_Fevereiro Fev_Março Mar_Abril Abr_Maio Mai_Junho Jun_Julho Jul_Agosto Ago_Setembro Set_Outubro Out_Novembro Nov_Dezembro Dez'.split("_");
var i;
var expected = 'Janeiro Jan_Fevereiro Fev_Março Mar_Abril Abr_Maio Mai_Junho Jun_Julho Jul_Agosto Ago_Setembro Set_Outubro Out_Novembro Nov_Dezembro Dez'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -129,6 +127,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'Domingo Dom Dom_Segunda-feira Seg 2ª_Terça-feira Ter 3ª_Quarta-feira Qua 4ª_Quinta-feira Qui 5ª_Sexta-feira Sex 6ª_Sábado Sáb Sáb'.split("_");
var i;
var expected = 'Domingo Dom Dom_Segunda-feira Seg 2ª_Terça-feira Ter 3ª_Quarta-feira Qua 4ª_Quinta-feira Qui 5ª_Sexta-feira Sex 6ª_Sábado Sáb Sáb'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -140,39 +137,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "segundos", "44 seconds = seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "um minuto", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "um 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), "uma hora", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "uma 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), "um dia", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "um dia", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dias", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "um dia", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dias", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dias", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "um mês", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "um mês", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "um mês", "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), "um mês", "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), "um ano", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "um 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), "um ano", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 anos", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "segundos", "44 seconds = seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "um minuto", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "um 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), "uma hora", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "uma 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), "um dia", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "um dia", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 dias", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "um dia", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 dias", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 dias", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "um mês", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "um mês", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "um mês", "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), "um mês", "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), "um ano", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "um 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), "um 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) {
"suffix" : function (test) {
test.expect(2);

@@ -184,10 +181,10 @@ test.equal(moment(30000).from(0), "em segundos", "prefix");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "em segundos", "in seconds");
test.equal(moment().add({d:5}).fromNow(), "em 5 dias", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "em segundos", "in seconds");
test.equal(moment().add({d: 5}).fromNow(), "em 5 dias", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -206,8 +203,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -224,8 +219,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -242,7 +235,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -264,3 +257,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -277,3 +270,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -290,3 +283,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -304,3 +297,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -318,3 +311,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -332,3 +325,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -346,3 +339,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -360,10 +353,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52º', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1º' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1º' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2º' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2º' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1º', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1º', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2º', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2º', "Jan 15 2012 should be week 2");

@@ -370,0 +363,0 @@ test.done();

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'Ianuarie Ian_Februarie Feb_Martie Mar_Aprilie Apr_Mai Mai_Iunie Iun_Iulie Iul_August Aug_Septembrie Sep_Octombrie Oct_Noiembrie Noi_Decembrie Dec'.split("_");
var i;
var tests = 'Ianuarie Ian_Februarie Feb_Martie Mar_Aprilie Apr_Mai Mai_Iunie Iun_Iulie Iul_August Aug_Septembrie Sep_Octombrie Oct_Noiembrie Noi_Decembrie Dec'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,3 +77,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -119,7 +118,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'Ianuarie Ian_Februarie Feb_Martie Mar_Aprilie Apr_Mai Mai_Iunie Iun_Iulie Iul_August Aug_Septembrie Sep_Octombrie Oct_Noiembrie Noi_Decembrie Dec'.split("_");
var i;
var expected = 'Ianuarie Ian_Februarie Feb_Martie Mar_Aprilie Apr_Mai Mai_Iunie Iun_Iulie Iul_August Aug_Septembrie Sep_Octombrie Oct_Noiembrie Noi_Decembrie Dec'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -131,7 +129,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'Duminică Dum Du_Luni Lun Lu_Marţi Mar Ma_Miercuri Mie Mi_Joi Joi Jo_Vineri Vin Vi_Sâmbătă Sâm Sâ'.split("_");
var i;
var expected = 'Duminică Dum Du_Luni Lun Lu_Marţi Mar Ma_Miercuri Mie Mi_Joi Joi Jo_Vineri Vin Vi_Sâmbătă Sâm Sâ'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -143,40 +140,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "câteva secunde", "44 secunde = câteva secunde");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "un minut", "45 secunde = un minut");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "un minut", "89 secunde = un minut");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minute", "90 secunde = 2 minute");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minute", "44 minute = 44 minute");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "o oră", "45 minute = o oră");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "o oră", "89 minute = o oră");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 ore", "90 minute = 2 ore");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 ore", "5 ore = 5 ore");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 ore", "21 ore = 21 ore");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "o zi", "22 ore = o zi");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "o zi", "35 ore = o zi");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 zile", "36 ore = 2 zile");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "o zi", "1 zi = o zi");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 zile", "5 zile = 5 zile");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 zile", "25 zile = 25 zile");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "o lună", "26 zile = o lună");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "o lună", "30 zile = o lună");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "o lună", "45 zile = o lună");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 luni", "46 zile = 2 luni");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 luni", "75 zile = 2 luni");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 luni", "76 zile = 3 luni");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "o lună", "1 lună = o lună");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 luni", "5 luni = 5 luni");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 luni", "344 zile = 11 luni");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "un an", "345 zile = un an");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "un an", "547 zile = un an");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 ani", "548 zile = 2 ani");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "un an", "1 an = un an");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 ani", "5 ani = 5 ani");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "câteva secunde", "44 secunde = câteva secunde");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "un minut", "45 secunde = un minut");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "un minut", "89 secunde = un minut");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 minute", "90 secunde = 2 minute");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 minute", "44 minute = 44 minute");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "o oră", "45 minute = o oră");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "o oră", "89 minute = o oră");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 ore", "90 minute = 2 ore");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 ore", "5 ore = 5 ore");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 ore", "21 ore = 21 ore");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "o zi", "22 ore = o zi");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "o zi", "35 ore = o zi");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 zile", "36 ore = 2 zile");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "o zi", "1 zi = o zi");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 zile", "5 zile = 5 zile");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 zile", "25 zile = 25 zile");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "o lună", "26 zile = o lună");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "o lună", "30 zile = o lună");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "o lună", "45 zile = o lună");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 luni", "46 zile = 2 luni");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 luni", "75 zile = 2 luni");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 luni", "76 zile = 3 luni");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "o lună", "1 lună = o lună");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 luni", "5 luni = 5 luni");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 luni", "344 zile = 11 luni");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "un an", "345 zile = un an");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "un an", "547 zile = un an");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 ani", "548 zile = 2 ani");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "un an", "1 an = un an");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 ani", "5 ani = 5 ani");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -188,3 +185,3 @@ test.equal(moment(30000).from(0), "peste câteva secunde", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -195,10 +192,10 @@ test.equal(moment().fromNow(), "câteva secunde în urmă", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "peste câteva secunde", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "peste 5 zile", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "peste câteva secunde", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "peste 5 zile", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -217,8 +214,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -235,8 +230,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -253,6 +246,6 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -274,3 +267,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -287,3 +280,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -300,3 +293,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -314,3 +307,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -328,3 +321,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -342,3 +335,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -356,3 +349,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -370,3 +363,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -373,0 +366,0 @@

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'январь янв_февраль фев_март мар_апрель апр_май май_июнь июн_июль июл_август авг_сентябрь сен_октябрь окт_ноябрь ноя_декабрь дек'.split("_");
var i;
var tests = 'январь янв_февраль фев_март мар_апрель апр_май май_июнь июнь_июль июль_август авг_сентябрь сен_октябрь окт_ноябрь ноя_декабрь дек'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,3 +77,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -119,7 +118,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'январь янв_февраль фев_март мар_апрель апр_май май_июнь июн_июль июл_август авг_сентябрь сен_октябрь окт_ноябрь ноя_декабрь дек'.split("_");
var i;
var expected = 'январь янв_февраль фев_март мар_апрель апр_май май_июнь июнь_июль июль_август авг_сентябрь сен_октябрь окт_ноябрь ноя_декабрь дек'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -131,3 +129,3 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format month case" : function(test) {
"format month case" : function (test) {
test.expect(24);

@@ -138,4 +136,3 @@

'accusative': 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_')
};
var i;
}, i;
for (i = 0; i < 12; i++) {

@@ -148,7 +145,20 @@ test.equal(moment([2011, i, 1]).format('D MMMM'), '1 ' + months.accusative[i], '1 ' + months.accusative[i]);

"format week" : function(test) {
"format month short case" : function (test) {
test.expect(24);
var monthsShort = {
'nominative': 'янв_фев_мар_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split('_'),
'accusative': 'янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек'.split('_')
}, i;
for (i = 0; i < 12; i++) {
test.equal(moment([2011, i, 1]).format('D MMM'), '1 ' + monthsShort.accusative[i], '1 ' + monthsShort.accusative[i]);
test.equal(moment([2011, i, 1]).format('MMM'), monthsShort.nominative[i], '1 ' + monthsShort.nominative[i]);
}
test.done();
},
"format week" : function (test) {
test.expect(7);
var expected = 'воскресенье вск вс_понедельник пнд пн_вторник втр вт_среда срд ср_четверг чтв чт_пятница птн пт_суббота сбт сб'.split("_");
var i;
var expected = 'воскресенье вск вс_понедельник пнд пн_вторник втр вт_среда срд ср_четверг чтв чт_пятница птн пт_суббота сбт сб'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -160,41 +170,41 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(32);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "несколько секунд", "44 seconds = 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:11}), true), "11 дней", "11 days = 11 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:21}), true), "21 день", "21 days = 21 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.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "несколько секунд", "44 seconds = 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: 11}), true), "11 дней", "11 days = 11 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 21}), true), "21 день", "21 days = 21 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) {
"suffix" : function (test) {
test.expect(2);

@@ -206,10 +216,10 @@ test.equal(moment(30000).from(0), "через несколько секунд", "prefix");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "через несколько секунд", "in seconds");
test.equal(moment().add({d:5}).fromNow(), "через 5 дней", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "через несколько секунд", "in seconds");
test.equal(moment().add({d: 5}).fromNow(), "через 5 дней", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -228,8 +238,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
function makeFormat(d) {

@@ -250,7 +258,6 @@ return d.day() === 2 ? '[Во] dddd [в] LT' : '[В] dddd [в] LT';

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -283,7 +290,7 @@ function makeFormat(d) {

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -305,3 +312,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -318,3 +325,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -331,3 +338,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -345,3 +352,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -359,3 +366,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -373,3 +380,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -387,3 +394,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -401,3 +408,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -404,0 +411,0 @@

@@ -19,9 +19,9 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'január jan._február feb._marec mar._apríl apr._máj máj_jún jún._júl júl._august aug._september sep._október okt._november nov._december dec.'.split("_");
var tests = 'január jan._február feb._marec mar._apríl apr._máj máj_jún jún._júl júl._august aug._september sep._október okt._november nov._december dec.'.split("_"), i;
function equalTest(input, mmm, monthIndex) {
test.equal(moment(input, mmm).month(), monthIndex, input + ' should be month ' + (monthIndex + 1));
}
for (var i = 0; i < 12; i++) {
for (i = 0; i < 12; i++) {
tests[i] = tests[i].split(' ');

@@ -40,3 +40,3 @@ equalTest(tests[i][0], 'MMM', i);

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -75,3 +75,3 @@ var a = [

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -115,6 +115,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'január jan_február feb_marec mar_apríl apr_máj máj_jún jún_júl júl_august aug_september sep_október okt_november nov_december dec'.split("_");
var i;
var expected = 'január jan_február feb_marec mar_apríl apr_máj máj_jún jún_júl júl_august aug_september sep_október okt_november nov_december dec'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -126,6 +125,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'nedeľa ne ne_pondelok po po_utorok ut ut_streda st st_štvrtok št št_piatok pi pi_sobota so so'.split("_");
var i;
var expected = 'nedeľa ne ne_pondelok po po_utorok ut ut_streda st st_štvrtok št št_piatok pi pi_sobota so so'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -137,39 +135,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "pár sekúnd", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minúta", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minúta", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minúty", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minút", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "hodina", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "hodina", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 hodiny", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 hodín", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 hodín", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "deň", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "deň", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dni", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "deň", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dní", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dní", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "mesiac", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "mesiac", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "mesiac", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 mesiace", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 mesiace", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mesiace", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "mesiac", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mesiacov", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mesiacov", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "rok", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "rok", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 roky", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "rok", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 rokov", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "pár sekúnd", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "minúta", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "minúta", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 minúty", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 minút", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "hodina", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "hodina", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 hodiny", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 hodín", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 hodín", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "deň", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "deň", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 dni", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "deň", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 dní", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 dní", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "mesiac", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "mesiac", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "mesiac", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 mesiace", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 mesiace", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 mesiace", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "mesiac", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 mesiacov", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 mesiacov", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "rok", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "rok", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 roky", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "rok", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 rokov", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -181,3 +179,3 @@ test.equal(moment(30000).from(0), "za pár sekúnd", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -188,45 +186,45 @@ test.equal(moment().fromNow(), "pred pár sekundami", "now from now should display as in the past");

"fromNow (future)" : function(test) {
"fromNow (future)" : function (test) {
test.expect(16);
test.equal(moment().add({s:30}).fromNow(), "za pár sekúnd", "in a few seconds");
test.equal(moment().add({m:1}).fromNow(), "za minútu", "in a minute");
test.equal(moment().add({m:3}).fromNow(), "za 3 minúty", "in 3 minutes");
test.equal(moment().add({m:10}).fromNow(), "za 10 minút", "in 10 minutes");
test.equal(moment().add({h:1}).fromNow(), "za hodinu", "in an hour");
test.equal(moment().add({h:3}).fromNow(), "za 3 hodiny", "in 3 hours");
test.equal(moment().add({h:10}).fromNow(), "za 10 hodín", "in 10 hours");
test.equal(moment().add({d:1}).fromNow(), "za deň", "in a day");
test.equal(moment().add({d:3}).fromNow(), "za 3 dni", "in 3 days");
test.equal(moment().add({d:10}).fromNow(), "za 10 dní", "in 10 days");
test.equal(moment().add({M:1}).fromNow(), "za mesiac", "in a month");
test.equal(moment().add({M:3}).fromNow(), "za 3 mesiace", "in 3 months");
test.equal(moment().add({M:10}).fromNow(), "za 10 mesiacov", "in 10 months");
test.equal(moment().add({y:1}).fromNow(), "za rok", "in a year");
test.equal(moment().add({y:3}).fromNow(), "za 3 roky", "in 3 years");
test.equal(moment().add({y:10}).fromNow(), "za 10 rokov", "in 10 years");
test.equal(moment().add({s: 30}).fromNow(), "za pár sekúnd", "in a few seconds");
test.equal(moment().add({m: 1}).fromNow(), "za minútu", "in a minute");
test.equal(moment().add({m: 3}).fromNow(), "za 3 minúty", "in 3 minutes");
test.equal(moment().add({m: 10}).fromNow(), "za 10 minút", "in 10 minutes");
test.equal(moment().add({h: 1}).fromNow(), "za hodinu", "in an hour");
test.equal(moment().add({h: 3}).fromNow(), "za 3 hodiny", "in 3 hours");
test.equal(moment().add({h: 10}).fromNow(), "za 10 hodín", "in 10 hours");
test.equal(moment().add({d: 1}).fromNow(), "za deň", "in a day");
test.equal(moment().add({d: 3}).fromNow(), "za 3 dni", "in 3 days");
test.equal(moment().add({d: 10}).fromNow(), "za 10 dní", "in 10 days");
test.equal(moment().add({M: 1}).fromNow(), "za mesiac", "in a month");
test.equal(moment().add({M: 3}).fromNow(), "za 3 mesiace", "in 3 months");
test.equal(moment().add({M: 10}).fromNow(), "za 10 mesiacov", "in 10 months");
test.equal(moment().add({y: 1}).fromNow(), "za rok", "in a year");
test.equal(moment().add({y: 3}).fromNow(), "za 3 roky", "in 3 years");
test.equal(moment().add({y: 10}).fromNow(), "za 10 rokov", "in 10 years");
test.done();
},
"fromNow (past)" : function(test) {
"fromNow (past)" : function (test) {
test.expect(16);
test.equal(moment().subtract({s:30}).fromNow(), "pred pár sekundami", "a few seconds ago");
test.equal(moment().subtract({m:1}).fromNow(), "pred minútou", "a minute ago");
test.equal(moment().subtract({m:3}).fromNow(), "pred 3 minútami", "3 minutes ago");
test.equal(moment().subtract({m:10}).fromNow(), "pred 10 minútami", "10 minutes ago");
test.equal(moment().subtract({h:1}).fromNow(), "pred hodinou", "an hour ago");
test.equal(moment().subtract({h:3}).fromNow(), "pred 3 hodinami", "3 hours ago");
test.equal(moment().subtract({h:10}).fromNow(), "pred 10 hodinami", "10 hours ago");
test.equal(moment().subtract({d:1}).fromNow(), "pred dňom", "a day ago");
test.equal(moment().subtract({d:3}).fromNow(), "pred 3 dňami", "3 days ago");
test.equal(moment().subtract({d:10}).fromNow(), "pred 10 dňami", "10 days ago");
test.equal(moment().subtract({M:1}).fromNow(), "pred mesiacom", "a month ago");
test.equal(moment().subtract({M:3}).fromNow(), "pred 3 mesiacmi", "3 months ago");
test.equal(moment().subtract({M:10}).fromNow(), "pred 10 mesiacmi", "10 months ago");
test.equal(moment().subtract({y:1}).fromNow(), "pred rokom", "a year ago");
test.equal(moment().subtract({y:3}).fromNow(), "pred 3 rokmi", "3 years ago");
test.equal(moment().subtract({y:10}).fromNow(), "pred 10 rokmi", "10 years ago");
test.equal(moment().subtract({s: 30}).fromNow(), "pred pár sekundami", "a few seconds ago");
test.equal(moment().subtract({m: 1}).fromNow(), "pred minútou", "a minute ago");
test.equal(moment().subtract({m: 3}).fromNow(), "pred 3 minútami", "3 minutes ago");
test.equal(moment().subtract({m: 10}).fromNow(), "pred 10 minútami", "10 minutes ago");
test.equal(moment().subtract({h: 1}).fromNow(), "pred hodinou", "an hour ago");
test.equal(moment().subtract({h: 3}).fromNow(), "pred 3 hodinami", "3 hours ago");
test.equal(moment().subtract({h: 10}).fromNow(), "pred 10 hodinami", "10 hours ago");
test.equal(moment().subtract({d: 1}).fromNow(), "pred dňom", "a day ago");
test.equal(moment().subtract({d: 3}).fromNow(), "pred 3 dňami", "3 days ago");
test.equal(moment().subtract({d: 10}).fromNow(), "pred 10 dňami", "10 days ago");
test.equal(moment().subtract({M: 1}).fromNow(), "pred mesiacom", "a month ago");
test.equal(moment().subtract({M: 3}).fromNow(), "pred 3 mesiacmi", "3 months ago");
test.equal(moment().subtract({M: 10}).fromNow(), "pred 10 mesiacmi", "10 months ago");
test.equal(moment().subtract({y: 1}).fromNow(), "pred rokom", "a year ago");
test.equal(moment().subtract({y: 3}).fromNow(), "pred 3 rokmi", "3 years ago");
test.equal(moment().subtract({y: 10}).fromNow(), "pred 10 rokmi", "10 years ago");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -245,16 +243,31 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
for (var i = 2; i < 7; i++) {
var m = moment().add({ d: i });
var nextDay = '';
var i, m, nextDay;
for (i = 2; i < 7; i++) {
m = moment().add({ d: i });
nextDay = '';
switch (m.day()) {
case 0: nextDay = 'v nedeľu'; break;
case 1: nextDay = 'v pondelok'; break;
case 2: nextDay = 'v utorok'; break;
case 3: nextDay = 'v stredu'; break;
case 4: nextDay = 'vo štvrtok'; break;
case 5: nextDay = 'v piatok'; break;
case 6: nextDay = 'v sobotu'; break;
case 0:
nextDay = 'v nedeľu';
break;
case 1:
nextDay = 'v pondelok';
break;
case 2:
nextDay = 'v utorok';
break;
case 3:
nextDay = 'v stredu';
break;
case 4:
nextDay = 'vo štvrtok';
break;
case 5:
nextDay = 'v piatok';
break;
case 6:
nextDay = 'v sobotu';
break;
}

@@ -270,16 +283,31 @@ test.equal(m.calendar(), m.format('[' + nextDay + '] [o] LT'), "Today + " + i + " days current time");

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
for (var i = 2; i < 7; i++) {
var m = moment().subtract({ d: i });
var lastDay = '';
var i, m, lastDay;
for (i = 2; i < 7; i++) {
m = moment().subtract({ d: i });
lastDay = '';
switch (m.day()) {
case 0: lastDay = 'minulú nedeľu'; break;
case 1: lastDay = 'minulý pondelok'; break;
case 2: lastDay = 'minulý utorok'; break;
case 3: lastDay = 'minulú stredu'; break;
case 4: lastDay = 'minulý štvrtok'; break;
case 5: lastDay = 'minulý piatok'; break;
case 6: lastDay = 'minulú sobotu'; break;
case 0:
lastDay = 'minulú nedeľu';
break;
case 1:
lastDay = 'minulý pondelok';
break;
case 2:
lastDay = 'minulý utorok';
break;
case 3:
lastDay = 'minulú stredu';
break;
case 4:
lastDay = 'minulý štvrtok';
break;
case 5:
lastDay = 'minulý piatok';
break;
case 6:
lastDay = 'minulú sobotu';
break;
}

@@ -295,6 +323,6 @@ test.equal(m.calendar(), m.format('[' + lastDay + '] [o] LT'), "Today - " + i + " days current time");

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -312,3 +340,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"humanize duration" : function(test) {
"humanize duration" : function (test) {
test.expect(4);

@@ -325,3 +353,3 @@ test.equal(moment.duration(1, "minutes").humanize(), "minúta", "a minute (future)");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -338,3 +366,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -351,3 +379,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -365,3 +393,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -379,3 +407,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -393,3 +421,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -407,3 +435,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -421,10 +449,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52.', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");

@@ -431,0 +459,0 @@ test.done();

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'januar jan._februar feb._marec mar._april apr._maj maj_junij jun._julij jul._avgust avg._september sep._oktober okt._november nov._december dec.'.split("_");
var i;
var tests = 'januar jan._februar feb._marec mar._april apr._maj maj_junij jun._julij jul._avgust avg._september sep._oktober okt._november nov._december dec.'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -77,3 +76,3 @@ var a = [

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -117,6 +116,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1.', '1.');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'januar jan._februar feb._marec mar._april apr._maj maj._junij jun._julij jul._avgust avg._september sep._oktober okt._november nov._december dec.'.split("_");
var i;
var expected = 'januar jan._februar feb._marec mar._april apr._maj maj._junij jun._julij jul._avgust avg._september sep._oktober okt._november nov._december dec.'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -128,6 +126,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'nedelja ned. ne_ponedeljek pon. po_torek tor. to_sreda sre. sr_četrtek čet. če_petek pet. pe_sobota sob. so'.split("_");
var i;
var expected = 'nedelja ned. ne_ponedeljek pon. po_torek tor. to_sreda sre. sr_četrtek čet. če_petek pet. pe_sobota sob. so'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -139,39 +136,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "nekaj sekund", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "ena minuta", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "ena minuta", "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 minut", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "ena ura", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "ena ura", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 uri", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 ur", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 ur", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "en dan", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "en dan", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 dni", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "en dan", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 dni", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 dni", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "en mesec", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "en mesec", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "en mesec", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 meseca", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 meseca", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 mesece", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "en mesec", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 mesecev", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 mesecev", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "eno leto", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "eno leto", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 leti", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "eno leto", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 let", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "nekaj sekund", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "ena minuta", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "ena minuta", "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 minut", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "ena ura", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "ena ura", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 uri", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 ur", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 ur", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "en dan", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "en dan", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 dni", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "en dan", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 dni", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 dni", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "en mesec", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "en mesec", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "en mesec", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 meseca", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 meseca", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 mesece", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "en mesec", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 mesecev", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 mesecev", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "eno leto", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "eno leto", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 leti", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "eno leto", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 let", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -183,3 +180,3 @@ test.equal(moment(30000).from(0), "čez nekaj sekund", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -190,10 +187,10 @@ test.equal(moment().fromNow(), "nekaj sekund nazaj", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "čez nekaj sekund", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "čez 5 dni", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "čez nekaj sekund", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "čez 5 dni", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -212,22 +209,21 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
function makeFormat(d) {
switch (d.day()) {
case 0:
return '[v] [nedeljo] [ob] LT';
case 3:
return '[v] [sredo] [ob] LT';
case 6:
return '[v] [soboto] [ob] LT';
case 1:
case 2:
case 4:
case 5:
return '[v] dddd [ob] LT';
}
case 0:
return '[v] [nedeljo] [ob] LT';
case 3:
return '[v] [sredo] [ob] LT';
case 6:
return '[v] [soboto] [ob] LT';
case 1:
case 2:
case 4:
case 5:
return '[v] dddd [ob] LT';
}
}

@@ -246,20 +242,19 @@

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
function makeFormat(d) {
switch (d.day()) {
case 0:
case 3:
case 6:
return '[prejšnja] dddd [ob] LT';
case 1:
case 2:
case 4:
case 5:
return '[prejšnji] dddd [ob] LT';
}
case 0:
case 3:
case 6:
return '[prejšnja] dddd [ob] LT';
case 1:
case 2:
case 4:
case 5:
return '[prejšnji] dddd [ob] LT';
}
}

@@ -278,7 +273,7 @@

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -300,3 +295,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -313,3 +308,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -326,3 +321,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -340,3 +335,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -354,3 +349,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -368,3 +363,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -382,3 +377,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -396,3 +391,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -399,0 +394,0 @@

@@ -19,3 +19,3 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);

@@ -45,3 +45,3 @@

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -83,3 +83,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -124,3 +124,3 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);

@@ -137,3 +137,3 @@

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);

@@ -151,3 +151,3 @@

"from" : function(test) {
"from" : function (test) {
test.expect(30);

@@ -157,32 +157,32 @@

test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "disa seconda", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "një minut", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "një minut", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minutea", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minutea", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "një orë", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "një orë", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 orë", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 orë", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 orë", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "një ditë", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "një ditë", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 ditë", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "një ditë", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 ditë", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 ditë", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "një muaj", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "një muaj", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "një muaj", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 muaj", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 muaj", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 muaj", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "një muaj", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 muaj", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 muaj", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "një vit", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "një vit", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 vite", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "një vit", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 vite", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "disa seconda", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "një minut", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "një minut", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 minutea", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 minutea", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "një orë", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "një orë", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 orë", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 orë", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 orë", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "një ditë", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "një ditë", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 ditë", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "një ditë", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 ditë", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 ditë", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "një muaj", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "një muaj", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "një muaj", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 muaj", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 muaj", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 muaj", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "një muaj", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 muaj", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 muaj", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "një vit", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "një vit", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 vite", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "një vit", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 vite", "5 years = 5 years");

@@ -192,3 +192,3 @@ test.done();

"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -202,3 +202,3 @@

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -211,7 +211,7 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "në disa seconda", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "në 5 ditë", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "në disa seconda", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "në 5 ditë", "in 5 days");

@@ -221,3 +221,3 @@ test.done();

"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -237,3 +237,3 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);

@@ -254,3 +254,3 @@

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);

@@ -271,3 +271,3 @@

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);

@@ -292,3 +292,3 @@

// The week that contains Jan 4th is the first week of the year.
"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -305,3 +305,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -318,3 +318,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -332,3 +332,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -346,3 +346,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -360,3 +360,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -374,3 +374,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -388,10 +388,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52.', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1.', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1.', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2.', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2.', "Jan 15 2012 should be week 2");

@@ -398,0 +398,0 @@ test.done();

@@ -18,6 +18,5 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'januari jan_februari feb_mars mar_april apr_maj maj_juni jun_juli jul_augusti aug_september sep_oktober okt_november nov_december dec'.split("_");
var i;
var tests = 'januari jan_februari feb_mars mar_april apr_maj maj_juni jun_juli jul_augusti aug_september sep_oktober okt_november nov_december dec'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -40,3 +39,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -75,3 +74,3 @@ var a = [

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -115,6 +114,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1a', '1a');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'januari jan_februari feb_mars mar_april apr_maj maj_juni jun_juli jul_augusti aug_september sep_oktober okt_november nov_december dec'.split("_");
var i;
var expected = 'januari jan_februari feb_mars mar_april apr_maj maj_juni jun_juli jul_augusti aug_september sep_oktober okt_november nov_december dec'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -126,6 +124,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'söndag sön sö_måndag mån må_tisdag tis ti_onsdag ons on_torsdag tor to_fredag fre fr_lördag lör lö'.split("_");
var i;
var expected = 'söndag sön sö_måndag mån må_tisdag tis ti_onsdag ons on_torsdag tor to_fredag fre fr_lördag lör lö'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -137,39 +134,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "några sekunder", "44 sekunder = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "en minut", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "en minut", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuter", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuter", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "en timme", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "en timme", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 timmar", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 timmar", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 timmar", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "en dag", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "en dag", "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), "en dag", "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:26}), true), "en månad", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "en månad", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "en månad", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 månader", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 månader", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 månader", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "en månad", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 månader", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 månader", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "ett år", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "ett å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), "ett å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({s: 44}), true), "några sekunder", "44 sekunder = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "en minut", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "en minut", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 minuter", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 minuter", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "en timme", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "en timme", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 timmar", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 timmar", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 timmar", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "en dag", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "en dag", "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), "en dag", "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: 26}), true), "en månad", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "en månad", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "en månad", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 månader", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 månader", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 månader", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "en månad", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 månader", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 månader", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "ett år", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "ett å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), "ett å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) {
"suffix" : function (test) {
test.expect(2);

@@ -181,3 +178,3 @@ test.equal(moment(30000).from(0), "om några sekunder", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -188,10 +185,10 @@ test.equal(moment().fromNow(), "för några sekunder sedan", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "om några sekunder", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "om 5 dagar", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "om några sekunder", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "om 5 dagar", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -210,8 +207,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -228,8 +223,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -246,6 +239,6 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -267,3 +260,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -280,3 +273,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -293,3 +286,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -307,3 +300,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -321,3 +314,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -335,3 +328,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -349,3 +342,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -363,10 +356,10 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('w ww wo'), '52 52 52a', "Jan 1 2012 should be week 52");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1a' , "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1a' , "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2a' , "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2a' , "Jan 15 2012 should be week 2");
test.equal(moment([2012, 0, 2]).format('w ww wo'), '1 01 1a', "Jan 2 2012 should be week 1");
test.equal(moment([2012, 0, 8]).format('w ww wo'), '1 01 1a', "Jan 8 2012 should be week 1");
test.equal(moment([2012, 0, 9]).format('w ww wo'), '2 02 2a', "Jan 9 2012 should be week 2");
test.equal(moment([2012, 0, 15]).format('w ww wo'), '2 02 2a', "Jan 15 2012 should be week 2");

@@ -373,0 +366,0 @@ test.done();

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'มกราคม มกรา_กุมภาพันธ์ กุมภา_มีนาคม มีนา_เมษายน เมษา_พฤษภาคม พฤษภา_มิถุนายน มิถุนา_กรกฎาคม กรกฎา_สิงหาคม สิงหา_กันยายน กันยา_ตุลาคม ตุลา_พฤศจิกายน พฤศจิกา_ธันวาคม ธันวา'.split("_");
var i;
var tests = 'มกราคม มกรา_กุมภาพันธ์ กุมภา_มีนาคม มีนา_เมษายน เมษา_พฤษภาคม พฤษภา_มิถุนายน มิถุนา_กรกฎาคม กรกฎา_สิงหาคม สิงหา_กันยายน กันยา_ตุลาคม ตุลา_พฤศจิกายน พฤศจิกา_ธันวาคม ธันวา'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -78,7 +77,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'มกราคม มกรา_กุมภาพันธ์ กุมภา_มีนาคม มีนา_เมษายน เมษา_พฤษภาคม พฤษภา_มิถุนายน มิถุนา_กรกฎาคม กรกฎา_สิงหาคม สิงหา_กันยายน กันยา_ตุลาคม ตุลา_พฤศจิกายน พฤศจิกา_ธันวาคม ธันวา'.split("_");
var i;
var expected = 'มกราคม มกรา_กุมภาพันธ์ กุมภา_มีนาคม มีนา_เมษายน เมษา_พฤษภาคม พฤษภา_มิถุนายน มิถุนา_กรกฎาคม กรกฎา_สิงหาคม สิงหา_กันยายน กันยา_ตุลาคม ตุลา_พฤศจิกายน พฤศจิกา_ธันวาคม ธันวา'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -90,7 +88,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'อาทิตย์ อาทิตย์ อา._จันทร์ จันทร์ จ._อังคาร อังคาร อ._พุธ พุธ พ._พฤหัสบดี พฤหัส พฤ._ศุกร์ ศุกร์ ศ._เสาร์ เสาร์ ส.'.split("_");
var i;
var expected = 'อาทิตย์ อาทิตย์ อา._จันทร์ จันทร์ จ._อังคาร อังคาร อ._พุธ พุธ พ._พฤหัสบดี พฤหัส พฤ._ศุกร์ ศุกร์ ศ._เสาร์ เสาร์ ส.'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -102,40 +99,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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) {
"suffix" : function (test) {
test.expect(2);

@@ -147,3 +144,3 @@ test.equal(moment(30000).from(0), "อีก ไม่กี่วินาที", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -154,10 +151,10 @@ test.equal(moment().fromNow(), "ไม่กี่วินาทีที่แล้ว", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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({s: 30}).fromNow(), "อีก ไม่กี่วินาที", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "อีก 5 วัน", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -176,8 +173,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -194,8 +189,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -212,7 +205,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -233,3 +226,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -246,3 +239,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(6);

@@ -260,6 +253,6 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);
test.equal(moment([2007, 11, 30]).week(), 1, "Dec 30 2007 should be week 1");
test.equal(moment([2007, 11, 29]).week(), 52, "Dec 29 2007 should be week 52");
test.equal(moment([2008, 0, 1]).week(), 1, "Jan 1 2008 should be week 1");

@@ -274,3 +267,3 @@ test.equal(moment([2008, 0, 5]).week(), 1, "Jan 5 2008 should be week 1");

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -288,3 +281,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -302,3 +295,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -316,3 +309,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -329,3 +322,3 @@

"weeks year starting sunday format" : function(test) {
"weeks year starting sunday format" : function (test) {
test.expect(5);

@@ -332,0 +325,0 @@

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'Ocak Oca_Şubat Şub_Mart Mar_Nisan Nis_Mayıs May_Haziran Haz_Temmuz Tem_Ağustos Ağu_Eylül Eyl_Ekim Eki_Kasım Kas_Aralık Ara'.split("_");
var i;
var tests = 'Ocak Oca_Şubat Şub_Mart Mar_Nisan Nis_Mayıs May_Haziran Haz_Temmuz Tem_Ağustos Ağu_Eylül Eyl_Ekim Eki_Kasım Kas_Aralık Ara'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {

@@ -89,3 +88,3 @@ var a = [

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -130,7 +129,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'Ocak Oca_Şubat Şub_Mart Mar_Nisan Nis_Mayıs May_Haziran Haz_Temmuz Tem_Ağustos Ağu_Eylül Eyl_Ekim Eki_Kasım Kas_Aralık Ara'.split("_");
var i;
var expected = 'Ocak Oca_Şubat Şub_Mart Mar_Nisan Nis_Mayıs May_Haziran Haz_Temmuz Tem_Ağustos Ağu_Eylül Eyl_Ekim Eki_Kasım Kas_Aralık Ara'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -142,7 +140,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'Pazar Paz Pz_Pazartesi Pts Pt_Salı Sal Sa_Çarşamba Çar Ça_Perşembe Per Pe_Cuma Cum Cu_Cumartesi Cts Ct'.split("_");
var i;
var expected = 'Pazar Paz Pz_Pazartesi Pts Pt_Salı Sal Sa_Çarşamba Çar Ça_Perşembe Per Pe_Cuma Cum Cu_Cumartesi Cts Ct'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -154,39 +151,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "birkaç saniye", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "bir dakika", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "bir dakika", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 dakika", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 dakika", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "bir saat", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "bir saat", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 saat", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 saat", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 saat", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "bir gün", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "bir gün", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 gün", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "bir gün", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 gün", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 gün", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "bir ay", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "bir ay", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "bir ay", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 ay", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 ay", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 ay", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "bir ay", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 ay", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 ay", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "bir yıl", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "bir yıl", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 yıl", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "bir yıl", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 yıl", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "birkaç saniye", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "bir dakika", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "bir dakika", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 dakika", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 dakika", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "bir saat", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "bir saat", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 saat", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 saat", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 saat", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "bir gün", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "bir gün", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 gün", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "bir gün", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 gün", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 gün", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "bir ay", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "bir ay", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "bir ay", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 ay", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 ay", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 ay", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "bir ay", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 ay", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 ay", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "bir yıl", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "bir yıl", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 yıl", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "bir yıl", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 yıl", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -198,3 +195,3 @@ test.equal(moment(30000).from(0), "birkaç saniye sonra", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -205,10 +202,10 @@ test.equal(moment().fromNow(), "birkaç saniye önce", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "birkaç saniye sonra", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "5 gün sonra", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "birkaç saniye sonra", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "5 gün sonra", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -227,8 +224,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -245,8 +240,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -263,7 +256,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -285,3 +278,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -298,3 +291,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -311,3 +304,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -325,3 +318,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -339,3 +332,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -353,3 +346,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -367,3 +360,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -381,3 +374,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -384,0 +377,0 @@

@@ -17,7 +17,6 @@ // moment.js Morocco Central Atlas Tamaziɣt in Latin (tzm-la) tests

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'innayr innayr_brˤayrˤ brˤayrˤ_marˤsˤ marˤsˤ_ibrir ibrir_mayyw mayyw_ywnyw ywnyw_ywlywz ywlywz_ɣwšt ɣwšt_šwtanbir šwtanbir_ktˤwbrˤ ktˤwbrˤ_nwwanbir nwwanbir_dwjnbir dwjnbir'.split("_");
var i;
var tests = 'innayr innayr_brˤayrˤ brˤayrˤ_marˤsˤ marˤsˤ_ibrir ibrir_mayyw mayyw_ywnyw ywnyw_ywlywz ywlywz_ɣwšt ɣwšt_šwtanbir šwtanbir_ktˤwbrˤ ktˤwbrˤ_nwwanbir nwwanbir_dwjnbir dwjnbir'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -40,3 +39,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -76,3 +75,3 @@

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -117,7 +116,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'innayr innayr_brˤayrˤ brˤayrˤ_marˤsˤ marˤsˤ_ibrir ibrir_mayyw mayyw_ywnyw ywnyw_ywlywz ywlywz_ɣwšt ɣwšt_šwtanbir šwtanbir_ktˤwbrˤ ktˤwbrˤ_nwwanbir nwwanbir_dwjnbir dwjnbir'.split("_");
var i;
var expected = 'innayr innayr_brˤayrˤ brˤayrˤ_marˤsˤ marˤsˤ_ibrir ibrir_mayyw mayyw_ywnyw ywnyw_ywlywz ywlywz_ɣwšt ɣwšt_šwtanbir šwtanbir_ktˤwbrˤ ktˤwbrˤ_nwwanbir nwwanbir_dwjnbir dwjnbir'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -129,7 +127,6 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'asamas asamas asamas_aynas aynas aynas_asinas asinas asinas_akras akras akras_akwas akwas akwas_asimwas asimwas asimwas_asiḍyas asiḍyas asiḍyas'.split("_");
var i;
var expected = 'asamas asamas asamas_aynas aynas aynas_asinas asinas asinas_akras akras akras_akwas akwas akwas_asimwas asimwas asimwas_asiḍyas asiḍyas asiḍyas'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -141,40 +138,40 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "imik", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s:45}), true), "minuḍ", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:89}), true), "minuḍ", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "2 minuḍ", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:44}), true), "44 minuḍ", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m:45}), true), "saɛa", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:89}), true), "saɛa", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m:90}), true), "2 tassaɛin", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:5}), true), "5 tassaɛin", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:21}), true), "21 tassaɛin", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h:22}), true), "ass", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:35}), true), "ass", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h:36}), true), "2 ossan", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:1}), true), "ass", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d:5}), true), "5 ossan", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 ossan", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "ayowr", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "ayowr", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "ayowr", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:46}), true), "2 iyyirn", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:74}), true), "2 iyyirn", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:76}), true), "3 iyyirn", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M:1}), true), "ayowr", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M:5}), true), "5 iyyirn", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:344}), true), "11 iyyirn", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d:345}), true), "asgas", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:547}), true), "asgas", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d:548}), true), "2 isgasn", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y:1}), true), "asgas", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y:5}), true), "5 isgasn", "5 years = 5 years");
test.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "imik", "44 seconds = a few seconds");
test.equal(start.from(moment([2007, 1, 28]).add({s: 45}), true), "minuḍ", "45 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 89}), true), "minuḍ", "89 seconds = a minute");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "2 minuḍ", "90 seconds = 2 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 44}), true), "44 minuḍ", "44 minutes = 44 minutes");
test.equal(start.from(moment([2007, 1, 28]).add({m: 45}), true), "saɛa", "45 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 89}), true), "saɛa", "89 minutes = an hour");
test.equal(start.from(moment([2007, 1, 28]).add({m: 90}), true), "2 tassaɛin", "90 minutes = 2 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 5}), true), "5 tassaɛin", "5 hours = 5 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 21}), true), "21 tassaɛin", "21 hours = 21 hours");
test.equal(start.from(moment([2007, 1, 28]).add({h: 22}), true), "ass", "22 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 35}), true), "ass", "35 hours = a day");
test.equal(start.from(moment([2007, 1, 28]).add({h: 36}), true), "2 ossan", "36 hours = 2 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 1}), true), "ass", "1 day = a day");
test.equal(start.from(moment([2007, 1, 28]).add({d: 5}), true), "5 ossan", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 ossan", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "ayowr", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "ayowr", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "ayowr", "45 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 46}), true), "2 iyyirn", "46 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 74}), true), "2 iyyirn", "75 days = 2 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 76}), true), "3 iyyirn", "76 days = 3 months");
test.equal(start.from(moment([2007, 1, 28]).add({M: 1}), true), "ayowr", "1 month = a month");
test.equal(start.from(moment([2007, 1, 28]).add({M: 5}), true), "5 iyyirn", "5 months = 5 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 344}), true), "11 iyyirn", "344 days = 11 months");
test.equal(start.from(moment([2007, 1, 28]).add({d: 345}), true), "asgas", "345 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 547}), true), "asgas", "547 days = a year");
test.equal(start.from(moment([2007, 1, 28]).add({d: 548}), true), "2 isgasn", "548 days = 2 years");
test.equal(start.from(moment([2007, 1, 28]).add({y: 1}), true), "asgas", "1 year = a year");
test.equal(start.from(moment([2007, 1, 28]).add({y: 5}), true), "5 isgasn", "5 years = 5 years");
test.done();
},
"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -187,3 +184,3 @@

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -195,11 +192,11 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "dadkh s yan imik", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "dadkh s yan 5 ossan", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "dadkh s yan imik", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "dadkh s yan 5 ossan", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -218,8 +215,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -236,5 +231,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i, m;
for (i = 2; i < 7; i++) {

@@ -251,6 +247,6 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -272,3 +268,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -285,3 +281,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -298,3 +294,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -312,3 +308,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -326,3 +322,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -340,3 +336,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(5);

@@ -353,3 +349,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -366,3 +362,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -369,0 +365,0 @@

@@ -17,6 +17,5 @@ // moment.js Morocco Central Atlas Tamaziɣt (tzm) tests

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'ⵉⵏⵏⴰⵢⵔ ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ ⴷⵓⵊⵏⴱⵉⵔ'.split("_");
var i;
var tests = 'ⵉⵏⵏⴰⵢⵔ ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ ⴷⵓⵊⵏⴱⵉⵔ'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -39,3 +38,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -74,3 +73,3 @@ var a = [

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -114,6 +113,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1', '1');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'ⵉⵏⵏⴰⵢⵔ ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ ⴷⵓⵊⵏⴱⵉⵔ'.split("_");
var i;
var expected = 'ⵉⵏⵏⴰⵢⵔ ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ ⴷⵓⵊⵏⴱⵉⵔ'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -125,6 +123,5 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'ⴰⵙⴰⵎⴰⵙ ⴰⵙⴰⵎⴰⵙ ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ ⴰⵢⵏⴰⵙ ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ ⴰⵙⵉⵏⴰⵙ ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ ⴰⴽⵔⴰⵙ ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ ⴰⴽⵡⴰⵙ ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ ⴰⵙⵉⵎⵡⴰⵙ ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ ⴰⵙⵉⴹⵢⴰⵙ ⴰⵙⵉⴹⵢⴰⵙ'.split("_");
var i;
var expected = 'ⴰⵙⴰⵎⴰⵙ ⴰⵙⴰⵎⴰⵙ ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ ⴰⵢⵏⴰⵙ ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ ⴰⵙⵉⵏⴰⵙ ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ ⴰⴽⵔⴰⵙ ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ ⴰⴽⵡⴰⵙ ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ ⴰⵙⵉⵎⵡⴰⵙ ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ ⴰⵙⵉⴹⵢⴰⵙ ⴰⵙⵉⴹⵢⴰⵙ'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -136,39 +133,39 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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 oⵙⵙⴰⵏ", "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 oⵙⵙⴰⵏ", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:25}), true), "25 oⵙⵙⴰⵏ", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:26}), true), "ⴰⵢoⵓⵔ", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:30}), true), "ⴰⵢoⵓⵔ", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d:45}), true), "ⴰⵢoⵓⵔ", "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), "ⴰⵢoⵓⵔ", "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.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 oⵙⵙⴰⵏ", "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 oⵙⵙⴰⵏ", "5 days = 5 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 25}), true), "25 oⵙⵙⴰⵏ", "25 days = 25 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 26}), true), "ⴰⵢoⵓⵔ", "26 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 30}), true), "ⴰⵢoⵓⵔ", "30 days = a month");
test.equal(start.from(moment([2007, 1, 28]).add({d: 45}), true), "ⴰⵢoⵓⵔ", "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), "ⴰⵢoⵓⵔ", "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) {
"suffix" : function (test) {
test.expect(2);

@@ -180,3 +177,3 @@ test.equal(moment(30000).from(0), "ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ ⵉⵎⵉⴽ", "prefix");

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -187,10 +184,10 @@ test.equal(moment().fromNow(), "ⵢⴰⵏ ⵉⵎⵉⴽ", "now from now should display as in the past");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ ⵉⵎⵉⴽ", "in a few seconds");
test.equal(moment().add({d:5}).fromNow(), "ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ 5 oⵙⵙⴰⵏ", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ ⵉⵎⵉⴽ", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ 5 oⵙⵙⴰⵏ", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -209,8 +206,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -227,5 +222,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i, m;
for (i = 2; i < 7; i++) {

@@ -242,6 +238,6 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -263,3 +259,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -276,3 +272,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -289,3 +285,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -303,3 +299,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -317,3 +313,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -331,3 +327,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(5);

@@ -344,3 +340,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -357,3 +353,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -360,0 +356,0 @@

@@ -19,6 +19,5 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = 'січень січ_лютий лют_березень бер_квітень кві_травень тра_червень чер_липень лип_серпень сер_вересень вер_жовтень жов_листопад лис_грудень гру'.split("_");
var i;
var tests = 'січень січ_лютий лют_березень бер_квітень квіт_травень трав_червень черв_липень лип_серпень серп_вересень вер_жовтень жовт_листопад лист_грудень груд'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -41,3 +40,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(18);

@@ -72,3 +71,3 @@ var a = [

"format ordinal" : function(test) {
"format ordinal" : function (test) {
test.expect(31);

@@ -112,6 +111,5 @@ test.equal(moment([2011, 0, 1]).format('DDDo'), '1-й', '1-й');

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = 'січень січ_лютий лют_березень бер_квітень кві_травень тра_червень чер_липень лип_серпень сер_вересень вер_жовтень жов_листопад лис_грудень гру'.split("_");
var i;
var expected = 'січень січ_лютий лют_березень бер_квітень квіт_травень трав_червень черв_липень лип_серпень серп_вересень вер_жовтень жовт_листопад лист_грудень груд'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -123,3 +121,3 @@ test.equal(moment([2011, i, 1]).format('MMMM MMM'), expected[i], expected[i]);

"format month case" : function(test) {
"format month case" : function (test) {
test.expect(24);

@@ -129,4 +127,3 @@ var months = {

'accusative': 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split('_')
};
var i;
}, i;
for (i = 0; i < 12; i++) {

@@ -139,6 +136,5 @@ test.equal(moment([2011, i, 1]).format('D MMMM'), '1 ' + months.accusative[i], '1 ' + months.accusative[i]);

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = 'неділя нед нд_понеділок пон пн_вівторок вів вт_середа срд ср_четвер чет чт_п’ятниця птн пт_субота суб сб'.split("_");
var i;
var expected = 'неділя нед нд_понеділок пон пн_вівторок вів вт_середа сер ср_четвер чет чт_п’ятниця п’ят пт_субота суб сб'.split("_"), i;
for (i = 0; i < expected.length; i++) {

@@ -150,41 +146,41 @@ test.equal(moment([2011, 0, 2 + i]).format('dddd ddd dd'), expected[i], expected[i]);

"from" : function(test) {
"from" : function (test) {
test.expect(32);
var start = moment([2007, 1, 28]);
test.equal(start.from(moment([2007, 1, 28]).add({s:44}), true), "декілька секунд", "44 seconds = 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:11}), true), "11 днів", "11 days = 11 days");
test.equal(start.from(moment([2007, 1, 28]).add({d:21}), true), "21 день", "21 days = 21 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.equal(start.from(moment([2007, 1, 28]).add({s: 44}), true), "декілька секунд", "44 seconds = 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: 11}), true), "11 днів", "11 days = 11 days");
test.equal(start.from(moment([2007, 1, 28]).add({d: 21}), true), "21 день", "21 days = 21 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) {
"suffix" : function (test) {
test.expect(2);

@@ -196,10 +192,10 @@ test.equal(moment(30000).from(0), "за декілька секунд", "prefix");

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
test.equal(moment().add({s:30}).fromNow(), "за декілька секунд", "in seconds");
test.equal(moment().add({d:5}).fromNow(), "за 5 днів", "in 5 days");
test.equal(moment().add({s: 30}).fromNow(), "за декілька секунд", "in seconds");
test.equal(moment().add({d: 5}).fromNow(), "за 5 днів", "in 5 days");
test.done();
},
"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(7);

@@ -220,8 +216,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -238,7 +232,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -270,6 +263,6 @@ function makeFormat(d) {

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -284,3 +277,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

test.equal(weeksFromNow.calendar(), weeksFromNow.format('L'), "in 2 weeks");
test.done();
test.done();
},

@@ -291,3 +284,3 @@

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -304,3 +297,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(5);

@@ -317,3 +310,3 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -331,3 +324,3 @@

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -345,3 +338,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -359,3 +352,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -373,3 +366,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(6);

@@ -387,3 +380,3 @@

"weeks year starting sunday formatted" : function(test) {
"weeks year starting sunday formatted" : function (test) {
test.expect(5);

@@ -390,0 +383,0 @@

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = '一月 1月_二月 2月_三月 3月_四月 4月_五月 5月_六月 6月_七月 7月_八月 8月_九月 9月_十月 10月_十一月 11月_十二月 12月'.split("_");
var i;
var tests = '一月 1月_二月 2月_三月 3月_四月 4月_五月 5月_六月 6月_七月 7月_八月 8月_九月 9月_十月 10月_十一月 11月_十二月 12月'.split("_"), i;

@@ -44,3 +43,3 @@ function equalTest(input, mmm, i) {

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -82,7 +81,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = '一月 1月_二月 2月_三月 3月_四月 4月_五月 5月_六月 6月_七月 7月_八月 8月_九月 9月_十月 10月_十一月 11月_十二月 12月'.split("_");
var i;
var expected = '一月 1月_二月 2月_三月 3月_四月 4月_五月 5月_六月 6月_七月 7月_八月 8月_九月 9月_十月 10月_十一月 11月_十二月 12月'.split("_"), i;

@@ -96,7 +94,6 @@ for (i = 0; i < expected.length; i++) {

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = '星期日 周日 日_星期一 周一 一_星期二 周二 二_星期三 周三 三_星期四 周四 四_星期五 周五 五_星期六 周六 六'.split("_");
var i;
var expected = '星期日 周日 日_星期一 周一 一_星期二 周二 二_星期三 周三 三_星期四 周四 四_星期五 周五 五_星期六 周六 六'.split("_"), i;

@@ -110,36 +107,36 @@ for (i = 0; i < expected.length; i++) {

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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");

@@ -149,3 +146,3 @@ test.done();

"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -159,3 +156,3 @@

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -168,7 +165,7 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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({s: 30}).fromNow(), "几秒内", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "5天内", "in 5 days");

@@ -178,3 +175,3 @@ test.done();

"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -193,8 +190,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -211,7 +206,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;

@@ -229,7 +223,7 @@ for (i = 2; i < 7; i++) {

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -247,3 +241,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"meridiem" : function(test) {
"meridiem" : function (test) {
test.expect(10);

@@ -269,3 +263,3 @@

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -282,3 +276,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(6);

@@ -296,6 +290,6 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);
test.equal(moment([2007, 11, 30]).week(), 1, "Dec 30 2007 should be week 1");
test.equal(moment([2007, 11, 29]).week(), 52, "Dec 29 2007 should be week 52");
test.equal(moment([2008, 0, 1]).week(), 1, "Jan 1 2008 should be week 1");

@@ -310,3 +304,3 @@ test.equal(moment([2008, 0, 5]).week(), 1, "Jan 5 2008 should be week 1");

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -324,3 +318,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -338,3 +332,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -352,3 +346,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -365,3 +359,3 @@

"weeks year starting sunday format" : function(test) {
"weeks year starting sunday format" : function (test) {
test.expect(5);

@@ -368,0 +362,0 @@

@@ -19,7 +19,6 @@ var moment = require("../../moment");

"parse" : function(test) {
"parse" : function (test) {
test.expect(96);
var tests = '一月 1月_二月 2月_三月 3月_四月 4月_五月 5月_六月 6月_七月 7月_八月 8月_九月 9月_十月 10月_十一月 11月_十二月 12月'.split("_");
var i;
var tests = '一月 1月_二月 2月_三月 3月_四月 4月_五月 5月_六月 6月_七月 7月_八月 8月_九月 9月_十月 10月_十一月 11月_十二月 12月'.split("_"), i;
function equalTest(input, mmm, i) {

@@ -42,3 +41,3 @@ test.equal(moment(input, mmm).month(), i, input + ' should be month ' + (i + 1));

"format" : function(test) {
"format" : function (test) {
test.expect(22);

@@ -80,7 +79,6 @@

"format month" : function(test) {
"format month" : function (test) {
test.expect(12);
var expected = '一月 1月_二月 2月_三月 3月_四月 4月_五月 5月_六月 6月_七月 7月_八月 8月_九月 9月_十月 10月_十一月 11月_十二月 12月'.split("_");
var i;
var expected = '一月 1月_二月 2月_三月 3月_四月 4月_五月 5月_六月 6月_七月 7月_八月 8月_九月 9月_十月 10月_十一月 11月_十二月 12月'.split("_"), i;

@@ -94,7 +92,6 @@ for (i = 0; i < expected.length; i++) {

"format week" : function(test) {
"format week" : function (test) {
test.expect(7);
var expected = '星期日 週日 日_星期一 週一 一_星期二 週二 二_星期三 週三 三_星期四 週四 四_星期五 週五 五_星期六 週六 六'.split("_");
var i;
var expected = '星期日 週日 日_星期一 週一 一_星期二 週二 二_星期三 週三 三_星期四 週四 四_星期五 週五 五_星期六 週六 六'.split("_"), i;

@@ -108,36 +105,36 @@ for (i = 0; i < expected.length; i++) {

"from" : function(test) {
"from" : function (test) {
test.expect(30);
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.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");

@@ -147,3 +144,3 @@ test.done();

"suffix" : function(test) {
"suffix" : function (test) {
test.expect(2);

@@ -157,3 +154,3 @@

"now from now" : function(test) {
"now from now" : function (test) {
test.expect(1);

@@ -166,7 +163,7 @@

"fromNow" : function(test) {
"fromNow" : function (test) {
test.expect(2);
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({s: 30}).fromNow(), "幾秒內", "in a few seconds");
test.equal(moment().add({d: 5}).fromNow(), "5天內", "in 5 days");

@@ -176,3 +173,3 @@ test.done();

"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -192,8 +189,6 @@

"calendar next week" : function(test) {
"calendar next week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -211,8 +206,6 @@ m = moment().add({ d: i });

"calendar last week" : function(test) {
"calendar last week" : function (test) {
test.expect(15);
var i;
var m;
var i, m;
for (i = 2; i < 7; i++) {

@@ -230,7 +223,7 @@ m = moment().subtract({ d: i });

"calendar all else" : function(test) {
"calendar all else" : function (test) {
test.expect(4);
var weeksAgo = moment().subtract({ w: 1 });
var weeksFromNow = moment().add({ w: 1 });
var weeksAgo = moment().subtract({ w: 1 }),
weeksFromNow = moment().add({ w: 1 });

@@ -249,3 +242,3 @@ test.equal(weeksAgo.calendar(), weeksAgo.format('L'), "1 week ago");

"meridiem" : function(test) {
"meridiem" : function (test) {
test.expect(10);

@@ -271,3 +264,3 @@

"weeks year starting sunday" : function(test) {
"weeks year starting sunday" : function (test) {
test.expect(5);

@@ -284,3 +277,3 @@

"weeks year starting monday" : function(test) {
"weeks year starting monday" : function (test) {
test.expect(6);

@@ -298,6 +291,6 @@

"weeks year starting tuesday" : function(test) {
"weeks year starting tuesday" : function (test) {
test.expect(6);
test.equal(moment([2007, 11, 30]).week(), 1, "Dec 30 2007 should be week 1");
test.equal(moment([2007, 11, 29]).week(), 52, "Dec 29 2007 should be week 52");
test.equal(moment([2008, 0, 1]).week(), 1, "Jan 1 2008 should be week 1");

@@ -312,3 +305,3 @@ test.equal(moment([2008, 0, 5]).week(), 1, "Jan 5 2008 should be week 1");

"weeks year starting wednesday" : function(test) {
"weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -326,3 +319,3 @@

"weeks year starting thursday" : function(test) {
"weeks year starting thursday" : function (test) {
test.expect(6);

@@ -340,3 +333,3 @@

"weeks year starting friday" : function(test) {
"weeks year starting friday" : function (test) {
test.expect(6);

@@ -354,3 +347,3 @@

"weeks year starting saturday" : function(test) {
"weeks year starting saturday" : function (test) {
test.expect(5);

@@ -367,3 +360,3 @@

"weeks year starting sunday format" : function(test) {
"weeks year starting sunday format" : function (test) {
test.expect(5);

@@ -370,0 +363,0 @@

var moment = require("../../moment");
exports.add = {
"add short" : function(test) {
"add short" : function (test) {
test.expect(12);
var a = moment();
var a = moment(), b, c;
a.year(2011);

@@ -16,13 +16,13 @@ a.month(9);

test.equal(a.add({ms:50}).milliseconds(), 550, 'Add milliseconds');
test.equal(a.add({s:1}).seconds(), 9, 'Add seconds');
test.equal(a.add({m:1}).minutes(), 8, 'Add minutes');
test.equal(a.add({h:1}).hours(), 7, 'Add hours');
test.equal(a.add({d:1}).date(), 13, 'Add date');
test.equal(a.add({w:1}).date(), 20, 'Add week');
test.equal(a.add({M:1}).month(), 10, 'Add month');
test.equal(a.add({y:1}).year(), 2012, 'Add year');
test.equal(a.add({ms: 50}).milliseconds(), 550, 'Add milliseconds');
test.equal(a.add({s: 1}).seconds(), 9, 'Add seconds');
test.equal(a.add({m: 1}).minutes(), 8, 'Add minutes');
test.equal(a.add({h: 1}).hours(), 7, 'Add hours');
test.equal(a.add({d: 1}).date(), 13, 'Add date');
test.equal(a.add({w: 1}).date(), 20, 'Add week');
test.equal(a.add({M: 1}).month(), 10, 'Add month');
test.equal(a.add({y: 1}).year(), 2012, 'Add year');
var b = moment([2010, 0, 31]).add({M:1});
var c = moment([2010, 1, 28]).subtract({M:1});
b = moment([2010, 0, 31]).add({M: 1});
c = moment([2010, 1, 28]).subtract({M: 1});

@@ -36,3 +36,3 @@ test.equal(b.month(), 1, 'add month, jan 31st to feb 28th');

"add long" : function(test) {
"add long" : function (test) {
test.expect(8);

@@ -49,14 +49,14 @@

test.equal(a.add({milliseconds:50}).milliseconds(), 550, 'Add milliseconds');
test.equal(a.add({seconds:1}).seconds(), 9, 'Add seconds');
test.equal(a.add({minutes:1}).minutes(), 8, 'Add minutes');
test.equal(a.add({hours:1}).hours(), 7, 'Add hours');
test.equal(a.add({days:1}).date(), 13, 'Add date');
test.equal(a.add({weeks:1}).date(), 20, 'Add week');
test.equal(a.add({months:1}).month(), 10, 'Add month');
test.equal(a.add({years:1}).year(), 2012, 'Add year');
test.equal(a.add({milliseconds: 50}).milliseconds(), 550, 'Add milliseconds');
test.equal(a.add({seconds: 1}).seconds(), 9, 'Add seconds');
test.equal(a.add({minutes: 1}).minutes(), 8, 'Add minutes');
test.equal(a.add({hours: 1}).hours(), 7, 'Add hours');
test.equal(a.add({days: 1}).date(), 13, 'Add date');
test.equal(a.add({weeks: 1}).date(), 20, 'Add week');
test.equal(a.add({months: 1}).month(), 10, 'Add month');
test.equal(a.add({years: 1}).year(), 2012, 'Add year');
test.done();
},
"add long singular" : function(test) {
"add long singular" : function (test) {
test.expect(8);

@@ -73,17 +73,17 @@

test.equal(a.add({millisecond:50}).milliseconds(), 550, 'Add milliseconds');
test.equal(a.add({second:1}).seconds(), 9, 'Add seconds');
test.equal(a.add({minute:1}).minutes(), 8, 'Add minutes');
test.equal(a.add({hour:1}).hours(), 7, 'Add hours');
test.equal(a.add({day:1}).date(), 13, 'Add date');
test.equal(a.add({week:1}).date(), 20, 'Add week');
test.equal(a.add({month:1}).month(), 10, 'Add month');
test.equal(a.add({year:1}).year(), 2012, 'Add year');
test.equal(a.add({millisecond: 50}).milliseconds(), 550, 'Add milliseconds');
test.equal(a.add({second: 1}).seconds(), 9, 'Add seconds');
test.equal(a.add({minute: 1}).minutes(), 8, 'Add minutes');
test.equal(a.add({hour: 1}).hours(), 7, 'Add hours');
test.equal(a.add({day: 1}).date(), 13, 'Add date');
test.equal(a.add({week: 1}).date(), 20, 'Add week');
test.equal(a.add({month: 1}).month(), 10, 'Add month');
test.equal(a.add({year: 1}).year(), 2012, 'Add year');
test.done();
},
"add string long" : function(test) {
"add string long" : function (test) {
test.expect(9);
var a = moment();
var a = moment(), b;
a.year(2011);

@@ -97,3 +97,3 @@ a.month(9);

var b = a.clone();
b = a.clone();

@@ -112,6 +112,6 @@ test.equal(a.add('millisecond', 50).milliseconds(), 550, 'Add milliseconds');

"add string long singular" : function(test) {
"add string long singular" : function (test) {
test.expect(9);
var a = moment();
var a = moment(), b;
a.year(2011);

@@ -125,3 +125,3 @@ a.month(9);

var b = a.clone();
b = a.clone();

@@ -140,3 +140,3 @@ test.equal(a.add('milliseconds', 50).milliseconds(), 550, 'Add milliseconds');

"add string short" : function(test) {
"add string short" : function (test) {
test.expect(8);

@@ -164,3 +164,3 @@

"add string long reverse args" : function(test) {
"add string long reverse args" : function (test) {
test.expect(8);

@@ -188,3 +188,3 @@

"add string long singular reverse args" : function(test) {
"add string long singular reverse args" : function (test) {
test.expect(8);

@@ -212,3 +212,3 @@

"add string short reverse args" : function(test) {
"add string short reverse args" : function (test) {
test.expect(8);

@@ -236,9 +236,9 @@

"add across DST" : function(test) {
"add across DST" : function (test) {
test.expect(3);
var a = moment(new Date(2011, 2, 12, 5, 0, 0));
var b = moment(new Date(2011, 2, 12, 5, 0, 0));
var c = moment(new Date(2011, 2, 12, 5, 0, 0));
var d = moment(new Date(2011, 2, 12, 5, 0, 0));
var a = moment(new Date(2011, 2, 12, 5, 0, 0)),
b = moment(new Date(2011, 2, 12, 5, 0, 0)),
c = moment(new Date(2011, 2, 12, 5, 0, 0)),
d = moment(new Date(2011, 2, 12, 5, 0, 0));
a.add('days', 1);

@@ -245,0 +245,0 @@ b.add('hours', 24);

var moment = require("../../moment");
exports.create = {
"array" : function(test) {
"array" : function (test) {
test.expect(8);

@@ -17,3 +17,3 @@ test.ok(moment([2010]).toDate() instanceof Date, "[2010]");

"array copying": function(test) {
"array copying": function (test) {
var importantArray = [2009, 11];

@@ -26,3 +26,18 @@ test.expect(1);

"multi format array copying": function(test) {
"object" : function (test) {
test.expect(10);
test.ok(moment({year: 2010}).toDate() instanceof Date, "{year: 2010}");
test.ok(moment({year: 2010, month: 1}).toDate() instanceof Date, "{year: 2010, month: 1}");
test.ok(moment({year: 2010, month: 1, day: 12}).toDate() instanceof Date, "{year: 2010, month: 1, day: 12}");
test.ok(moment({year: 2010, month: 1, day: 12, hours: 1}).toDate() instanceof Date, "{year: 2010, month: 1, day: 12, hours: 1}");
test.ok(moment({year: 2010, month: 1, day: 12, hours: 1, minutes: 1}).toDate() instanceof Date, "{year: 2010, month: 1, hours: 12, minutes: 1, seconds: 1}");
test.ok(moment({year: 2010, month: 1, day: 12, hours: 1, minutes: 1, seconds: 1}).toDate() instanceof Date, "{year: 2010, month: 1, day: 12, hours: 1, minutes: 1, seconds: 1]");
test.ok(moment({year: 2010, month: 1, day: 12, hours: 1, minutes: 1, seconds: 1, milliseconds: 1}).toDate() instanceof Date, "{year: 2010, month: 1, day: 12, hours: 1, minutes: 1, seconds: 1, milliseconds: 1]");
test.equal(+moment(new Date(2010, 1, 14, 15, 25, 50, 125)), +moment({years: 2010, months: 1, days: 14, hours: 15, minutes: 25, seconds: 50, milliseconds: 125}), "constructing with object (long plural) === constructing with new Date()");
test.equal(+moment(new Date(2010, 1, 14, 15, 25, 50, 125)), +moment({year: 2010, month: 1, day: 14, hour: 15, minute: 25, second: 50, millisecond: 125}), "constructing with object (long) === constructing with new Date()");
test.equal(+moment(new Date(2010, 1, 14, 15, 25, 50, 125)), +moment({y: 2010, M: 1, d: 14, h: 15, m: 25, s: 50, ms: 125}), "constructing with object (short) === constructing with new Date()");
test.done();
},
"multi format array copying": function (test) {
var importantArray = ['MM/DD/YYYY', 'YYYY-MM-DD', 'MM-DD-YYYY'];

@@ -35,3 +50,3 @@ test.expect(1);

"number" : function(test) {
"number" : function (test) {
test.expect(3);

@@ -44,3 +59,3 @@ test.ok(moment(1000).toDate() instanceof Date, "1000");

"unix" : function(test) {
"unix" : function (test) {
test.expect(8);

@@ -58,3 +73,3 @@ test.equal(moment.unix(1).valueOf(), 1000, "1 unix timestamp == 1000 Date.valueOf");

"date" : function(test) {
"date" : function (test) {
test.expect(1);

@@ -65,3 +80,3 @@ test.ok(moment(new Date()).toDate() instanceof Date, "new Date()");

"date mutation" : function(test) {
"date mutation" : function (test) {
test.expect(1);

@@ -73,3 +88,3 @@ var a = new Date();

"moment" : function(test) {
"moment" : function (test) {
test.expect(2);

@@ -81,3 +96,3 @@ test.ok(moment(moment()).toDate() instanceof Date, "moment(moment())");

"cloning moment should only copy own properties" : function(test) {
"cloning moment should only copy own properties" : function (test) {
test.expect(2);

@@ -89,3 +104,3 @@ test.ok(!moment().clone().hasOwnProperty('month'), "Should not clone prototype methods");

"undefined" : function(test) {
"undefined" : function (test) {
test.expect(1);

@@ -96,3 +111,3 @@ test.ok(moment().toDate() instanceof Date, "undefined");

"string without format" : function(test) {
"string without format" : function (test) {
test.expect(2);

@@ -104,3 +119,3 @@ test.ok(moment("Aug 9, 1995").toDate() instanceof Date, "Aug 9, 1995");

"string without format - json" : function(test) {
"string without format - json" : function (test) {
test.expect(5);

@@ -115,3 +130,3 @@ test.equal(moment("Date(1325132654000)").valueOf(), 1325132654000, "Date(1325132654000)");

"string with format dropped am/pm bug" : function(test) {
"string with format dropped am/pm bug" : function (test) {
moment.lang('en');

@@ -127,8 +142,9 @@ test.expect(3);

"empty string with formats" : function(test) {
"empty string with formats" : function (test) {
test.expect(3);
test.equal(moment(' ', 'MM').format('YYYY-MM-DD HH:mm:ss'), '0000-01-01 00:00:00', 'should not break if input is an empty string');
test.equal(moment(' ', 'DD').format('YYYY-MM-DD HH:mm:ss'), '0000-01-01 00:00:00', 'should not break if input is an empty string');
test.equal(moment(' ', ['MM', "DD"]).format('YYYY-MM-DD HH:mm:ss'), '0000-01-01 00:00:00', 'should not break if input is an empty string');
var currentDate = moment().startOf('day').format('YYYY-MM-DD HH:mm:ss');
test.equal(moment(' ', 'MM').format('YYYY-MM-DD HH:mm:ss'), currentDate, 'should not break if input is an empty string');
test.equal(moment(' ', 'DD').format('YYYY-MM-DD HH:mm:ss'), currentDate, 'should not break if input is an empty string');
test.equal(moment(' ', ['MM', "DD"]).format('YYYY-MM-DD HH:mm:ss'), currentDate, 'should not break if input is an empty string');

@@ -138,3 +154,22 @@ test.done();

"matching am/pm" : function(test) {
"defaulting to current date" : function (test) {
test.expect(4);
var now = moment();
test.equal(moment('12:13:14', 'hh:mm:ss').format('YYYY-MM-DD hh:mm:ss'),
now.clone().hour(12).minute(13).second(14).format('YYYY-MM-DD hh:mm:ss'),
'given only time default to current date');
test.equal(moment('05', 'DD').format('YYYY-MM-DD'),
now.clone().date(5).format('YYYY-MM-DD'),
'given day of month default to current month, year');
test.equal(moment('05', 'MM').format('YYYY-MM-DD'),
now.clone().month(4).date(1).format('YYYY-MM-DD'),
'given month default to current year');
test.equal(moment('1996', 'YYYY').format('YYYY-MM-DD'),
now.clone().year(1996).month(0).date(1).format('YYYY-MM-DD'),
'given year do not default');
test.done();
},
"matching am/pm" : function (test) {
test.expect(13);

@@ -161,3 +196,3 @@

"string with format" : function(test) {
"string with format" : function (test) {
moment.lang('en');

@@ -193,3 +228,12 @@ var a = [

['HH:mm:ss SSS', '00:30:00 789'],
['X.SSS', '1234567890.123']
['X.SSS', '1234567890.123'],
['LT', '12:30 AM'],
['L', '09/02/1999'],
['l', '9/2/1999'],
['LL', 'September 2 1999'],
['ll', 'Sep 2 1999'],
['LLL', 'September 2 1999 12:30 AM'],
['lll', 'Sep 2 1999 12:30 AM'],
['LLLL', 'Thursday, September 2 1999 12:30 AM'],
['llll', 'Thu, Sep 2 1999 12:30 AM']
],

@@ -205,8 +249,8 @@ i;

"unix timestamp format" : function(test) {
var formats = ['X', 'X.S', 'X.SS', 'X.SSS'];
"unix timestamp format" : function (test) {
var formats = ['X', 'X.S', 'X.SS', 'X.SSS'], i, format;
test.expect(formats.length * 4);
for (var i = 0; i < formats.length; i++) {
var format = formats[i];
for (i = 0; i < formats.length; i++) {
format = formats[i];
test.equal(moment('1234567890', format).valueOf(), 1234567890 * 1000, format + " matches timestamp without milliseconds");

@@ -221,3 +265,3 @@ test.equal(moment('1234567890.1', format).valueOf(), 1234567890 * 1000 + 100, format + " matches timestamp with deciseconds");

"string with format no separators" : function(test) {
"string with format no separators" : function (test) {
moment.lang('en');

@@ -229,3 +273,3 @@ var a = [

['DDMMMYYYY', '10Sep2001']
],i;
], i;

@@ -241,3 +285,3 @@ test.expect(a.length);

"string with format (timezone)" : function(test) {
"string with format (timezone)" : function (test) {
test.expect(8);

@@ -247,3 +291,3 @@ test.equal(moment('5 -0700', 'H ZZ').toDate().getUTCHours(), 12, 'parse hours "5 -0700" ---> "H ZZ"');

test.equal(moment('5 -0730', 'H ZZ').toDate().getUTCMinutes(), 30, 'parse hours "5 -0730" ---> "H ZZ"');
test.equal(moment('5 -07:30', 'H Z').toDate().getUTCMinutes(), 30, 'parse hours "5 -07:30" ---> "H Z"');
test.equal(moment('5 -07:30', 'H Z').toDate().getUTCMinutes(), 30, 'parse hours "5 -07:0" ---> "H Z"');
test.equal(moment('5 +0100', 'H ZZ').toDate().getUTCHours(), 4, 'parse hours "5 +0100" ---> "H ZZ"');

@@ -256,13 +300,14 @@ test.equal(moment('5 +01:00', 'H Z').toDate().getUTCHours(), 4, 'parse hours "5 +01:00" ---> "H Z"');

"string with format (timezone offset)" : function(test) {
"string with format (timezone offset)" : function (test) {
var a, b, c, d, e, f;
test.expect(4);
var a = new Date(Date.UTC(2011, 0, 1, 1));
var b = moment('2011 1 1 0 -01:00', 'YYYY MM DD HH Z');
a = new Date(Date.UTC(2011, 0, 1, 1));
b = moment('2011 1 1 0 -01:00', 'YYYY MM DD HH Z');
test.equal(a.getHours(), b.hours(), 'date created with utc == parsed string with timezone offset');
test.equal(+a, +b, 'date created with utc == parsed string with timezone offset');
var c = moment('2011 2 1 10 -05:00', 'YYYY MM DD HH Z');
var d = moment('2011 2 1 8 -07:00', 'YYYY MM DD HH Z');
c = moment('2011 2 1 10 -05:00', 'YYYY MM DD HH Z');
d = moment('2011 2 1 8 -07:00', 'YYYY MM DD HH Z');
test.equal(c.hours(), d.hours(), '10 am central time == 8 am pacific time');
var e = moment.utc('Fri, 20 Jul 2012 17:15:00', 'ddd, DD MMM YYYY HH:mm:ss');
var f = moment.utc('Fri, 20 Jul 2012 10:15:00 -0700', 'ddd, DD MMM YYYY HH:mm:ss ZZ');
e = moment.utc('Fri, 20 Jul 2012 17:15:00', 'ddd, DD MMM YYYY HH:mm:ss');
f = moment.utc('Fri, 20 Jul 2012 10:15:00 -0700', 'ddd, DD MMM YYYY HH:mm:ss ZZ');
test.equal(e.hours(), f.hours(), 'parse timezone offset in utc');

@@ -272,3 +317,3 @@ test.done();

"string with array of formats" : function(test) {
"string with array of formats" : function (test) {
test.expect(14);

@@ -298,3 +343,3 @@

"string with format - years" : function(test) {
"string with format - years" : function (test) {
test.expect(4);

@@ -308,6 +353,6 @@ test.equal(moment('67', 'YY').format('YYYY'), '2067', '67 > 2067');

"implicit cloning" : function(test) {
"implicit cloning" : function (test) {
test.expect(2);
var momentA = moment([2011, 10, 10]);
var momentB = moment(momentA);
var momentA = moment([2011, 10, 10]),
momentB = moment(momentA);
momentA.month(5);

@@ -319,6 +364,6 @@ test.equal(momentB.month(), 10, "Calling moment() on a moment will create a clone");

"explicit cloning" : function(test) {
"explicit cloning" : function (test) {
test.expect(2);
var momentA = moment([2011, 10, 10]);
var momentB = momentA.clone();
var momentA = moment([2011, 10, 10]),
momentB = momentA.clone();
momentA.month(5);

@@ -330,3 +375,3 @@ test.equal(momentB.month(), 10, "Calling moment() on a moment will create a clone");

"cloning carrying over utc mode" : function(test) {
"cloning carrying over utc mode" : function (test) {
test.expect(8);

@@ -346,39 +391,39 @@

"parsing iso" : function(test) {
var offset = moment([2011, 9, 08]).zone();
var pad = function(input) {
if (input < 10) {
return '0' + input;
}
return '' + input;
}
var hourOffset = (offset > 0) ? Math.floor(offset / 60) : Math.ceil(offset / 60);
var minOffset = offset - (hourOffset * 60);
var tz = (offset > 0) ? '-' + pad(hourOffset) + ':' + pad(minOffset) : '+' + pad(-hourOffset) + ':' + pad(-minOffset);
var tz2 = tz.replace(':', '');
var formats = [
['2011-10-08', '2011-10-08T00:00:00.000' + tz],
['2011-10-08T18', '2011-10-08T18:00:00.000' + tz],
['2011-10-08T18:04', '2011-10-08T18:04:00.000' + tz],
['2011-10-08T18:04:20', '2011-10-08T18:04:20.000' + tz],
['2011-10-08T18:04' + tz, '2011-10-08T18:04:00.000' + tz],
['2011-10-08T18:04:20' + tz, '2011-10-08T18:04:20.000' + tz],
['2011-10-08T18:04' + tz2, '2011-10-08T18:04:00.000' + tz],
['2011-10-08T18:04:20' + tz2, '2011-10-08T18:04:20.000' + tz],
['2011-10-08T18:04:20.1' + tz2, '2011-10-08T18:04:20.100' + tz],
['2011-10-08T18:04:20.11' + tz2, '2011-10-08T18:04:20.110' + tz],
['2011-10-08T18:04:20.111' + tz2, '2011-10-08T18:04:20.111' + tz],
['2011-10-08 18', '2011-10-08T18:00:00.000' + tz],
['2011-10-08 18:04', '2011-10-08T18:04:00.000' + tz],
['2011-10-08 18:04:20', '2011-10-08T18:04:20.000' + tz],
['2011-10-08 18:04' + tz, '2011-10-08T18:04:00.000' + tz],
['2011-10-08 18:04:20' + tz, '2011-10-08T18:04:20.000' + tz],
['2011-10-08 18:04' + tz2, '2011-10-08T18:04:00.000' + tz],
['2011-10-08 18:04:20' + tz2, '2011-10-08T18:04:20.000' + tz],
['2011-10-08 18:04:20.1' + tz2, '2011-10-08T18:04:20.100' + tz],
['2011-10-08 18:04:20.11' + tz2, '2011-10-08T18:04:20.110' + tz],
['2011-10-08 18:04:20.111' + tz2, '2011-10-08T18:04:20.111' + tz]
];
"parsing iso" : function (test) {
var offset = moment([2011, 9, 08]).zone(),
pad = function (input) {
if (input < 10) {
return '0' + input;
}
return '' + input;
},
hourOffset = (offset > 0) ? Math.floor(offset / 60) : Math.ceil(offset / 60),
minOffset = offset - (hourOffset * 60),
tz = (offset > 0) ? '-' + pad(hourOffset) + ':' + pad(minOffset) : '+' + pad(-hourOffset) + ':' + pad(-minOffset),
tz2 = tz.replace(':', ''),
formats = [
['2011-10-08', '2011-10-08T00:00:00.000' + tz],
['2011-10-08T18', '2011-10-08T18:00:00.000' + tz],
['2011-10-08T18:04', '2011-10-08T18:04:00.000' + tz],
['2011-10-08T18:04:20', '2011-10-08T18:04:20.000' + tz],
['2011-10-08T18:04' + tz, '2011-10-08T18:04:00.000' + tz],
['2011-10-08T18:04:20' + tz, '2011-10-08T18:04:20.000' + tz],
['2011-10-08T18:04' + tz2, '2011-10-08T18:04:00.000' + tz],
['2011-10-08T18:04:20' + tz2, '2011-10-08T18:04:20.000' + tz],
['2011-10-08T18:04:20.1' + tz2, '2011-10-08T18:04:20.100' + tz],
['2011-10-08T18:04:20.11' + tz2, '2011-10-08T18:04:20.110' + tz],
['2011-10-08T18:04:20.111' + tz2, '2011-10-08T18:04:20.111' + tz],
['2011-10-08 18', '2011-10-08T18:00:00.000' + tz],
['2011-10-08 18:04', '2011-10-08T18:04:00.000' + tz],
['2011-10-08 18:04:20', '2011-10-08T18:04:20.000' + tz],
['2011-10-08 18:04' + tz, '2011-10-08T18:04:00.000' + tz],
['2011-10-08 18:04:20' + tz, '2011-10-08T18:04:20.000' + tz],
['2011-10-08 18:04' + tz2, '2011-10-08T18:04:00.000' + tz],
['2011-10-08 18:04:20' + tz2, '2011-10-08T18:04:20.000' + tz],
['2011-10-08 18:04:20.1' + tz2, '2011-10-08T18:04:20.100' + tz],
['2011-10-08 18:04:20.11' + tz2, '2011-10-08T18:04:20.110' + tz],
['2011-10-08 18:04:20.111' + tz2, '2011-10-08T18:04:20.111' + tz]
], i;
test.expect(formats.length);
for (var i = 0; i < formats.length; i++) {
for (i = 0; i < formats.length; i++) {
test.equal(formats[i][1], moment(formats[i][0]).format('YYYY-MM-DDTHH:mm:ss.SSSZ'), "moment should be able to parse ISO " + formats[i][0]);

@@ -389,3 +434,3 @@ }

"parsing iso with T" : function(test) {
"parsing iso with T" : function (test) {
test.expect(9);

@@ -408,3 +453,3 @@

"parsing iso Z timezone" : function(test) {
"parsing iso Z timezone" : function (test) {
var i,

@@ -423,3 +468,3 @@ formats = [

"parsing iso Z timezone into local" : function(test) {
"parsing iso Z timezone into local" : function (test) {
test.expect(1);

@@ -434,3 +479,3 @@

"null" : function(test) {
"null" : function (test) {
test.expect(3);

@@ -443,3 +488,3 @@ test.equal(moment(''), null, "Calling moment('')");

"first century" : function(test) {
"first century" : function (test) {
test.expect(9);

@@ -458,3 +503,3 @@ test.equal(moment([0, 0, 1]).format("YYYY-MM-DD"), "0000-01-01", "Year AD 0");

"six digit years" : function(test) {
"six digit years" : function (test) {
test.expect(8);

@@ -472,3 +517,3 @@ test.equal(moment([-270000, 0, 1]).format("YYYYY-MM-DD"), "-270000-01-01", "format BC 270,001");

"negative four digit years" : function(test) {
"negative four digit years" : function (test) {
test.expect(2);

@@ -496,4 +541,5 @@ test.equal(moment("-1000-01-01", "YYYYY-MM-DD").toDate().getFullYear(), -1000, "parse BC 1,001");

moment.lang('parselang', null);
test.done();
}
};
var moment = require("../../moment");
exports.days_in_month = {
"days in month" : function(test) {
"days in month" : function (test) {
test.expect(24);
var months = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
for (var i = 0; i < 12; i++) {
var months = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], i;
for (i = 0; i < 12; i++) {
test.equal(moment([2012, i]).daysInMonth(),
months[i],
moment([2012, i]).format('L') + " should have " + months[i] + " days. (beginning of month " + i + ')')
moment([2012, i]).format('L') + " should have " + months[i] + " days. (beginning of month " + i + ')');
}
for (var i = 0; i < 12; i++) {
for (i = 0; i < 12; i++) {
test.equal(moment([2012, i, months[i]]).daysInMonth(),
months[i],
moment([2012, i, months[i]]).format('L') + " should have " + months[i] + " days. (end of month " + i + ')')
moment([2012, i, months[i]]).format('L') + " should have " + months[i] + " days. (end of month " + i + ')');
}

@@ -20,3 +20,3 @@ test.done();

"days in month leap years" : function(test) {
"days in month leap years" : function (test) {
test.expect(4);

@@ -23,0 +23,0 @@ test.equal(moment([2010, 1]).daysInMonth(), 28, "Feb 2010 should have 28 days");

@@ -36,3 +36,3 @@ var moment = require("../../moment");

exports.diff = {
"diff" : function(test) {
"diff" : function (test) {
test.expect(5);

@@ -51,3 +51,3 @@

"diff key after" : function(test) {
"diff key after" : function (test) {
test.expect(10);

@@ -68,3 +68,3 @@

"diff key before" : function(test) {
"diff key before" : function (test) {
test.expect(10);

@@ -85,3 +85,3 @@

"diff key before singular" : function(test) {
"diff key before singular" : function (test) {
test.expect(10);

@@ -102,3 +102,3 @@

"diff key before abbreviated" : function(test) {
"diff key before abbreviated" : function (test) {
test.expect(10);

@@ -119,3 +119,3 @@

"diff month" : function(test) {
"diff month" : function (test) {
test.expect(1);

@@ -127,3 +127,3 @@

"diff across DST" : function(test) {
"diff across DST" : function (test) {
var dst = dstForYear(2012), a, b, daysInMonth;

@@ -167,3 +167,3 @@ if (!dst) {

"diff overflow" : function(test) {
"diff overflow" : function (test) {
test.expect(4);

@@ -178,6 +178,6 @@

"diff between utc and local" : function(test) {
"diff between utc and local" : function (test) {
test.expect(7);
test.equal(moment([2011]).utc().diff([2010], 'years'), 1, "year diff");
test.equal(moment([2012]).utc().diff([2011], 'years'), 1, "year diff");
test.equal(moment([2010, 2, 2]).utc().diff([2010, 0, 2], 'months'), 2, "month diff");

@@ -193,3 +193,3 @@ test.equal(moment([2010, 0, 4]).utc().diff([2010], 'days'), 3, "day diff");

"diff floored" : function(test) {
"diff floored" : function (test) {
test.expect(7);

@@ -208,3 +208,3 @@

"year diffs include dates" : function(test) {
"year diffs include dates" : function (test) {
test.expect(1);

@@ -222,9 +222,9 @@

equal(test, moment([2012, 0, 1]).diff([2012, 1, 1], 'months', true), -1, 'Jan 1 to Feb 1 should be 1 month');
equal(test, moment([2012, 0, 1]).diff([2012, 0, 1, 12], 'months', true), -0.5/31, 'Jan 1 to Jan 1 noon should be 0.5/31 months');
equal(test, moment([2012, 0, 1]).diff([2012, 0, 1, 12], 'months', true), -0.5 / 31, 'Jan 1 to Jan 1 noon should be 0.5 / 31 months');
equal(test, moment([2012, 0, 15]).diff([2012, 1, 15], 'months', true), -1, 'Jan 15 to Feb 15 should be 1 month');
equal(test, moment([2012, 0, 28]).diff([2012, 1, 28], 'months', true), -1, 'Jan 28 to Feb 28 should be 1 month');
equal(test, moment([2012, 0, 31]).diff([2012, 1, 29], 'months', true), -1 + (2/30), 'Jan 31 to Feb 29 should be 1 - (2/30) months');
equal(test, moment([2012, 0, 31]).diff([2012, 2, 1], 'months', true), -2 + (30/31), 'Jan 31 to Mar 1 should be 2 - (30/31) months');
equal(test, moment([2012, 0, 31]).diff([2012, 2, 1, 12], 'months', true), -2 + (29.5/31), 'Jan 31 to Mar 1 should be 2 - (29.5/31) months');
equal(test, moment([2012, 0, 1]).diff([2012, 0, 31], 'months', true), -(30 / 31), 'Jan 1 to Jan 31 should be 30/31 months');
equal(test, moment([2012, 0, 31]).diff([2012, 1, 29], 'months', true), -1 + (2 / 30), 'Jan 31 to Feb 29 should be 1 - (2 / 30) months');
equal(test, moment([2012, 0, 31]).diff([2012, 2, 1], 'months', true), -2 + (30 / 31), 'Jan 31 to Mar 1 should be 2 - (30 / 31) months');
equal(test, moment([2012, 0, 31]).diff([2012, 2, 1, 12], 'months', true), -2 + (29.5 / 31), 'Jan 31 to Mar 1 should be 2 - (29.5 / 31) months');
equal(test, moment([2012, 0, 1]).diff([2012, 0, 31], 'months', true), -(30 / 31), 'Jan 1 to Jan 31 should be 30 / 31 months');

@@ -245,5 +245,5 @@ test.done();

equal(test, moment([2012, 0, 31]).diff([2013, 6, 31], 'years', true), -1.5, 'Jan 31 2012 to Jul 31 2013 should be 1.5 years');
equal(test, moment([2012, 0, 1]).diff([2013, 0, 1, 12], 'years', true), -1-(0.5/31)/12, 'Jan 1 2012 to Jan 1 2013 noon should be 1+(0.5/31)/12 years');
equal(test, moment([2012, 0, 1]).diff([2013, 6, 1, 12], 'years', true), -1.5-(0.5/31)/12, 'Jan 1 2012 to Jul 1 2013 noon should be 1.5+(0.5/31)/12 years');
equal(test, moment([2012, 1, 29]).diff([2013, 1, 28], 'years', true), -1 + (1/28.5)/12, 'Feb 29 2012 to Feb 28 2013 should be 1-(1/28.5)/12 years');
equal(test, moment([2012, 0, 1]).diff([2013, 0, 1, 12], 'years', true), -1 - (0.5 / 31) / 12, 'Jan 1 2012 to Jan 1 2013 noon should be 1+(0.5 / 31) / 12 years');
equal(test, moment([2012, 0, 1]).diff([2013, 6, 1, 12], 'years', true), -1.5 - (0.5 / 31) / 12, 'Jan 1 2012 to Jul 1 2013 noon should be 1.5+(0.5 / 31) / 12 years');
equal(test, moment([2012, 1, 29]).diff([2013, 1, 28], 'years', true), -1 + (1 / 28.5) / 12, 'Feb 29 2012 to Feb 28 2013 should be 1-(1 / 28.5) / 12 years');

@@ -250,0 +250,0 @@ test.done();

var moment = require("../../moment");
exports.duration = {
"object instantiation" : function(test) {
"object instantiation" : function (test) {
var d = moment.duration({

@@ -28,3 +28,27 @@ years: 2,

"milliseconds instantiation" : function(test) {
"object instantiation with strings" : function (test) {
var d = moment.duration({
years: '2',
months: '3',
weeks: '2',
days: '1',
hours: '8',
minutes: '9',
seconds: '20',
milliseconds: '12'
});
test.expect(8);
test.equal(d.years(), 2, "years");
test.equal(d.months(), 3, "months");
test.equal(d.weeks(), 2, "weeks");
test.equal(d.days(), 15, "days"); // two weeks + 1 day
test.equal(d.hours(), 8, "hours");
test.equal(d.minutes(), 9, "minutes");
test.equal(d.seconds(), 20, "seconds");
test.equal(d.milliseconds(), 12, "milliseconds");
test.done();
},
"milliseconds instantiation" : function (test) {
test.expect(1);

@@ -35,24 +59,24 @@ test.equal(moment.duration(72).milliseconds(), 72, "milliseconds");

"instantiation by type" : function(test) {
"instantiation by type" : function (test) {
test.expect(16);
test.equal(moment.duration(1, "years").years(), 1, "years");
test.equal(moment.duration(1, "y").years(), 1, "y");
test.equal(moment.duration(2, "months").months(), 2, "months");
test.equal(moment.duration(2, "M").months(), 2, "M");
test.equal(moment.duration(3, "weeks").weeks(), 3, "weeks");
test.equal(moment.duration(3, "w").weeks(), 3, "weeks");
test.equal(moment.duration(4, "days").days(), 4, "days");
test.equal(moment.duration(4, "d").days(), 4, "d");
test.equal(moment.duration(5, "hours").hours(), 5, "hours");
test.equal(moment.duration(5, "h").hours(), 5, "h");
test.equal(moment.duration(6, "minutes").minutes(), 6, "minutes");
test.equal(moment.duration(6, "m").minutes(), 6, "m");
test.equal(moment.duration(7, "seconds").seconds(), 7, "seconds");
test.equal(moment.duration(7, "s").seconds(), 7, "s");
test.equal(moment.duration(8, "milliseconds").milliseconds(), 8, "milliseconds");
test.equal(moment.duration(8, "ms").milliseconds(), 8, "ms");
test.equal(moment.duration(1, "years").years(), 1, "years");
test.equal(moment.duration(1, "y").years(), 1, "y");
test.equal(moment.duration(2, "months").months(), 2, "months");
test.equal(moment.duration(2, "M").months(), 2, "M");
test.equal(moment.duration(3, "weeks").weeks(), 3, "weeks");
test.equal(moment.duration(3, "w").weeks(), 3, "weeks");
test.equal(moment.duration(4, "days").days(), 4, "days");
test.equal(moment.duration(4, "d").days(), 4, "d");
test.equal(moment.duration(5, "hours").hours(), 5, "hours");
test.equal(moment.duration(5, "h").hours(), 5, "h");
test.equal(moment.duration(6, "minutes").minutes(), 6, "minutes");
test.equal(moment.duration(6, "m").minutes(), 6, "m");
test.equal(moment.duration(7, "seconds").seconds(), 7, "seconds");
test.equal(moment.duration(7, "s").seconds(), 7, "s");
test.equal(moment.duration(8, "milliseconds").milliseconds(), 8, "milliseconds");
test.equal(moment.duration(8, "ms").milliseconds(), 8, "ms");
test.done();
},
"shortcuts" : function(test) {
"shortcuts" : function (test) {
test.expect(8);

@@ -70,3 +94,3 @@ test.equal(moment.duration({y: 1}).years(), 1, "years = y");

"generic getter" : function(test) {
"generic getter" : function (test) {
test.expect(24);

@@ -100,3 +124,3 @@ test.equal(moment.duration(1, "years").get("years"), 1, "years");

"instantiation from another duration" : function(test) {
"instantiation from another duration" : function (test) {
var simple = moment.duration(1234),

@@ -122,3 +146,3 @@ lengthy = moment.duration(60 * 60 * 24 * 360 * 1e3),

"instatiation from serialized C# TimeSpan zero" : function(test) {
"instatiation from serialized C# TimeSpan zero" : function (test) {
test.expect(6);

@@ -134,3 +158,3 @@ test.equal(moment.duration("00:00:00").years(), 0, "0 years");

"instatiation from serialized C# TimeSpan with days" : function(test) {
"instatiation from serialized C# TimeSpan with days" : function (test) {
test.expect(6);

@@ -146,4 +170,4 @@ test.equal(moment.duration("1.02:03:04.9999999").years(), 0, "0 years");

"instatiation from serialized C# TimeSpan without days" : function(test) {
test.expect(6);
"instatiation from serialized C# TimeSpan without days" : function (test) {
test.expect(10);
test.equal(moment.duration("01:02:03.9999999").years(), 0, "0 years");

@@ -155,6 +179,12 @@ test.equal(moment.duration("01:02:03.9999999").days(), 0, "0 days");

test.equal(moment.duration("01:02:03.9999999").milliseconds(), 999, "999 milliseconds");
test.equal(moment.duration("23:59:59.9999999").days(), 0, "0 days");
test.equal(moment.duration("23:59:59.9999999").hours(), 23, "23 hours");
test.equal(moment.duration("500:59:59.9999999").days(), 20, "500 hours overflows to 20 days");
test.equal(moment.duration("500:59:59.9999999").hours(), 20, "500 hours overflows to 20 hours");
test.done();
},
"instatiation from serialized C# TimeSpan without days or milliseconds" : function(test) {
"instatiation from serialized C# TimeSpan without days or milliseconds" : function (test) {
test.expect(6);

@@ -170,3 +200,3 @@ test.equal(moment.duration("01:02:03").years(), 0, "0 years");

"instatiation from serialized C# TimeSpan without milliseconds" : function(test) {
"instatiation from serialized C# TimeSpan without milliseconds" : function (test) {
test.expect(6);

@@ -182,3 +212,3 @@ test.equal(moment.duration("1.02:03:04").years(), 0, "0 years");

"instatiation from serialized C# TimeSpan maxValue" : function(test) {
"instatiation from serialized C# TimeSpan maxValue" : function (test) {
test.expect(6);

@@ -194,3 +224,3 @@ test.equal(moment.duration("10675199.02:48:05.4775807").years(), 29653, "29653 years");

"instatiation from serialized C# TimeSpan minValue" : function(test) {
"instatiation from serialized C# TimeSpan minValue" : function (test) {
test.expect(6);

@@ -206,3 +236,3 @@ test.equal(moment.duration("-10675199.02:48:05.4775808").years(), -29653, "29653 years");

"humanize" : function(test) {
"humanize" : function (test) {
test.expect(32);

@@ -245,3 +275,3 @@ moment.lang('en');

"humanize duration with suffix" : function(test) {
"humanize duration with suffix" : function (test) {
test.expect(2);

@@ -254,3 +284,3 @@ moment.lang('en');

"bubble value up" : function(test) {
"bubble value up" : function (test) {
test.expect(5);

@@ -266,3 +296,3 @@ test.equal(moment.duration({milliseconds: 61001}).milliseconds(), 1, "61001 milliseconds has 1 millisecond left over");

"clipping" : function(test) {
"clipping" : function (test) {
test.expect(18);

@@ -292,3 +322,3 @@ test.equal(moment.duration({months: 11}).months(), 11, "11 months is 11 months");

"effective equivalency" : function(test) {
"effective equivalency" : function (test) {
test.expect(7);

@@ -305,3 +335,3 @@ test.deepEqual(moment.duration({seconds: 1})._data, moment.duration({milliseconds: 1000})._data, "1 second is the same as 1000 milliseconds");

"asGetters" : function(test) {
"asGetters" : function (test) {
var d = moment.duration({

@@ -330,3 +360,3 @@ years: 2,

"generic as getter" : function(test) {
"generic as getter" : function (test) {
var d = moment.duration({

@@ -371,3 +401,3 @@ years: 2,

"isDuration" : function(test) {
"isDuration" : function (test) {
test.expect(3);

@@ -380,3 +410,3 @@ test.ok(moment.isDuration(moment.duration(12345678)), "correctly says true");

"add" : function(test) {
"add" : function (test) {
test.expect(4);

@@ -389,3 +419,3 @@

test.equal(d.add(10000)._milliseconds, 10000, 'Add milliseconds');
test.equal(d.add({h: 23, m: 59})._milliseconds, 23*60*60*1000 + 59*60*1000 + 10000, 'Add hour:minute');
test.equal(d.add({h: 23, m: 59})._milliseconds, 23 * 60 * 60 * 1000 + 59 * 60 * 1000 + 10000, 'Add hour:minute');

@@ -395,3 +425,3 @@ test.done();

"add and bubble" : function(test) {
"add and bubble" : function (test) {
test.expect(4);

@@ -407,3 +437,3 @@

"subtract and bubble" : function(test) {
"subtract and bubble" : function (test) {
test.expect(4);

@@ -419,3 +449,3 @@

"subtract" : function(test) {
"subtract" : function (test) {
test.expect(4);

@@ -427,4 +457,4 @@

test.equal(d.subtract(14, 'days')._days, 0, 'Subtract days');
test.equal(d.subtract(10000)._milliseconds, 5*60*60*1000 - 10000, 'Subtract milliseconds');
test.equal(d.subtract({h: 1, m: 59})._milliseconds, 3*60*60*1000 + 1*60*1000 - 10000, 'Subtract hour:minute');
test.equal(d.subtract(10000)._milliseconds, 5 * 60 * 60 * 1000 - 10000, 'Subtract milliseconds');
test.equal(d.subtract({h: 1, m: 59})._milliseconds, 3 * 60 * 60 * 1000 + 1 * 60 * 1000 - 10000, 'Subtract hour:minute');

@@ -431,0 +461,0 @@ test.done();

var moment = require("../../moment");
exports.format = {
"format YY" : function(test) {
"format YY" : function (test) {
test.expect(1);

@@ -12,3 +12,3 @@

"format escape brackets" : function(test) {
"format escape brackets" : function (test) {
test.expect(9);

@@ -31,3 +31,3 @@

"format milliseconds" : function(test) {
"format milliseconds" : function (test) {
test.expect(6);

@@ -45,7 +45,7 @@ var b = moment(new Date(2009, 1, 14, 15, 25, 50, 123));

"format timezone" : function(test) {
"format timezone" : function (test) {
test.expect(2);
var b = moment(new Date(2010, 1, 14, 15, 25, 50, 125));
var explanation = 'moment().format("z") = ' + b.format('z') + ' It should be something like "PST"'
var b = moment(new Date(2010, 1, 14, 15, 25, 50, 125)),
explanation = 'moment().format("z") = ' + b.format('z') + ' It should be something like "PST"';
if (moment().zone() === -60) {

@@ -59,3 +59,3 @@ explanation += "For UTC+1 this is a known issue, see https://github.com/timrwood/moment/issues/162";

"format multiple with zone" : function(test) {
"format multiple with zone" : function (test) {
test.expect(1);

@@ -68,3 +68,3 @@

"isDST" : function(test) {
"isDST" : function (test) {
test.expect(2);

@@ -95,4 +95,4 @@

"unix timestamp" : function(test) {
test.expect(4);
"unix timestamp" : function (test) {
test.expect(5);

@@ -105,6 +105,9 @@ var m = moment('1234567890.123', 'X');

m = moment(1234567890.123, 'X');
test.equals(m.format('X'), '1234567890', 'unix timestamp as integer');
test.done();
},
"zone" : function(test) {
"zone" : function (test) {
test.expect(3);

@@ -118,9 +121,9 @@

}
if (moment().zone() == 0) {
if (moment().zone() === 0) {
test.ok(moment().format('ZZ').indexOf('+') > -1, 'When the zone() offset is equal to 0, the ISO offset should be positive zero');
}
if (moment().zone() === 0) {
test.equal(moment().zone(), 0, 'moment.fn.zone should be a multiple of 15 (was ' + moment().zone() + ')');
test.equal(moment().zone(), 0, 'moment.fn.zone should be a multiple of 15 (was ' + moment().zone() + ')');
} else {
test.equal(moment().zone() % 15, 0, 'moment.fn.zone should be a multiple of 15 (was ' + moment().zone() + ')');
test.equal(moment().zone() % 15, 0, 'moment.fn.zone should be a multiple of 15 (was ' + moment().zone() + ')');
}

@@ -131,3 +134,3 @@ test.equal(moment().zone(), new Date().getTimezoneOffset(), 'zone should equal getTimezoneOffset');

"default format" : function(test) {
"default format" : function (test) {
test.expect(1);

@@ -139,3 +142,3 @@ var isoRegex = /\d{4}.\d\d.\d\dT\d\d.\d\d.\d\d[\+\-]\d\d:\d\d/;

"escaping quotes" : function(test) {
"escaping quotes" : function (test) {
test.expect(4);

@@ -151,3 +154,3 @@ moment.lang('en');

"toJSON" : function(test) {
"toJSON" : function (test) {
var supportsJson = typeof JSON !== "undefined" && JSON.stringify && JSON.stringify.call,

@@ -169,3 +172,3 @@ date = moment("2012-10-09T21:30:40.678+0100");

"toISOString" : function(test) {
"toISOString" : function (test) {
var date = moment.utc("2012-10-09T20:30:40.678");

@@ -177,3 +180,3 @@

"weeks format" : function(test) {
"weeks format" : function (test) {

@@ -197,7 +200,7 @@ // http://en.wikipedia.org/wiki/ISO_week_date

"2010-01-03": "2009-53"
};
}, i, iso, the;
for (var i in cases) {
var iso = cases[i].split('-').pop();
var the = moment(i).format('WW');
for (i in cases) {
iso = cases[i].split('-').pop();
the = moment(i).format('WW');
test.equal(iso, the, i + ": should be " + iso + ", but " + the);

@@ -209,3 +212,3 @@ }

"iso week year formats" : function(test) {
"iso week year formats" : function (test) {

@@ -229,11 +232,11 @@ // http://en.wikipedia.org/wiki/ISO_week

"2010-01-03": "2009-53"
};
}, i, isoWeekYear, formatted5, formatted4, formatted2;
for (var i in cases) {
var isoWeekYear = cases[i].split('-')[0];
var formatted5 = moment(i).format('GGGGG');
for (i in cases) {
isoWeekYear = cases[i].split('-')[0];
formatted5 = moment(i).format('GGGGG');
test.equal('0' + isoWeekYear, formatted5, i + ": should be " + isoWeekYear + ", but " + formatted4);
var formatted4 = moment(i).format('GGGG');
formatted4 = moment(i).format('GGGG');
test.equal(isoWeekYear, formatted4, i + ": should be " + isoWeekYear + ", but " + formatted4);
var formatted2 = moment(i).format('GG');
formatted2 = moment(i).format('GG');
test.equal(isoWeekYear.slice(2, 4), formatted2, i + ": should be " + isoWeekYear + ", but " + formatted2);

@@ -245,3 +248,3 @@ }

"week year formats" : function(test) {
"week year formats" : function (test) {

@@ -265,12 +268,12 @@ // http://en.wikipedia.org/wiki/ISO_week

"2010-01-03": "2009-53"
};
}, i, formatted5, formatted4, formatted2, isoWeekYear;
moment.lang('en-gb'); // 1, 4
for (var i in cases) {
var isoWeekYear = cases[i].split('-')[0];
var formatted5 = moment(i).format('ggggg');
for (i in cases) {
isoWeekYear = cases[i].split('-')[0];
formatted5 = moment(i).format('ggggg');
test.equal('0' + isoWeekYear, formatted5, i + ": should be " + isoWeekYear + ", but " + formatted4);
var formatted4 = moment(i).format('gggg');
formatted4 = moment(i).format('gggg');
test.equal(isoWeekYear, formatted4, i + ": should be " + isoWeekYear + ", but " + formatted4);
var formatted2 = moment(i).format('gg');
formatted2 = moment(i).format('gg');
test.equal(isoWeekYear.slice(2, 4), formatted2, i + ": should be " + isoWeekYear + ", but " + formatted2);

@@ -282,3 +285,3 @@ }

"iso weekday formats" : function(test) {
"iso weekday formats" : function (test) {
test.expect(7);

@@ -297,6 +300,6 @@

"weekday formats" : function(test) {
"weekday formats" : function (test) {
test.expect(7);
moment.lang('dow:3,doy:5', {week: {dow: 3, doy: 5}});
moment.lang('dow: 3,doy: 5', {week: {dow: 3, doy: 5}});
test.equal(moment([1985, 1, 6]).format('e'), '0', "Feb 6 1985 is Wednesday -- 0th day");

@@ -313,3 +316,3 @@ test.equal(moment([2029, 8, 20]).format('e'), '1', "Sep 20 2029 is Thursday -- 1st day");

"toString is just human readable format" : function(test) {
"toString is just human readable format" : function (test) {
test.expect(1);

@@ -322,9 +325,28 @@

"toJSON skips postformat" : function(test) {
"toJSON skips postformat" : function (test) {
test.expect(1);
moment.lang('postformat', {postformat: function(s) { s.replace(/./g, 'X') }});
moment.lang('postformat', {postformat: function (s) { s.replace(/./g, 'X'); }});
test.equal(moment.utc([2000, 0, 1]).toJSON(), "2000-01-01T00:00:00.000Z", "toJSON doesn't postformat");
moment.lang('postformat', null);
test.done();
},
"calendar day timezone" : function (test) {
test.expect(10);
var zones = [60, -60, 90, -90, 360, -360, 720, -720],
b = moment().utc().startOf('day').subtract({ m : 1 }),
c = moment().local().startOf('day').subtract({ m : 1 });
zones.forEach(function (z) {
var a = moment().zone(z).startOf('day').subtract({ m: 1 });
test.equal(moment(a).zone(z).calendar(), "Yesterday at 11:59 PM", "Yesterday at 11:59 PM, not Today, or the wrong time");
});
test.equal(moment(b).utc().calendar(), "Yesterday at 11:59 PM", "Yesterday at 11:59 PM, not Today, or the wrong time");
test.equal(moment(c).local().calendar(), "Yesterday at 11:59 PM", "Yesterday at 11:59 PM, not Today, or the wrong time");
test.done();
}
};
var moment = require("../../moment");
exports.getters_setters = {
"getters" : function(test) {
"getters" : function (test) {
test.expect(8);

@@ -19,5 +19,20 @@

"setters plural" : function(test) {
"getters programmatic" : function (test) {
test.expect(8);
var a = moment([2011, 9, 12, 6, 7, 8, 9]);
test.equal(a.get('year'), 2011, 'year');
test.equal(a.get('month'), 9, 'month');
test.equal(a.get('date'), 12, 'date');
test.equal(a.get('day'), 3, 'day');
test.equal(a.get('hour'), 6, 'hour');
test.equal(a.get('minute'), 7, 'minute');
test.equal(a.get('second'), 8, 'second');
test.equal(a.get('milliseconds'), 9, 'milliseconds');
test.done();
},
"setters plural" : function (test) {
test.expect(8);
var a = moment();

@@ -42,3 +57,3 @@ a.years(2011);

"setters singular" : function(test) {
"setters singular" : function (test) {
test.expect(8);

@@ -65,3 +80,3 @@

"setters" : function(test) {
"setters" : function (test) {
test.expect(9);

@@ -94,3 +109,31 @@

"setters strings" : function(test) {
"setter programmatic" : function (test) {
test.expect(9);
var a = moment();
a.set('year', 2011);
a.set('month', 9);
a.set('date', 12);
a.set('hours', 6);
a.set('minutes', 7);
a.set('seconds', 8);
a.set('milliseconds', 9);
test.equal(a.year(), 2011, 'year');
test.equal(a.month(), 9, 'month');
test.equal(a.date(), 12, 'date');
test.equal(a.day(), 3, 'day');
test.equal(a.hours(), 6, 'hour');
test.equal(a.minutes(), 7, 'minute');
test.equal(a.seconds(), 8, 'second');
test.equal(a.milliseconds(), 9, 'milliseconds');
// Test month() behavior. See https://github.com/timrwood/moment/pull/822
a = moment('20130531', 'YYYYMMDD');
a.month(3);
test.equal(a.month(), 3, 'month edge case');
test.done();
},
"setters strings" : function (test) {
test.expect(7);

@@ -109,3 +152,3 @@

"setters - falsey values" : function(test) {
"setters - falsey values" : function (test) {
test.expect(1);

@@ -121,3 +164,3 @@

"chaining setters" : function(test) {
"chaining setters" : function (test) {
test.expect(7);

@@ -142,3 +185,3 @@

"day setter" : function(test) {
"day setter" : function (test) {
test.expect(18);

@@ -145,0 +188,0 @@

var moment = require("../../moment");
exports.is_after = {
"is after without units" : function(test) {
"is after without units" : function (test) {
test.expect(17);
var m = moment(new Date(2011, 3, 2, 3, 4, 5, 10)), mCopy = moment(m);
test.equal(m.isAfter(moment(new Date(2012, 3, 2, 3, 5, 5, 10))), false, "year is later");
test.equal(m.isAfter(moment(new Date(2010, 3, 2, 3, 3, 5, 10))), true, "year is earlier");
test.equal(m.isAfter(moment(new Date(2011, 4, 2, 3, 4, 5, 10))), false, "month is later");
test.equal(m.isAfter(moment(new Date(2011, 2, 2, 3, 4, 5, 10))), true, "month is earlier");
test.equal(m.isAfter(moment(new Date(2011, 3, 3, 3, 4, 5, 10))), false, "day is later");
test.equal(m.isAfter(moment(new Date(2011, 3, 1, 3, 4, 5, 10))), true, "day is earlier");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 4, 4, 5, 10))), false, "hour is later");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 2, 4, 5, 10))), true, "hour is earlier");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 5, 5, 10))), false, "minute is later");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 3, 5, 10))), true, "minute is earlier");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 4, 6, 10))), false, "second is later");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 4, 4, 11))), true, "second is earlier");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 4, 5, 10))), false, "millisecond match");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 4, 5, 11))), false, "millisecond is later");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 4, 5, 9))), true, "millisecond is earlier");
test.equal(m.isAfter(moment(new Date(2012, 3, 2, 3, 5, 5, 10))), false, "year is later");
test.equal(m.isAfter(moment(new Date(2010, 3, 2, 3, 3, 5, 10))), true, "year is earlier");
test.equal(m.isAfter(moment(new Date(2011, 4, 2, 3, 4, 5, 10))), false, "month is later");
test.equal(m.isAfter(moment(new Date(2011, 2, 2, 3, 4, 5, 10))), true, "month is earlier");
test.equal(m.isAfter(moment(new Date(2011, 3, 3, 3, 4, 5, 10))), false, "day is later");
test.equal(m.isAfter(moment(new Date(2011, 3, 1, 3, 4, 5, 10))), true, "day is earlier");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 4, 4, 5, 10))), false, "hour is later");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 2, 4, 5, 10))), true, "hour is earlier");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 5, 5, 10))), false, "minute is later");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 3, 5, 10))), true, "minute is earlier");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 4, 6, 10))), false, "second is later");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 4, 4, 11))), true, "second is earlier");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 4, 5, 10))), false, "millisecond match");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 4, 5, 11))), false, "millisecond is later");
test.equal(m.isAfter(moment(new Date(2011, 3, 2, 3, 4, 5, 9))), true, "millisecond is earlier");
test.equal(m.isAfter(m), false, "moments are not after themselves");

@@ -28,3 +28,3 @@ test.equal(+m, +mCopy, "isAfter second should not change moment");

"is after year" : function(test) {
"is after year" : function (test) {
test.expect(11);

@@ -47,3 +47,3 @@

"is after month" : function(test) {
"is after month" : function (test) {
test.expect(13);

@@ -68,3 +68,3 @@

"is after day" : function(test) {
"is after day" : function (test) {
test.expect(15);

@@ -91,3 +91,3 @@

"is after hour" : function(test) {
"is after hour" : function (test) {
test.expect(16);

@@ -115,3 +115,3 @@

"is after minute" : function(test) {
"is after minute" : function (test) {
test.expect(18);

@@ -141,3 +141,3 @@

"is after second" : function(test) {
"is after second" : function (test) {
test.expect(20);

@@ -169,3 +169,3 @@

"is after millisecond" : function(test) {
"is after millisecond" : function (test) {
test.expect(18);

@@ -172,0 +172,0 @@

var moment = require("../../moment");
exports.is_before = {
"is after without units" : function(test) {
"is after without units" : function (test) {
test.expect(17);
var m = moment(new Date(2011, 3, 2, 3, 4, 5, 10)), mCopy = moment(m);
test.equal(m.isBefore(moment(new Date(2012, 3, 2, 3, 5, 5, 10))), true, "year is later");
test.equal(m.isBefore(moment(new Date(2010, 3, 2, 3, 3, 5, 10))), false, "year is earlier");
test.equal(m.isBefore(moment(new Date(2011, 4, 2, 3, 4, 5, 10))), true, "month is later");
test.equal(m.isBefore(moment(new Date(2011, 2, 2, 3, 4, 5, 10))), false, "month is earlier");
test.equal(m.isBefore(moment(new Date(2011, 3, 3, 3, 4, 5, 10))), true, "day is later");
test.equal(m.isBefore(moment(new Date(2011, 3, 1, 3, 4, 5, 10))), false, "day is earlier");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 4, 4, 5, 10))), true, "hour is later");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 2, 4, 5, 10))), false, "hour is earlier");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 5, 5, 10))), true, "minute is later");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 3, 5, 10))), false, "minute is earlier");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 4, 6, 10))), true, "second is later");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 4, 4, 11))), false, "second is earlier");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 4, 5, 10))), false, "millisecond match");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 4, 5, 11))), true, "millisecond is later");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 4, 5, 9))), false, "millisecond is earlier");
test.equal(m.isBefore(moment(new Date(2012, 3, 2, 3, 5, 5, 10))), true, "year is later");
test.equal(m.isBefore(moment(new Date(2010, 3, 2, 3, 3, 5, 10))), false, "year is earlier");
test.equal(m.isBefore(moment(new Date(2011, 4, 2, 3, 4, 5, 10))), true, "month is later");
test.equal(m.isBefore(moment(new Date(2011, 2, 2, 3, 4, 5, 10))), false, "month is earlier");
test.equal(m.isBefore(moment(new Date(2011, 3, 3, 3, 4, 5, 10))), true, "day is later");
test.equal(m.isBefore(moment(new Date(2011, 3, 1, 3, 4, 5, 10))), false, "day is earlier");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 4, 4, 5, 10))), true, "hour is later");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 2, 4, 5, 10))), false, "hour is earlier");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 5, 5, 10))), true, "minute is later");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 3, 5, 10))), false, "minute is earlier");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 4, 6, 10))), true, "second is later");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 4, 4, 11))), false, "second is earlier");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 4, 5, 10))), false, "millisecond match");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 4, 5, 11))), true, "millisecond is later");
test.equal(m.isBefore(moment(new Date(2011, 3, 2, 3, 4, 5, 9))), false, "millisecond is earlier");
test.equal(m.isBefore(m), false, "moments are not before themselves");

@@ -28,3 +28,3 @@ test.equal(+m, +mCopy, "isBefore second should not change moment");

"is before year" : function(test) {
"is before year" : function (test) {
test.expect(11);

@@ -47,3 +47,3 @@

"is before month" : function(test) {
"is before month" : function (test) {
test.expect(13);

@@ -68,3 +68,3 @@

"is before day" : function(test) {
"is before day" : function (test) {
test.expect(15);

@@ -91,3 +91,3 @@

"is before hour" : function(test) {
"is before hour" : function (test) {
test.expect(16);

@@ -115,3 +115,3 @@

"is before minute" : function(test) {
"is before minute" : function (test) {
test.expect(18);

@@ -141,3 +141,3 @@

"is before second" : function(test) {
"is before second" : function (test) {
test.expect(20);

@@ -169,3 +169,3 @@

"is before millisecond" : function(test) {
"is before millisecond" : function (test) {
test.expect(18);

@@ -172,0 +172,0 @@

var moment = require('../../moment');
exports.is_moment = {
"is moment object": function(test) {
"is moment object": function (test) {
test.expect(11);
var MyObj = function() {};
MyObj.prototype.toDate = function() {
var MyObj = function () {};
MyObj.prototype.toDate = function () {
return new Date();
}
};

@@ -12,0 +12,0 @@ test.ok(moment.isMoment(moment()), 'simple moment object');

var moment = require("../../moment");
exports.is_same = {
"is same without units" : function(test) {
"is same without units" : function (test) {
test.expect(17);
var m = moment(new Date(2011, 3, 2, 3, 4, 5, 10)), mCopy = moment(m);
test.equal(m.isSame(moment(new Date(2012, 3, 2, 3, 5, 5, 10))), false, "year is later");
test.equal(m.isSame(moment(new Date(2010, 3, 2, 3, 3, 5, 10))), false, "year is earlier");
test.equal(m.isSame(moment(new Date(2011, 4, 2, 3, 4, 5, 10))), false, "month is later");
test.equal(m.isSame(moment(new Date(2011, 2, 2, 3, 4, 5, 10))), false, "month is earlier");
test.equal(m.isSame(moment(new Date(2011, 3, 3, 3, 4, 5, 10))), false, "day is later");
test.equal(m.isSame(moment(new Date(2011, 3, 1, 3, 4, 5, 10))), false, "day is earlier");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 4, 4, 5, 10))), false, "hour is later");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 2, 4, 5, 10))), false, "hour is earlier");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 3, 5, 5, 10))), false, "minute is later");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 3, 3, 5, 10))), false, "minute is earlier");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 3, 4, 6, 10))), false, "second is later");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 3, 4, 4, 11))), false, "second is earlier");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 3, 4, 5, 10))), true, "millisecond match");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 3, 4, 5, 11))), false, "millisecond is later");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 3, 4, 5, 9))), false, "millisecond is earlier");
test.equal(m.isSame(moment(new Date(2012, 3, 2, 3, 5, 5, 10))), false, "year is later");
test.equal(m.isSame(moment(new Date(2010, 3, 2, 3, 3, 5, 10))), false, "year is earlier");
test.equal(m.isSame(moment(new Date(2011, 4, 2, 3, 4, 5, 10))), false, "month is later");
test.equal(m.isSame(moment(new Date(2011, 2, 2, 3, 4, 5, 10))), false, "month is earlier");
test.equal(m.isSame(moment(new Date(2011, 3, 3, 3, 4, 5, 10))), false, "day is later");
test.equal(m.isSame(moment(new Date(2011, 3, 1, 3, 4, 5, 10))), false, "day is earlier");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 4, 4, 5, 10))), false, "hour is later");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 2, 4, 5, 10))), false, "hour is earlier");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 3, 5, 5, 10))), false, "minute is later");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 3, 3, 5, 10))), false, "minute is earlier");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 3, 4, 6, 10))), false, "second is later");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 3, 4, 4, 11))), false, "second is earlier");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 3, 4, 5, 10))), true, "millisecond match");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 3, 4, 5, 11))), false, "millisecond is later");
test.equal(m.isSame(moment(new Date(2011, 3, 2, 3, 4, 5, 9))), false, "millisecond is earlier");
test.equal(m.isSame(m), true, "moments are the same as themselves");

@@ -28,3 +28,3 @@ test.equal(+m, +mCopy, "isSame second should not change moment");

"is same year" : function(test) {
"is same year" : function (test) {
test.expect(9);

@@ -45,3 +45,3 @@

"is same month" : function(test) {
"is same month" : function (test) {
test.expect(10);

@@ -63,3 +63,3 @@

"is same day" : function(test) {
"is same day" : function (test) {
test.expect(11);

@@ -82,3 +82,3 @@

"is same hour" : function(test) {
"is same hour" : function (test) {
test.expect(12);

@@ -102,3 +102,3 @@

"is same minute" : function(test) {
"is same minute" : function (test) {
test.expect(13);

@@ -123,3 +123,3 @@

"is same second" : function(test) {
"is same second" : function (test) {
test.expect(14);

@@ -145,3 +145,3 @@

"is same millisecond" : function(test) {
"is same millisecond" : function (test) {
test.expect(18);

@@ -148,0 +148,0 @@

@@ -112,7 +112,7 @@ var moment = require("../../moment");

'2010-01-01T23:59:60'
];
], i;
test.expect(tests.length * 2);
for (var i = 0; i < tests.length; i++) {
for (i = 0; i < tests.length; i++) {
test.equal(moment(tests[i]).isValid(), false, tests[i] + ' should be invalid');

@@ -134,7 +134,7 @@ test.equal(moment.utc(tests[i]).isValid(), false, tests[i] + ' should be invalid');

'2010-01-40T23:59:59.9999+00:00'
];
], i;
test.expect(tests.length * 2);
for (var i = 0; i < tests.length; i++) {
for (i = 0; i < tests.length; i++) {
test.equal(moment(tests[i]).isValid(), false, tests[i] + ' should be invalid');

@@ -156,7 +156,7 @@ test.equal(moment.utc(tests[i]).isValid(), false, tests[i] + ' should be invalid');

'2010-01-30T00:00:00.000+07:00'
];
], i;
test.expect(tests.length * 2);
for (var i = 0; i < tests.length; i++) {
for (i = 0; i < tests.length; i++) {
test.equal(moment(tests[i]).isValid(), true, tests[i] + ' should be valid');

@@ -166,3 +166,16 @@ test.equal(moment.utc(tests[i]).isValid(), true, tests[i] + ' should be valid');

test.done();
},
"invalidAt" : function (test) {
test.expect(7);
test.equal(moment([2000, 12]).invalidAt(), 1, 'month 12 is invalid: 0-11');
test.equal(moment([2000, 1, 30]).invalidAt(), 2, '30 is not a valid february day');
test.equal(moment([2000, 1, 29, 24]).invalidAt(), 3, '24 is invalid hour');
test.equal(moment([2000, 1, 29, 23, 60]).invalidAt(), 4, '60 is invalid minute');
test.equal(moment([2000, 1, 29, 23, 59, 60]).invalidAt(), 5, '60 is invalid second');
test.equal(moment([2000, 1, 29, 23, 59, 59, 1000]).invalidAt(), 6, '1000 is invalid millisecond');
test.equal(moment([2000, 1, 29, 23, 59, 59, 999]).invalidAt(), -1, '-1 if everything is fine');
test.done();
}
};

@@ -5,3 +5,3 @@ var moment = require("../../moment");

"library getter" : function (test) {
test.expect(5);
test.expect(7);

@@ -23,2 +23,8 @@ moment.lang('en');

moment.lang('EN');
test.equal(moment.lang(), 'en', 'Normalize language key case');
moment.lang('EN_gb');
test.equal(moment.lang(), 'en-gb', 'Normalize language key underscore');
test.done();

@@ -25,0 +31,0 @@ },

var moment = require("../../moment");
exports.leapyear = {
"leap year" : function(test) {
"leap year" : function (test) {
test.expect(4);

@@ -6,0 +6,0 @@

@@ -19,17 +19,18 @@ var moment = require("../../moment");

future = now.clone().add(1, 'month'),
past = now.clone().subtract(1, 'month');
past = now.clone().subtract(1, 'month'),
eps = 10;
// we use Math.abs(a.diff(b)) < 2 to prevent issues where
// we use Math.abs(a.diff(b)) < eps to prevent issues where
// two moments are off by a millisecond.
test.ok(Math.abs(past.min(now).diff(now)) < 2, "A past date with the minimum of now should be now");
test.ok(Math.abs(past.min().diff(now)) < 2, "A past date with the minimum of implied now should be now");
test.ok(Math.abs(past.min(future).diff(future)) < 2, "A past date with the minimum of the future should be the future date");
test.ok(Math.abs(past.min(now).diff(now)) < eps, "A past date with the minimum of now should be now");
test.ok(Math.abs(past.min().diff(now)) < eps, "A past date with the minimum of implied now should be now");
test.ok(Math.abs(past.min(future).diff(future)) < eps, "A past date with the minimum of the future should be the future date");
test.ok(Math.abs(future.min(now).diff(future)) < 2, "A future date with the minimum of now should be the future");
test.ok(Math.abs(future.min().diff(future)) < 2, "A future date with the minimum of implied now should be the future");
test.ok(Math.abs(future.min(past).diff(future)) < 2, "A future date with the minimum of the past should be the future");
test.ok(Math.abs(future.min(now).diff(future)) < eps, "A future date with the minimum of now should be the future");
test.ok(Math.abs(future.min().diff(future)) < eps, "A future date with the minimum of implied now should be the future");
test.ok(Math.abs(future.min(past).diff(future)) < eps, "A future date with the minimum of the past should be the future");
test.ok(Math.abs(now.min(past).diff(now)) < 2, "Now with the minimum of the past should be now");
test.ok(Math.abs(now.min(future).diff(future)) < 2, "Now with the minimum of the future should be the future");
test.ok(Math.abs(now.min(past).diff(now)) < eps, "Now with the minimum of the past should be now");
test.ok(Math.abs(now.min(future).diff(future)) < eps, "Now with the minimum of the future should be the future");

@@ -44,17 +45,18 @@ test.done();

future = now.clone().add(1, 'month'),
past = now.clone().subtract(1, 'month');
past = now.clone().subtract(1, 'month'),
eps = 10;
// we use Math.abs(a.diff(b)) < 2 to prevent issues where
// we use Math.abs(a.diff(b)) < eps to prevent issues where
// two moments are off by a millisecond.
test.ok(Math.abs(past.max(now).diff(past)) < 2, "A past date with the maximum of now should be the past");
test.ok(Math.abs(past.max().diff(past)) < 2, "A past date with the maximum of implied now should be the past");
test.ok(Math.abs(past.max(future).diff(past)) < 2, "A past date with the maximum of the future should be the past");
test.ok(Math.abs(past.max(now).diff(past)) < eps, "A past date with the maximum of now should be the past");
test.ok(Math.abs(past.max().diff(past)) < eps, "A past date with the maximum of implied now should be the past");
test.ok(Math.abs(past.max(future).diff(past)) < eps, "A past date with the maximum of the future should be the past");
test.ok(Math.abs(future.max(now).diff(now)) < 2, "A future date with the maximum of now should be now");
test.ok(Math.abs(future.max().diff(now)) < 2, "A future date with the maximum of implied now should be now");
test.ok(Math.abs(future.max(past).diff(past)) < 2, "A future date with the maximum of the past should be the past");
test.ok(Math.abs(future.max(now).diff(now)) < eps, "A future date with the maximum of now should be now");
test.ok(Math.abs(future.max().diff(now)) < eps, "A future date with the maximum of implied now should be now");
test.ok(Math.abs(future.max(past).diff(past)) < eps, "A future date with the maximum of the past should be the past");
test.ok(Math.abs(now.max(past).diff(past)) < 2, "Now with the maximum of the past should be the past");
test.ok(Math.abs(now.max(future).diff(now)) < 2, "Now with the maximum of the future should be now");
test.ok(Math.abs(now.max(past).diff(past)) < eps, "Now with the maximum of the past should be the past");
test.ok(Math.abs(now.max(future).diff(now)) < eps, "Now with the maximum of the future should be now");

@@ -61,0 +63,0 @@ test.done();

@@ -7,17 +7,17 @@ var moment = require("../../moment");

var mutableMethods = {
'year': function (m){ return m.year(2011); },
'month': function (m){ return m.month(1); },
'date': function (m){ return m.date(9); },
'hours': function (m){ return m.hours(7); },
'minutes': function (m){ return m.minutes(33); },
'seconds': function (m){ return m.seconds(44); },
'milliseconds': function (m){ return m.milliseconds(55); },
'day': function (m){ return m.day(2); },
'startOf': function (m){ return m.startOf('week') },
'endOf': function (m){ return m.endOf('week') },
'add': function (m){ return m.add('days', 1) },
'subtract': function (m){ return m.subtract('years', 2) },
'local': function (m){ return m.local() },
'utc': function (m){ return m.utc() }
};
'year': function (m) { return m.year(2011); },
'month': function (m) { return m.month(1); },
'date': function (m) { return m.date(9); },
'hours': function (m) { return m.hours(7); },
'minutes': function (m) { return m.minutes(33); },
'seconds': function (m) { return m.seconds(44); },
'milliseconds': function (m) { return m.milliseconds(55); },
'day': function (m) { return m.day(2); },
'startOf': function (m) { return m.startOf('week'); },
'endOf': function (m) { return m.endOf('week'); },
'add': function (m) { return m.add('days', 1); },
'subtract': function (m) { return m.subtract('years', 2); },
'local': function (m) { return m.local(); },
'utc': function (m) { return m.utc(); }
}, method, d, d2;

@@ -28,4 +28,4 @@ test.expect(14);

if (mutableMethods.hasOwnProperty(method)) {
var d = moment();
var d2 = mutableMethods[method](d);
d = moment();
d2 = mutableMethods[method](d);
test.equal(d, d2, method + "() should be mutable");

@@ -41,11 +41,11 @@ }

var nonMutableMethods = {
'clone': function (m){ return m.clone() }
};
'clone': function (m) { return m.clone(); }
}, method, d, d2;
test.expect(1);
for (method in nonMutableMethods){
for (method in nonMutableMethods) {
if (nonMutableMethods.hasOwnProperty(method)) {
var d = new Date();
var d2 = nonMutableMethods[method](moment(d)).toDate();
d = new Date();
d2 = nonMutableMethods[method](moment(d)).toDate();
test.notEqual(d, d2, method + "() should not be mutable");

@@ -52,0 +52,0 @@ }

@@ -5,30 +5,30 @@ var moment = require("../../moment");

var symbolMap = {
'1': '!',
'2': '@',
'3': '#',
'4': '$',
'5': '%',
'6': '^',
'7': '&',
'8': '*',
'9': '(',
'0': ')'
'1': '!',
'2': '@',
'3': '#',
'4': '$',
'5': '%',
'6': '^',
'7': '&',
'8': '*',
'9': '(',
'0': ')'
};
var numberMap = {
'!': '1',
'@': '2',
'#': '3',
'$': '4',
'%': '5',
'^': '6',
'&': '7',
'*': '8',
'(': '9',
')': '0'
'!': '1',
'@': '2',
'#': '3',
'$': '4',
'%': '5',
'^': '6',
'&': '7',
'*': '8',
'(': '9',
')': '0'
};
var symbolLang = {
preparse: function(string) {
return string.replace(/[!@#$%\^&*()]/g, function(match) {
preparse: function (string) {
return string.replace(/[!@#$%\^&*()]/g, function (match) {
return numberMap[match];

@@ -38,4 +38,4 @@ });

postformat: function(string) {
return string.replace(/\d/g, function(match) {
postformat: function (string) {
return string.replace(/\d/g, function (match) {
return symbolMap[match];

@@ -47,3 +47,3 @@ });

exports.preparse_postformat = {
setUp: function(cb) {
setUp: function (cb) {
moment.lang('symbol', symbolLang);

@@ -53,3 +53,3 @@ cb();

tearDown: function(cb) {
tearDown: function (cb) {
moment.lang('en-gb');

@@ -59,3 +59,3 @@ cb();

"transform": function(test) {
"transform": function (test) {
test.expect(3);

@@ -70,3 +70,3 @@

"transform from": function(test) {
"transform from": function (test) {
test.expect(3);

@@ -76,3 +76,3 @@

test.equal(start.from(moment([2007, 1, 28]).add({s:90}), true), "@ minutes", "postformat should work on moment.fn.from");
test.equal(start.from(moment([2007, 1, 28]).add({s: 90}), true), "@ minutes", "postformat should work on moment.fn.from");
test.equal(moment().add('d', 6).fromNow(true), "^ days", "postformat should work on moment.fn.fromNow");

@@ -84,3 +84,3 @@ test.equal(moment.duration(10, "h").humanize(), "!) hours", "postformat should work on moment.duration.fn.humanize");

"calendar day" : function(test) {
"calendar day" : function (test) {
test.expect(6);

@@ -87,0 +87,0 @@

@@ -14,8 +14,8 @@ var moment = require("../../moment");

"start of year" : function(test) {
"start of year" : function (test) {
test.expect(9);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('year');
var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('years');
var ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('y');
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('year'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('years'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('y');
test.equal(+m, +ms, "Plural or singular should work");

@@ -33,8 +33,8 @@ test.equal(+m, +ma, "Full or abbreviated should work");

"end of year" : function(test) {
"end of year" : function (test) {
test.expect(9);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('year');
var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('years');
var ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('y');
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('year'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('years'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('y');
test.equal(+m, +ms, "Plural or singular should work");

@@ -52,8 +52,8 @@ test.equal(+m, +ma, "Full or abbreviated should work");

"start of month" : function(test) {
"start of month" : function (test) {
test.expect(9);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('month');
var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('months');
var ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('M');
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('month'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('months'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('M');
test.equal(+m, +ms, "Plural or singular should work");

@@ -71,8 +71,8 @@ test.equal(+m, +ma, "Full or abbreviated should work");

"end of month" : function(test) {
"end of month" : function (test) {
test.expect(9);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('month');
var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('months');
var ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('M');
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('month'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('months'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('M');
test.equal(+m, +ms, "Plural or singular should work");

@@ -90,8 +90,8 @@ test.equal(+m, +ma, "Full or abbreviated should work");

"start of week" : function(test) {
"start of week" : function (test) {
test.expect(10);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('week');
var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('weeks');
var ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('w');
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('week'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('weeks'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('w');
test.equal(+m, +ms, "Plural or singular should work");

@@ -110,8 +110,8 @@ test.equal(+m, +ma, "Full or abbreviated should work");

"end of week" : function(test) {
"end of week" : function (test) {
test.expect(10);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('week');
var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('weeks');
var ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('weeks');
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('week'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('weeks'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('weeks');
test.equal(+m, +ms, "Plural or singular should work");

@@ -130,8 +130,46 @@ test.equal(+m, +ma, "Full or abbreviated should work");

"start of day" : function(test) {
"start of iso-week" : function (test) {
test.expect(10);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('isoWeek'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('isoWeeks'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('W');
test.equal(+m, +ms, "Plural or singular should work");
test.equal(+m, +ma, "Full or abbreviated should work");
test.equal(m.year(), 2011, "keep the year");
test.equal(m.month(), 0, "rollback to January");
test.equal(m.isoWeekday(), 1, "set day of iso-week");
test.equal(m.date(), 31, "set correct date");
test.equal(m.hours(), 0, "strip out the hours");
test.equal(m.minutes(), 0, "strip out the minutes");
test.equal(m.seconds(), 0, "strip out the seconds");
test.equal(m.milliseconds(), 0, "strip out the milliseconds");
test.done();
},
"end of iso-week" : function (test) {
test.expect(10);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('isoWeek'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('isoWeeks'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('W');
test.equal(+m, +ms, "Plural or singular should work");
test.equal(+m, +ma, "Full or abbreviated should work");
test.equal(m.year(), 2011, "keep the year");
test.equal(m.month(), 1, "keep the month");
test.equal(m.isoWeekday(), 7, "set the day of the week");
test.equal(m.date(), 6, "set the day");
test.equal(m.hours(), 23, "set the hours");
test.equal(m.minutes(), 59, "set the minutes");
test.equal(m.seconds(), 59, "set the seconds");
test.equal(m.milliseconds(), 999, "set the seconds");
test.done();
},
"start of day" : function (test) {
test.expect(9);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('day');
var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('days');
var ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('d');
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('day'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('days'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('d');
test.equal(+m, +ms, "Plural or singular should work");

@@ -149,8 +187,8 @@ test.equal(+m, +ma, "Full or abbreviated should work");

"end of day" : function(test) {
"end of day" : function (test) {
test.expect(9);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('day');
var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('days');
var ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('d');
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('day'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('days'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('d');
test.equal(+m, +ms, "Plural or singular should work");

@@ -168,8 +206,8 @@ test.equal(+m, +ma, "Full or abbreviated should work");

"start of hour" : function(test) {
"start of hour" : function (test) {
test.expect(9);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('hour');
var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('hours');
var ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('h');
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('hour'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('hours'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('h');
test.equal(+m, +ms, "Plural or singular should work");

@@ -187,8 +225,8 @@ test.equal(+m, +ma, "Full or abbreviated should work");

"end of hour" : function(test) {
"end of hour" : function (test) {
test.expect(9);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('hour');
var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('hours');
var ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('h');
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('hour'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('hours'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('h');
test.equal(+m, +ms, "Plural or singular should work");

@@ -206,8 +244,8 @@ test.equal(+m, +ma, "Full or abbreviated should work");

"start of minute" : function(test) {
"start of minute" : function (test) {
test.expect(9);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('minute');
var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('minutes');
var ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('m');
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('minute'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('minutes'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('m');
test.equal(+m, +ms, "Plural or singular should work");

@@ -225,8 +263,8 @@ test.equal(+m, +ma, "Full or abbreviated should work");

"end of minute" : function(test) {
"end of minute" : function (test) {
test.expect(9);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('minute');
var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('minutes');
var ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('m');
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('minute'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('minutes'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('m');
test.equal(+m, +ms, "Plural or singular should work");

@@ -244,10 +282,10 @@ test.equal(+m, +ma, "Full or abbreviated should work");

"start of second" : function(test) {
"start of second" : function (test) {
test.expect(9);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('second');
var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('seconds');
var ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('s');
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('second'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('seconds'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).startOf('s');
test.equal(+m, +ms, "Plural or singular should work");
test.equal(+m, +ma, "Full or abbreviated should work");
test.equal(+m, +ma, "Full or abbreviated should work");
test.equal(m.year(), 2011, "keep the year");

@@ -263,8 +301,8 @@ test.equal(m.month(), 1, "keep the month");

"end of second" : function(test) {
"end of second" : function (test) {
test.expect(9);
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('second');
var ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('seconds');
var ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('s');
var m = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('second'),
ms = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('seconds'),
ma = moment(new Date(2011, 1, 2, 3, 4, 5, 6)).endOf('s');
test.equal(+m, +ms, "Plural or singular should work");

@@ -271,0 +309,0 @@ test.equal(+m, +ma, "Full or abbreviated should work");

var moment = require("../../moment");
exports.add = {
"string prototype overrides call" : function(test) {
exports.string_prototype = {
"string prototype overrides call" : function (test) {
test.expect(1);
var prior = String.prototype.call;
String.prototype.call = function() { return null;};
moment.lang('en');
var prior = String.prototype.call, b;
String.prototype.call = function () { return null; };
var b = moment(new Date(2011, 7, 28, 15, 25, 50, 125));
b = moment(new Date(2011, 7, 28, 15, 25, 50, 125));
test.equal(b.format('MMMM Do YYYY, h:mm a'), 'August 28th 2011, 3:25 pm');

@@ -12,0 +13,0 @@

@@ -14,6 +14,6 @@ var moment = require("../../moment");

"utc and local" : function(test) {
"utc and local" : function (test) {
test.expect(7);
var m = moment(Date.UTC(2011, 1, 2, 3, 4, 5, 6));
var m = moment(Date.UTC(2011, 1, 2, 3, 4, 5, 6)), zone, expected;
m.utc();

@@ -34,4 +34,4 @@ // utc

}
var zone = Math.ceil(m.zone() / 60);
var expected = (24 + 3 - zone) % 24;
zone = Math.ceil(m.zone() / 60);
expected = (24 + 3 - zone) % 24;
test.equal(m.hours(), expected, "the hours (" + m.hours() + ") should be correct for local");

@@ -42,6 +42,6 @@ test.equal(moment().utc().zone(), 0, "timezone in utc should always be zero");

"creating with utc" : function(test) {
"creating with utc" : function (test) {
test.expect(7);
var diff = moment.utc().valueOf() - moment().valueOf();
var diff = moment.utc().valueOf() - moment().valueOf(), m;
diff = Math.abs(diff);

@@ -52,3 +52,3 @@ // we check the diff rather than equality because sometimes they are off by a millisecond

var m = moment.utc([2011, 1, 2, 3, 4, 5, 6]);
m = moment.utc([2011, 1, 2, 3, 4, 5, 6]);
test.equal(m.date(), 2, "the day should be correct for utc array");

@@ -68,3 +68,3 @@ test.equal(m.hours(), 3, "the hours should be correct for utc array");

"creating with utc without timezone" : function(test) {
"creating with utc without timezone" : function (test) {
test.expect(4);

@@ -81,3 +81,17 @@

test.done();
},
"cloning with utc" : function (test) {
test.expect(4);
var m = moment.utc("2012-01-02T08:20:00");
test.equal(moment.utc(m)._isUTC, true, "the local zone should be converted to UTC");
test.equal(moment.utc(m.clone().utc())._isUTC, true, "the local zone should stay in UTC");
m.zone(120);
test.equal(moment.utc(m)._isUTC, true, "the explicit zone should stay in UTC");
test.equal(moment.utc(m).zone(), 0, "the explicit zone should have an offset of 0");
test.done();
}
};
var moment = require("../../moment");
exports.week_year = {
"iso week year": function(test) {
"iso week year": function (test) {
test.expect(19);

@@ -31,7 +31,7 @@

"week year": function(test) {
"week year": function (test) {
test.expect(31);
// Some examples taken from http://en.wikipedia.org/wiki/ISO_week
moment.lang('dow:1,doy:4', {week: {dow: 1, doy: 4}}); // like iso
moment.lang('dow: 1,doy: 4', {week: {dow: 1, doy: 4}}); // like iso
test.equal(moment([2005, 0, 1]).weekYear(), 2004);

@@ -57,3 +57,3 @@ test.equal(moment([2005, 0, 2]).weekYear(), 2004);

moment.lang('dow:1,doy:7', {week: {dow: 1, doy: 7}});
moment.lang('dow: 1,doy: 7', {week: {dow: 1, doy: 7}});
test.equal(moment([2004, 11, 26]).weekYear(), 2004);

@@ -60,0 +60,0 @@ test.equal(moment([2004, 11, 27]).weekYear(), 2005);

var moment = require("../../moment");
exports.week_year = {
"iso weekday": function(test) {
"iso weekday": function (test) {
var i;

@@ -9,3 +9,3 @@ test.expect(7 * 7);

for (i = 0; i < 7; ++i) {
moment.lang('dow:' + i + ',doy:6', {week: {dow: i, doy: 6}});
moment.lang('dow:' + i + ',doy: 6', {week: {dow: i, doy: 6}});
test.equal(moment([1985, 1, 4]).isoWeekday(), 1, "Feb 4 1985 is Monday -- 1st day");

@@ -22,3 +22,3 @@ test.equal(moment([2029, 8, 18]).isoWeekday(), 2, "Sep 18 2029 is Tuesday -- 2nd day");

"iso weekday setter" : function(test) {
"iso weekday setter" : function (test) {
test.expect(27);

@@ -62,6 +62,6 @@

"weekday first day of week Sunday (dow 0)": function(test) {
"weekday first day of week Sunday (dow 0)": function (test) {
test.expect(7);
moment.lang('dow:0,doy:6', {week: {dow: 0, doy: 6}});
moment.lang('dow: 0,doy: 6', {week: {dow: 0, doy: 6}});
test.equal(moment([1985, 1, 3]).weekday(), 0, "Feb 3 1985 is Sunday -- 0th day");

@@ -77,6 +77,6 @@ test.equal(moment([2029, 8, 17]).weekday(), 1, "Sep 17 2029 is Monday -- 1st day");

"weekday first day of week Monday (dow 1)": function(test) {
"weekday first day of week Monday (dow 1)": function (test) {
test.expect(7);
moment.lang('dow:1,doy:6', {week: {dow: 1, doy: 6}});
moment.lang('dow: 1,doy: 6', {week: {dow: 1, doy: 6}});
test.equal(moment([1985, 1, 4]).weekday(), 0, "Feb 4 1985 is Monday -- 0th day");

@@ -92,6 +92,6 @@ test.equal(moment([2029, 8, 18]).weekday(), 1, "Sep 18 2029 is Tuesday -- 1st day");

"weekday first day of week Tuesday (dow 2)": function(test) {
"weekday first day of week Tuesday (dow 2)": function (test) {
test.expect(7);
moment.lang('dow:2,doy:6', {week: {dow: 2, doy: 6}});
moment.lang('dow: 2,doy: 6', {week: {dow: 2, doy: 6}});
test.equal(moment([1985, 1, 5]).weekday(), 0, "Feb 5 1985 is Tuesday -- 0th day");

@@ -107,6 +107,6 @@ test.equal(moment([2029, 8, 19]).weekday(), 1, "Sep 19 2029 is Wednesday -- 1st day");

"weekday first day of week Wednesday (dow 3)": function(test) {
"weekday first day of week Wednesday (dow 3)": function (test) {
test.expect(7);
moment.lang('dow:3,doy:6', {week: {dow: 3, doy: 6}});
moment.lang('dow: 3,doy: 6', {week: {dow: 3, doy: 6}});
test.equal(moment([1985, 1, 6]).weekday(), 0, "Feb 6 1985 is Wednesday -- 0th day");

@@ -119,9 +119,10 @@ test.equal(moment([2029, 8, 20]).weekday(), 1, "Sep 20 2029 is Thursday -- 1st day");

test.equal(moment([2000, 0, 4]).weekday(), 6, "Jan 4 2000 is Tuesday -- 6th day");
moment.lang('dow:3,doy:6', null);
test.done();
},
"weekday first day of week Thursday (dow 4)": function(test) {
"weekday first day of week Thursday (dow 4)": function (test) {
test.expect(7);
moment.lang('dow:4,doy:6', {week: {dow: 4, doy: 6}});
moment.lang('dow: 4,doy: 6', {week: {dow: 4, doy: 6}});

@@ -138,6 +139,6 @@ test.equal(moment([1985, 1, 7]).weekday(), 0, "Feb 7 1985 is Thursday -- 0th day");

"weekday first day of week Friday (dow 5)": function(test) {
"weekday first day of week Friday (dow 5)": function (test) {
test.expect(7);
moment.lang('dow:5,doy:6', {week: {dow: 5, doy: 6}});
moment.lang('dow: 5,doy: 6', {week: {dow: 5, doy: 6}});
test.equal(moment([1985, 1, 8]).weekday(), 0, "Feb 8 1985 is Friday -- 0th day");

@@ -153,6 +154,6 @@ test.equal(moment([2029, 8, 22]).weekday(), 1, "Sep 22 2029 is Staturday -- 1st day");

"weekday first day of week Saturday (dow 6)": function(test) {
"weekday first day of week Saturday (dow 6)": function (test) {
test.expect(7);
moment.lang('dow:6,doy:6', {week: {dow: 6, doy: 6}});
moment.lang('dow: 6,doy: 6', {week: {dow: 6, doy: 6}});
test.equal(moment([1985, 1, 9]).weekday(), 0, "Feb 9 1985 is Staturday -- 0th day");

@@ -159,0 +160,0 @@ test.equal(moment([2029, 8, 23]).weekday(), 1, "Sep 23 2029 is Sunday -- 1st day");

@@ -36,5 +36,5 @@ var moment = require("../../moment");

test.equal(moment([2000, 11, 31]).dayOfYear(200).dayOfYear(), 200, "Setting Dec 31 2000 day of the year to 200 should work");
test.equal(moment().dayOfYear( 1).dayOfYear(), 1, "Setting day of the year to 1 should work");
test.equal(moment().dayOfYear( 59).dayOfYear(), 59, "Setting day of the year to 59 should work");
test.equal(moment().dayOfYear( 60).dayOfYear(), 60, "Setting day of the year to 60 should work");
test.equal(moment().dayOfYear(1).dayOfYear(), 1, "Setting day of the year to 1 should work");
test.equal(moment().dayOfYear(59).dayOfYear(), 59, "Setting day of the year to 59 should work");
test.equal(moment().dayOfYear(60).dayOfYear(), 60, "Setting day of the year to 60 should work");
test.equal(moment().dayOfYear(365).dayOfYear(), 365, "Setting day of the year to 365 should work");

@@ -45,3 +45,3 @@

"iso weeks year starting sunday" : function(test) {
"iso weeks year starting sunday" : function (test) {
test.expect(5);

@@ -58,3 +58,3 @@

"iso weeks year starting monday" : function(test) {
"iso weeks year starting monday" : function (test) {
test.expect(5);

@@ -71,3 +71,3 @@

"iso weeks year starting tuesday" : function(test) {
"iso weeks year starting tuesday" : function (test) {
test.expect(6);

@@ -85,3 +85,3 @@

"iso weeks year starting wednesday" : function(test) {
"iso weeks year starting wednesday" : function (test) {
test.expect(6);

@@ -99,3 +99,3 @@

"iso weeks year starting thursday" : function(test) {
"iso weeks year starting thursday" : function (test) {
test.expect(6);

@@ -113,3 +113,3 @@

"iso weeks year starting friday" : function(test) {
"iso weeks year starting friday" : function (test) {
test.expect(6);

@@ -127,3 +127,3 @@

"iso weeks year starting saturday" : function(test) {
"iso weeks year starting saturday" : function (test) {
test.expect(6);

@@ -141,10 +141,10 @@

"iso weeks year starting sunday formatted" : function(test) {
"iso weeks year starting sunday formatted" : function (test) {
test.expect(5);
test.equal(moment([2012, 0, 1]).format('W WW Wo'), '52 52 52nd', "Jan 1 2012 should be iso week 52");
test.equal(moment([2012, 0, 2]).format('W WW Wo'), '1 01 1st' , "Jan 2 2012 should be iso week 1");
test.equal(moment([2012, 0, 8]).format('W WW Wo'), '1 01 1st' , "Jan 8 2012 should be iso week 1");
test.equal(moment([2012, 0, 9]).format('W WW Wo'), '2 02 2nd' , "Jan 9 2012 should be iso week 2");
test.equal(moment([2012, 0, 15]).format('W WW Wo'), '2 02 2nd' , "Jan 15 2012 should be iso week 2");
test.equal(moment([2012, 0, 2]).format('W WW Wo'), '1 01 1st', "Jan 2 2012 should be iso week 1");
test.equal(moment([2012, 0, 8]).format('W WW Wo'), '1 01 1st', "Jan 8 2012 should be iso week 1");
test.equal(moment([2012, 0, 9]).format('W WW Wo'), '2 02 2nd', "Jan 9 2012 should be iso week 2");
test.equal(moment([2012, 0, 15]).format('W WW Wo'), '2 02 2nd', "Jan 15 2012 should be iso week 2");

@@ -154,3 +154,3 @@ test.done();

"weeks plural year starting sunday" : function(test) {
"weeks plural year starting sunday" : function (test) {
test.expect(5);

@@ -167,3 +167,3 @@

"iso weeks plural year starting sunday" : function(test) {
"iso weeks plural year starting sunday" : function (test) {
test.expect(5);

@@ -180,3 +180,3 @@

"weeks setter" : function(test) {
"weeks setter" : function (test) {
test.expect(5);

@@ -193,3 +193,3 @@

"iso weeks setter" : function(test) {
"iso weeks setter" : function (test) {
test.expect(5);

@@ -206,3 +206,3 @@

"iso weeks setter day of year" : function(test) {
"iso weeks setter day of year" : function (test) {
test.expect(6);

@@ -209,0 +209,0 @@

@@ -300,3 +300,3 @@ var moment = require("../../moment");

"same / before / after" : function (test) {
var zoneA = moment(),
var zoneA = moment().utc(),
zoneB = moment(zoneA).zone(120),

@@ -419,4 +419,49 @@ zoneC = moment(zoneA).zone(-120);

test.done();
},
"hours alignment with UTC" : function (test) {
test.expect(4);
test.equals(moment().zone(120).hasAlignedHourOffset(), true);
test.equals(moment().zone(-180).hasAlignedHourOffset(), true);
test.equals(moment().zone(90).hasAlignedHourOffset(), false);
test.equals(moment().zone(-90).hasAlignedHourOffset(), false);
test.done();
},
"hours alignment with other zone" : function (test) {
test.expect(16);
var m = moment().zone(120);
test.equals(m.hasAlignedHourOffset(moment().zone(180)), true);
test.equals(m.hasAlignedHourOffset(moment().zone(-180)), true);
test.equals(m.hasAlignedHourOffset(moment().zone(90)), false);
test.equals(m.hasAlignedHourOffset(moment().zone(-90)), false);
m = moment().zone(90);
test.equals(m.hasAlignedHourOffset(moment().zone(180)), false);
test.equals(m.hasAlignedHourOffset(moment().zone(-180)), false);
test.equals(m.hasAlignedHourOffset(moment().zone(30)), true);
test.equals(m.hasAlignedHourOffset(moment().zone(-30)), true);
m = moment().zone(-60);
test.equals(m.hasAlignedHourOffset(moment().zone(180)), true);
test.equals(m.hasAlignedHourOffset(moment().zone(-180)), true);
test.equals(m.hasAlignedHourOffset(moment().zone(90)), false);
test.equals(m.hasAlignedHourOffset(moment().zone(-90)), false);
m = moment().zone(25);
test.equals(m.hasAlignedHourOffset(moment().zone(-35)), true);
test.equals(m.hasAlignedHourOffset(moment().zone(85)), true);
test.equals(m.hasAlignedHourOffset(moment().zone(35)), false);
test.equals(m.hasAlignedHourOffset(moment().zone(-85)), false);
test.done();
}
};

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc