Skip to content

Commit

Permalink
refactor main lang file
Browse files Browse the repository at this point in the history
  • Loading branch information
armendarabyan committed Jan 4, 2014
1 parent 4454454 commit c0f5d8f
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions lang/hy-am.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,9 @@
}

function monthsShortCaseReplace(m, format) {
var monthsShort = {
'nominative': 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'),
'accusative': 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_')
},

nounCase = (/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/).test(format) ?
'accusative' :
'nominative';
var monthsShort = 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_');

return monthsShort[nounCase][m.month()];
return monthsShort[m.month()];
}

function weekdaysCaseReplace(m, format) {
Expand Down Expand Up @@ -99,19 +92,10 @@

ordinal: function (number, period) {
switch (period) {
case 'M':
case 'd':
return number;
case 'DDD':
if (number === 1) return number + '-ին';
return number + '-րդ';
case 'DDDo':
if (number === 1) return number + '-ին';
return number + '-րդ';
case 'D':
return number + '';
case 'w':
case 'W':
case 'DDDo':
if (number === 1) return number + '-ին';
return number + '-րդ';
default:
Expand Down

0 comments on commit c0f5d8f

Please sign in to comment.