Skip to content

Commit 604c794

Browse files
committed
Bumping version to 2.4.0
1 parent b4ae791 commit 604c794

File tree

10 files changed

+408
-61
lines changed

10 files changed

+408
-61
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "moment",
3-
"version": "2.3.1",
3+
"version": "2.4.0",
44
"main": "moment.js",
55
"ignore": [
66
"**/.*",

component.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "moment",
3-
"version": "2.3.1",
3+
"version": "2.4.0",
44
"main": "moment.js",
55
"description": "Parse, validate, manipulate, and display dates in javascript.",
66
"files": [
@@ -13,6 +13,7 @@
1313
"lang/ca.js",
1414
"lang/cs.js",
1515
"lang/cv.js",
16+
"lang/cy.js",
1617
"lang/da.js",
1718
"lang/de.js",
1819
"lang/el.js",
@@ -25,6 +26,7 @@
2526
"lang/eu.js",
2627
"lang/fa.js",
2728
"lang/fi.js",
29+
"lang/fo.js",
2830
"lang/fr-ca.js",
2931
"lang/fr.js",
3032
"lang/gl.js",

min/langs.js

Lines changed: 174 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,84 @@
730730
});
731731
}));
732732

733+
// moment.js language configuration
734+
// language : Welsh (cy)
735+
// author : Robert Allen
736+
737+
(function (factory) {
738+
if (typeof define === 'function' && define.amd) {
739+
define(['moment'], factory); // AMD
740+
} else if (typeof exports === 'object') {
741+
module.exports = factory(require('../moment')); // Node
742+
} else {
743+
factory(window.moment); // Browser global
744+
}
745+
}(function (moment) {
746+
return moment.lang("cy", {
747+
months: "Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),
748+
monthsShort: "Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),
749+
weekdays: "Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),
750+
weekdaysShort: "Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),
751+
weekdaysMin: "Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),
752+
// time formats are the same as en-gb
753+
longDateFormat: {
754+
LT: "HH:mm",
755+
L: "DD/MM/YYYY",
756+
LL: "D MMMM YYYY",
757+
LLL: "D MMMM YYYY LT",
758+
LLLL: "dddd, D MMMM YYYY LT"
759+
},
760+
calendar: {
761+
sameDay: '[Heddiw am] LT',
762+
nextDay: '[Yfory am] LT',
763+
nextWeek: 'dddd [am] LT',
764+
lastDay: '[Ddoe am] LT',
765+
lastWeek: 'dddd [diwethaf am] LT',
766+
sameElse: 'L'
767+
},
768+
relativeTime: {
769+
future: "mewn %s",
770+
past: "%s yn ôl",
771+
s: "ychydig eiliadau",
772+
m: "munud",
773+
mm: "%d munud",
774+
h: "awr",
775+
hh: "%d awr",
776+
d: "diwrnod",
777+
dd: "%d diwrnod",
778+
M: "mis",
779+
MM: "%d mis",
780+
y: "blwyddyn",
781+
yy: "%d flynedd"
782+
},
783+
// traditional ordinal numbers above 31 are not commonly used in colloquial Welsh
784+
ordinal: function (number) {
785+
var b = number,
786+
output = '',
787+
lookup = [
788+
'', 'af', 'il', 'ydd', 'ydd', 'ed', 'ed', 'ed', 'fed', 'fed', 'fed', // 1af to 10fed
789+
'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'eg', 'fed', 'eg', 'fed' // 11eg to 20fed
790+
];
791+
792+
if (b > 20) {
793+
if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) {
794+
output = 'fed'; // not 30ain, 70ain or 90ain
795+
} else {
796+
output = 'ain';
797+
}
798+
} else if (b > 0) {
799+
output = lookup[b];
800+
}
801+
802+
return number + output;
803+
},
804+
week : {
805+
dow : 1, // Monday is the first day of the week.
806+
doy : 4 // The week that contains Jan 4th is the first week of the year.
807+
}
808+
});
809+
}));
810+
733811
// moment.js language configuration
734812
// language : danish (da)
735813
// author : Ulrik Nielsen : https://github.com/mrbase
@@ -1583,6 +1661,63 @@
15831661
});
15841662
}));
15851663

