| 1 |
//! moment.js locale configuration |
| 2 |
//! locale : Vietnamese [vi] |
| 3 |
//! author : Bang Nguyen : https://github.com/bangnk |
| 4 |
//! author : Chien Kira : https://github.com/chienkira |
| 5 |
|
| 6 |
import moment from '../moment'; |
| 7 |
|
| 8 |
export default moment.defineLocale('vi', { |
| 9 |
months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split( |
| 10 |
'_' |
| 11 |
), |
| 12 |
monthsShort: |
| 13 |
'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split( |
| 14 |
'_' |
| 15 |
), |
| 16 |
monthsParseExact: true, |
| 17 |
weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split( |
| 18 |
'_' |
| 19 |
), |
| 20 |
weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), |
| 21 |
weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), |
| 22 |
weekdaysParseExact: true, |
| 23 |
meridiemParse: /sa|ch/i, |
| 24 |
isPM: function (input) { |
| 25 |
return /^ch$/i.test(input); |
| 26 |
}, |
| 27 |
meridiem: function (hours, minutes, isLower) { |
| 28 |
if (hours < 12) { |
| 29 |
return isLower ? 'sa' : 'SA'; |
| 30 |
} else { |
| 31 |
return isLower ? 'ch' : 'CH'; |
| 32 |
} |
| 33 |
}, |
| 34 |
longDateFormat: { |
| 35 |
LT: 'HH:mm', |
| 36 |
LTS: 'HH:mm:ss', |
| 37 |
L: 'DD/MM/YYYY', |
| 38 |
LL: 'D MMMM [năm] YYYY', |
| 39 |
LLL: 'D MMMM [năm] YYYY HH:mm', |
| 40 |
LLLL: 'dddd, D MMMM [năm] YYYY HH:mm', |
| 41 |
l: 'DD/M/YYYY', |
| 42 |
ll: 'D MMM YYYY', |
| 43 |
lll: 'D MMM YYYY HH:mm', |
| 44 |
llll: 'ddd, D MMM YYYY HH:mm', |
| 45 |
}, |
| 46 |
calendar: { |
| 47 |
sameDay: '[Hôm nay lúc] LT', |
| 48 |
nextDay: '[Ngày mai lúc] LT', |
| 49 |
nextWeek: 'dddd [tuần tới lúc] LT', |
| 50 |
lastDay: '[Hôm qua lúc] LT', |
| 51 |
lastWeek: 'dddd [tuần trước lúc] LT', |
| 52 |
sameElse: 'L', |
| 53 |
}, |
| 54 |
relativeTime: { |
| 55 |
future: '%s tới', |
| 56 |
past: '%s trước', |
| 57 |
s: 'vài giây', |
| 58 |
ss: '%d giây', |
| 59 |
m: 'một phút', |
| 60 |
mm: '%d phút', |
| 61 |
h: 'một giờ', |
| 62 |
hh: '%d giờ', |
| 63 |
d: 'một ngày', |
| 64 |
dd: '%d ngày', |
| 65 |
w: 'một tuần', |
| 66 |
ww: '%d tuần', |
| 67 |
M: 'một tháng', |
| 68 |
MM: '%d tháng', |
| 69 |
y: 'một năm', |
| 70 |
yy: '%d năm', |
| 71 |
}, |
| 72 |
dayOfMonthOrdinalParse: /\d{1,2}/, |
| 73 |
ordinal: function (number) { |
| 74 |
return number; |
| 75 |
}, |
| 76 |
week: { |
| 77 |
dow: 1, // Monday is the first day of the week. |
| 78 |
doy: 4, // The week that contains Jan 4th is the first week of the year. |
| 79 |
}, |
| 80 |
}); |