Skip to content

Commit

Permalink
Merge pull request #2104 from robin0van0der0v:patch-1
Browse files Browse the repository at this point in the history
Frisian (fy) language file with unit test
  • Loading branch information
ichernev committed Dec 24, 2014
2 parents 08f29c4 + c07d84c commit 26f36bb
Show file tree
Hide file tree
Showing 2 changed files with 435 additions and 0 deletions.
69 changes: 69 additions & 0 deletions locale/fy.js
@@ -0,0 +1,69 @@
// moment.js locale configuration
// locale : frisian (fy)
// author : Robin van der Vliet : https://github.com/robin0van0der0v

(function (factory) {
if (typeof define === 'function' && define.amd) {
define(['moment'], factory); // AMD
} else if (typeof exports === 'object') {
module.exports = factory(require('../moment')); // Node
} else {
factory((typeof global !== 'undefined' ? global : this).moment); // node or other global
}
}(function (moment) {
var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split('_'),
monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_');

return moment.defineLocale('fy', {
months : 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split('_'),
monthsShort : function (m, format) {
if (/-MMM-/.test(format)) {
return monthsShortWithoutDots[m.month()];
} else {
return monthsShortWithDots[m.month()];
}
},
weekdays : 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split('_'),
weekdaysShort : 'si._mo._ti._wo._to._fr._so.'.split('_'),
weekdaysMin : 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'),
longDateFormat : {
LT : 'HH:mm',
LTS : 'LT:ss',
L : 'DD-MM-YYYY',
LL : 'D MMMM YYYY',
LLL : 'D MMMM YYYY LT',
LLLL : 'dddd D MMMM YYYY LT'
},
calendar : {
sameDay: '[hjoed om] LT',
nextDay: '[moarn om] LT',
nextWeek: 'dddd [om] LT',
lastDay: '[juster om] LT',
lastWeek: '[ôfrûne] dddd [om] LT',
sameElse: 'L'
},
relativeTime : {
future : 'oer %s',
past : '%s lyn',
s : 'in pear sekonden',
m : 'ien minút',
mm : '%d minuten',
h : 'ien oere',
hh : '%d oeren',
d : 'ien dei',
dd : '%d dagen',
M : 'ien moanne',
MM : '%d moannen',
y : 'ien jier',
yy : '%d jierren'
},
ordinalParse: /\d{1,2}(ste|de)/,
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.
}
});
}));

0 comments on commit 26f36bb

Please sign in to comment.