1664+
// moment.js language configuration
1665+
// language : faroese (fo)
1666+
// author : Ragnar Johannesen : https://github.com/ragnar123
1667+
1668+
(function (factory) {
1669+
if (typeof define === 'function' && define.amd) {
1670+
define(['moment'], factory); // AMD
1671+
} else if (typeof exports === 'object') {
1672+
module.exports = factory(require('../moment')); // Node
1673+
} else {
1674+
factory(window.moment); // Browser global
1675+
}
1676+
}(function (moment) {
1677+
return moment.lang('fo', {
1678+
months : "januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),
1679+
monthsShort : "jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),
1680+
weekdays : "sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),
1681+
weekdaysShort : "sun_mán_týs_mik_hós_frí_ley".split("_"),
1682+
weekdaysMin : "su_má_tý_mi_hó_fr_le".split("_"),
1683+
longDateFormat : {
1684+
LT : "HH:mm",
1685+
L : "DD/MM/YYYY",
1686+
LL : "D MMMM YYYY",
1687+
LLL : "D MMMM YYYY LT",
1688+
LLLL : "dddd D. MMMM, YYYY LT"
1689+
},
1690+
calendar : {
1691+
sameDay : '[Í dag kl.] LT',
1692+
nextDay : '[Í morgin kl.] LT',
1693+
nextWeek : 'dddd [kl.] LT',
1694+
lastDay : '[Í gjár kl.] LT',
1695+
lastWeek : '[síðstu] dddd [kl] LT',
1696+
sameElse : 'L'
1697+
},
1698+
relativeTime : {
1699+
future : "um %s",
1700+
past : "%s síðani",
1701+
s : "fá sekund",
1702+
m : "ein minutt",
1703+
mm : "%d minuttir",
1704+
h : "ein tími",
1705+
hh : "%d tímar",
1706+
d : "ein dagur",
1707+
dd : "%d dagar",
1708+
M : "ein mánaði",
1709+
MM : "%d mánaðir",
1710+
y : "eitt ár",
1711+
yy : "%d ár"
1712+
},
1713+
ordinal : '%d.',
1714+
week : {
1715+
dow : 1, // Monday is the first day of the week.
1716+
doy : 4 // The week that contains Jan 4th is the first week of the year.
1717+
}
1718+
});
1719+
}));
1720+
15861721
// moment.js language configuration
15871722
// language : canadian french (fr-ca)
15881723
// author : Jonathan Abourbih : https://github.com/jonbca
@@ -3709,7 +3844,7 @@
37093844
'accusative': 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split('_')
37103845
},
37113846

3712-
nounCase = (/D[oD]? *MMMM?/).test(format) ?
3847+
nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ?
37133848
'accusative' :
37143849
'nominative';
37153850

@@ -3722,7 +3857,7 @@
37223857
'accusative': 'янв_фев_мар_апр_мая_июня_июля_авг_сен_окт_ноя_дек'.split('_')
37233858
},
37243859

3725-
nounCase = (/D[oD]? *MMMM?/).test(format) ?
3860+
nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ?
37263861
'accusative' :
37273862
'nominative';
37283863

@@ -4860,6 +4995,7 @@
48604995
// moment.js language configuration
48614996
// language : chinese
48624997
// author : suupic : https://github.com/suupic
4998+
// author : Zeno Zeng : https://github.com/zenozeng
48634999

48645000
(function (factory) {
48655001
if (typeof define === 'function' && define.amd) {
@@ -4889,7 +5025,9 @@
48895025
},
48905026
meridiem : function (hour, minute, isLower) {
48915027
var hm = hour * 100 + minute;
4892-
if (hm < 900) {
5028+
if (hm < 600) {
5029+
return "凌晨";
5030+
} else if (hm < 900) {
48935031
return "早上";
48945032
} else if (hm < 1130) {
48955033
return "上午";
@@ -4902,25 +5040,41 @@
49025040
}
49035041
},
49045042
calendar : {
4905-
sameDay : '[今天]LT',
4906-
nextDay : '[明天]LT',
4907-
nextWeek : '[下]ddddLT',
4908-
lastDay : '[昨天]LT',
4909-
lastWeek : '[上]ddddLT',
5043+
sameDay : function () {
5044+
return this.minutes() === 0 ? "[今天]Ah[点整]" : "[今天]LT";
5045+
},
5046+
nextDay : function () {
5047+
return this.minutes() === 0 ? "[明天]Ah[点整]" : "[明天]LT";
5048+
},
5049+
lastDay : function () {
5050+
return this.minutes() === 0 ? "[昨天]Ah[点整]" : "[昨天]LT";
5051+
},
5052+
nextWeek : function () {
5053+
var startOfWeek, prefix;
5054+
startOfWeek = moment().startOf('week');
5055+
prefix = this.unix() - startOfWeek.unix() >= 7 * 24 * 3600 ? '[下]' : '[本]';
5056+
return this.minutes() === 0 ? prefix + "dddAh点整" : prefix + "dddAh点mm";
5057+
},
5058+
lastWeek : function () {
5059+
var startOfWeek, prefix;
5060+
startOfWeek = moment().startOf('week');
5061+
prefix = this.unix() < startOfWeek.unix() ? '[上]' : '[本]';
5062+
return this.minutes() === 0 ? prefix + "dddAh点整" : prefix + "dddAh点mm";
5063+
},
49105064
sameElse : 'L'
49115065
},
49125066
ordinal : function (number, period) {
49135067
switch (period) {
4914-
case "d" :
4915-
case "D" :
4916-
case "DDD" :
5068+
case "d":
5069+
case "D":
5070+
case "DDD":
49175071
return number + "日";
4918-
case "M" :
5072+
case "M":
49195073
return number + "月";
4920-
case "w" :
4921-
case "W" :
5074+
case "w":
5075+
case "W":
49225076
return number + "周";
4923-
default :
5077+
default:
49245078
return number;
49255079
}
49265080
},
@@ -4938,6 +5092,11 @@
49385092
MM : "%d个月",
49395093
y : "1年",
49405094
yy : "%d年"
5095+
},
5096+
week : {
5097+
// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
5098+
dow : 1, // Monday is the first day of the week.
5099+
doy : 4 // The week that contains Jan 4th is the first week of the year.
49415100
}
49425101
});
49435102
}));

min/langs.min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)