1 //! moment.js locale configuration
2 //! locale : punjabi india (pa-in)
3 //! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit
5 import moment from '../moment';
32 export default moment.defineLocale('pa-in', {
33 // There are months name as per Nanakshahi Calender but they are not used as rigidly in modern Punjabi.
34 months : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),
35 monthsShort : 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split('_'),
36 weekdays : 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split('_'),
37 weekdaysShort : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
38 weekdaysMin : 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'),
41 LTS : 'A h:mm:ss ਵਜੇ',
44 LLL : 'D MMMM YYYY, A h:mm ਵਜੇ',
45 LLLL : 'dddd, D MMMM YYYY, A h:mm ਵਜੇ'
50 nextWeek : 'dddd, LT',
52 lastWeek : '[ਪਿਛਲੇ] dddd, LT',
70 preparse: function (string) {
71 return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) {
72 return numberMap[match];
75 postformat: function (string) {
76 return string.replace(/\d/g, function (match) {
77 return symbolMap[match];
80 // Punjabi notation for meridiems are quite fuzzy in practice. While there exists
81 // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi.
82 meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,
83 meridiemHour : function (hour, meridiem) {
87 if (meridiem === 'ਰਾਤ') {
88 return hour < 4 ? hour : hour + 12;
89 } else if (meridiem === 'ਸਵੇਰ') {
91 } else if (meridiem === 'ਦੁਪਹਿਰ') {
92 return hour >= 10 ? hour : hour + 12;
93 } else if (meridiem === 'ਸ਼ਾਮ') {
97 meridiem : function (hour, minute, isLower) {
100 } else if (hour < 10) {
102 } else if (hour < 17) {
104 } else if (hour < 20) {
111 dow : 0, // Sunday is the first day of the week.
112 doy : 6 // The week that contains Jan 1st is the first week of the year.