@@ -192,22 +192,46 @@ var (
192
192
}
193
193
// monthNamesAfrikaans list the month names in the Afrikaans.
194
194
monthNamesAfrikaans = []string {"Januarie" , "Februarie" , "Maart" , "April" , "Mei" , "Junie" , "Julie" , "Augustus" , "September" , "Oktober" , "November" , "Desember" }
195
+ // monthNamesAfrikaansAbbr lists the month name abbreviations in Afrikaans
196
+ monthNamesAfrikaansAbbr = []string {"Jan." , "Feb." , "Maa." , "Apr." , "Mei" , "Jun." , "Jul." , "Aug." , "Sep." , "Okt." , "Nov." , "Des." }
195
197
// monthNamesChinese list the month names in the Chinese.
196
198
monthNamesChinese = []string {"一" , "二" , "三" , "四" , "五" , "六" , "七" , "八" , "九" , "十" , "十一" , "十二" }
199
+ // monthNamesChineseAbbr1 list the month number and character abbreviation in Chinese
200
+ monthNamesChineseAbbrPlus = []string {"0月" , "1月" , "2月" , "3月" , "4月" , "5月" , "6月" , "7月" , "8月" , "9月" , "10月" , "11月" }
201
+ // monthNamesChinesePlus list the month names in Chinese plus the character 月
202
+ monthNamesChinesePlus = []string {"一月" , "二月" , "三月" , "四月" , "五月" , "六月" , "七月" , "八月" , "九月" , "十月" , "十一月" , "十二月" }
203
+ // monthNamesKoreanAbbrPlus lists out the month number plus 월 for the Korean language
204
+ monthNamesKoreanAbbrPlus = []string {"0월" , "1월" , "2월" , "3월" , "4월" , "5월" , "6월" , "7월" , "8월" , "9월" , "10월" , "11월" }
205
+ // monthNamesTradMongolian lists the month number for use with traditional Mongolian
206
+ monthNamesTradMongolian = []string {"M01" , "M02" , "M03" , "M04" , "M05" , "M06" , "M07" , "M08" , "M09" , "M10" , "M11" , "M12" }
197
207
// monthNamesFrench list the month names in the French.
198
208
monthNamesFrench = []string {"janvier" , "février" , "mars" , "avril" , "mai" , "juin" , "juillet" , "août" , "septembre" , "octobre" , "novembre" , "décembre" }
209
+ // monthNamesFrenchAbbr lists the month name abbreviations in French
210
+ monthNamesFrenchAbbr = []string {"janv." , "févr." , "mars" , "avri." , "mai" , "juin" , "juil." , "août" , "sept." , "octo." , "nove." , "déce." }
199
211
// monthNamesGerman list the month names in the German.
200
212
monthNamesGerman = []string {"Januar" , "Februar" , "März" , "April" , "Mai" , "Juni" , "Juli" , "August" , "September" , "Oktober" , "November" , "Dezember" }
213
+ // monthNamesGermanAbbr list the month abbreviations in German
214
+ monthNamesGermanAbbr = []string {"Jan" , "Feb" , "Mär" , "Apr" , "Mai" , "Jun" , "Jul" , "Aug" , "Sep" , "Okt" , "Nov" , "Dez" }
201
215
// monthNamesAustria list the month names in the Austria.
202
216
monthNamesAustria = []string {"Jänner" , "Februar" , "März" , "April" , "Mai" , "Juni" , "Juli" , "August" , "September" , "Oktober" , "November" , "Dezember" }
217
+ // monthNamesAustriaAbbr list the month name abbreviations in Austrian
218
+ monthNamesAustriaAbbr = []string {"Jän" , "Feb" , "Mär" , "Apr" , "Mai" , "Jun" , "Jul" , "Aug" , "Sep" , "Okt" , "Nov" , "Dez" }
203
219
// monthNamesIrish list the month names in the Irish.
204
220
monthNamesIrish = []string {"Eanáir" , "Feabhra" , "Márta" , "Aibreán" , "Bealtaine" , "Meitheamh" , "Iúil" , "Lúnasa" , "Meán Fómhair" , "Deireadh Fómhair" , "Samhain" , "Nollaig" }
221
+ // monthNamesIrishAbbr lists the month abbreviations in Irish
222
+ monthNamesIrishAbbr = []string {"Ean" , "Feabh" , "Márta" , "Aib" , "Beal" , "Meith" , "Iúil" , "Lún" , "MFómh" , "DFómh" , "Samh" , "Noll" }
205
223
// monthNamesItalian list the month names in the Italian.
206
224
monthNamesItalian = []string {"gennaio" , "febbraio" , "marzo" , "aprile" , "maggio" , "giugno" , "luglio" , "agosto" , "settembre" , "ottobre" , "novembre" , "dicembre" }
225
+ // monthNamesItalianAbbr list the month name abbreviations in Italian
226
+ monthNamesItalianAbbr = []string {"gen" , "feb" , "mar" , "apr" , "mag" , "giu" , "lug" , "ago" , "set" , "ott" , "nov" , "dic" }
207
227
// monthNamesRussian list the month names in the Russian.
208
228
monthNamesRussian = []string {"январь" , "февраль" , "март" , "апрель" , "май" , "июнь" , "июль" , "август" , "сентябрь" , "октябрь" , "ноябрь" , "декабрь" }
229
+ // monthNamesRussianAbbr list the month abbreviations for Russian.
230
+ monthNamesRussianAbbr = []string {"янв." , "фев." , "март" , "апр." , "май" , "июнь" , "июль" , "авг." , "сен." , "окт." , "ноя." , "дек." }
209
231
// monthNamesSpanish list the month names in the Spanish.
210
232
monthNamesSpanish = []string {"enero" , "febrero" , "marzo" , "abril" , "mayo" , "junio" , "julio" , "agosto" , "septiembre" , "octubre" , "noviembre" , "diciembre" }
233
+ // monthNamesSpanishAbbr list the month abbreviations in Spanish
234
+ monthNamesSpanishAbbr = []string {"ene" , "feb" , "mar" , "abr" , "may" , "jun" , "jul" , "ago" , "sep" , "oct" , "nov" , "dic" }
211
235
// monthNamesThai list the month names in the Thai.
212
236
monthNamesThai = []string {
213
237
"\u0e21 \u0e01 \u0e23 \u0e32 \u0e04 \u0e21 " ,
@@ -238,22 +262,51 @@ var (
238
262
"\u0f5f \u0fb3 \u0f0b \u0f56 \u0f0b \u0f56 \u0f45 \u0f74 \u0f0b \u0f42 \u0f45 \u0f72 \u0f42 \u0f0b \u0f54 \u0f0b " ,
239
263
"\u0f5f \u0fb3 \u0f0b \u0f56 \u0f0b \u0f56 \u0f45 \u0f74 \u0f0b \u0f42 \u0f49 \u0f72 \u0f66 \u0f0b \u0f54 \u0f0b " ,
240
264
}
265
+ // monthNamesTibetanAbbr lists the month name abbreviations in Tibetan
266
+ monthNamesTibetanAbbr = []string {
267
+ "\u0f5f \u0fb3 \u0f0b \u0f21 " ,
268
+ "\u0f5f \u0fb3 \u0f0b \u0f22 " ,
269
+ "\u0f5f \u0fb3 \u0f0b \u0f23 " ,
270
+ "\u0f5f \u0fb3 \u0f0b \u0f24 " ,
271
+ "\u0f5f \u0fb3 \u0f0b \u0f25 " ,
272
+ "\u0f5f \u0fb3 \u0f0b \u0f26 " ,
273
+ "\u0f5f \u0fb3 \u0f0b \u0f27 " ,
274
+ "\u0f5f \u0fb3 \u0f0b \u0f28 " ,
275
+ "\u0f5f \u0fb3 \u0f0b \u0f29 " ,
276
+ "\u0f5f \u0fb3 \u0f0b \u0f21 \u0f20 " ,
277
+ "\u0f5f \u0fb3 \u0f0b \u0f21 \u0f21 " ,
278
+ "\u0f5f \u0fb3 \u0f0b \u0f21 \u0f22 " ,
279
+ }
241
280
// monthNamesTurkish list the month names in the Turkish.
242
281
monthNamesTurkish = []string {"Ocak" , "Şubat" , "Mart" , "Nisan" , "Mayıs" , "Haziran" , "Temmuz" , "Ağustos" , "Eylül" , "Ekim" , "Kasım" , "Aralık" }
282
+ // monthNamesTurkishAbbr lists the month name abbreviations in Turkish, this prevents string concatenation
283
+ monthNamesTurkishAbbr = []string {"Oca" , "Şub" , "Mar" , "Nis" , "May" , "Haz" , "Tem" , "Ağu" , "Eyl" , "Eki" , "Kas" , "Ara" }
284
+ // monthNamesVietnamese list the month name used for Vietnamese
285
+ monthNamesVietnamese = []string {"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" }
286
+ // monthNamesVietnameseAbbr3 list the mid-form abbreviation for Vietnamese months
287
+ monthNamesVietnameseAbbr3 = []string {"Thg 1" , "Thg 2" , "Thg 3" , "Thg 4" , "Thg 5" , "Thg 6" , "Thg 7" , "Thg 8" , "Thg 9" , "Thg 10" , "Thg 11" , "Thg 12" }
288
+ // monthNamesVietnameseAbbr5 list the short-form abbreviation for Vietnamese months
289
+ monthNamesVietnameseAbbr5 = []string {"T 1" , "T 2" , "T 3" , "T 4" , "T 5" , "T 6" , "T 7" , "T 8" , "T 9" , "T 10" , "T 11" , "T 12" }
243
290
// monthNamesWelsh list the month names in the Welsh.
244
291
monthNamesWelsh = []string {"Ionawr" , "Chwefror" , "Mawrth" , "Ebrill" , "Mai" , "Mehefin" , "Gorffennaf" , "Awst" , "Medi" , "Hydref" , "Tachwedd" , "Rhagfyr" }
292
+ // monthNamesWelshAbbr lists the month name abbreviations in Welsh, this prevents string concatenation
293
+ monthNamesWelshAbbr = []string {"Ion" , "Chwef" , "Maw" , "Ebr" , "Mai" , "Meh" , "Gorff" , "Awst" , "Medi" , "Hyd" , "Tach" , "Rhag" }
245
294
// monthNamesWolof list the month names in the Wolof.
246
295
monthNamesWolof = []string {"Samwiye" , "Fewriye" , "Maars" , "Awril" , "Me" , "Suwe" , "Sullet" , "Ut" , "Septàmbar" , "Oktoobar" , "Noowàmbar" , "Desàmbar" }
247
296
// monthNamesWolofAbbr list the month name abbreviations in Wolof, this prevents string concatenation
248
297
monthNamesWolofAbbr = []string {"Sam." , "Few." , "Maa" , "Awr." , "Me" , "Suw" , "Sul." , "Ut" , "Sept." , "Okt." , "Now." , "Des." }
249
298
// monthNamesXhosa list the month names in the Xhosa.
250
299
monthNamesXhosa = []string {"uJanuwari" , "uFebuwari" , "uMatshi" , "uAprili" , "uMeyi" , "uJuni" , "uJulayi" , "uAgasti" , "uSeptemba" , "uOktobha" , "uNovemba" , "uDisemba" }
251
- // monthNamesXhosaAbbr list the mont abbreviations in the Xhosa, this prevents string concatenation
300
+ // monthNamesXhosaAbbr list the month abbreviations in the Xhosa, this prevents string concatenation
252
301
monthNamesXhosaAbbr = []string {"uJan." , "uFeb." , "uMat." , "uEpr." , "uMey." , "uJun." , "uJul." , "uAg." , "uSep." , "uOkt." , "uNov." , "uDis." }
253
302
// monthNamesYi list the month names in the Yi.
254
303
monthNamesYi = []string {"\ua2cd " , "\ua44d " , "\ua315 " , "\ua1d6 " , "\ua26c " , "\ua0d8 " , "\ua3c3 " , "\ua246 " , "\ua22c " , "\ua2b0 " , "\ua2b0 \ua2aa " , "\ua2b0 \ua44b " }
304
+ // monthNamesYiSuffix lists the month names in Yi with the "\ua1aa" suffix
305
+ monthNamesYiSuffix = []string {"\ua2cd \ua1aa " , "\ua44d \ua1aa " , "\ua315 \ua1aa " , "\ua1d6 \ua1aa " , "\ua26c \ua1aa " , "\ua0d8 \ua1aa " , "\ua3c3 \ua1aa " , "\ua246 \ua1aa " , "\ua22c \ua1aa " , "\ua2b0 \ua1aa " , "\ua2b0 \ua2aa \ua1aa " , "\ua2b0 \ua44b \ua1aa " }
255
306
// monthNamesZulu list the month names in the Zulu.
256
307
monthNamesZulu = []string {"Januwari" , "Febhuwari" , "Mashi" , "Ephreli" , "Meyi" , "Juni" , "Julayi" , "Agasti" , "Septemba" , "Okthoba" , "Novemba" , "Disemba" }
308
+ // monthNamesZuluAbbr list teh month name abbreviations in Zulu
309
+ monthNamesZuluAbbr = []string {"Jan" , "Feb" , "Mas" , "Eph" , "Mey" , "Jun" , "Jul" , "Agas" , "Sep" , "Okt" , "Nov" , "Dis" }
257
310
// apFmtAfrikaans defined the AM/PM name in the Afrikaans.
258
311
apFmtAfrikaans = "vm./nm."
259
312
// apFmtCuba defined the AM/PM name in the Cuba.
@@ -399,27 +452,23 @@ func localMonthsNameEnglish(t time.Time, abbr int) string {
399
452
// localMonthsNameAfrikaans returns the Afrikaans name of the month.
400
453
func localMonthsNameAfrikaans (t time.Time , abbr int ) string {
401
454
if abbr == 3 {
402
- month := monthNamesAfrikaans [int (t .Month ())- 1 ]
403
- if len ([]rune (month )) <= 3 {
404
- return month
405
- }
406
- return string ([]rune (month )[:3 ]) + "."
455
+ return monthNamesAfrikaansAbbr [int (t .Month ())- 1 ]
407
456
}
408
457
if abbr == 4 {
409
458
return monthNamesAfrikaans [int (t .Month ())- 1 ]
410
459
}
411
- return monthNamesAfrikaans [int (t .Month ())- 1 ][:1 ]
460
+ return monthNamesAfrikaansAbbr [int (t .Month ())- 1 ][:1 ]
412
461
}
413
462
414
463
// localMonthsNameAustria returns the Austria name of the month.
415
464
func localMonthsNameAustria (t time.Time , abbr int ) string {
416
465
if abbr == 3 {
417
- return string ([] rune ( monthNamesAustria [ int (t .Month ())- 1 ])[: 3 ])
466
+ return monthNamesAustriaAbbr [ int (t .Month ())- 1 ]
418
467
}
419
468
if abbr == 4 {
420
469
return monthNamesAustria [int (t .Month ())- 1 ]
421
470
}
422
- return monthNamesAustria [int (t .Month ())- 1 ][:1 ]
471
+ return monthNamesAustriaAbbr [int (t .Month ())- 1 ][:1 ]
423
472
}
424
473
425
474
// localMonthsNameBangla returns the German name of the month.
@@ -435,89 +484,80 @@ func localMonthsNameFrench(t time.Time, abbr int) string {
435
484
if abbr == 3 {
436
485
month := monthNamesFrench [int (t .Month ())- 1 ]
437
486
if len ([]rune (month )) <= 4 {
438
- return month
487
+ return monthNamesFrench [ int ( t . Month ()) - 1 ]
439
488
}
440
- return string ([] rune ( month )[: 4 ]) + "."
489
+ return monthNamesFrenchAbbr [ int ( t . Month ()) - 1 ]
441
490
}
442
491
if abbr == 4 {
443
492
return monthNamesFrench [int (t .Month ())- 1 ]
444
493
}
445
- return monthNamesFrench [int (t .Month ())- 1 ][:1 ]
494
+ return monthNamesFrenchAbbr [int (t .Month ())- 1 ][:1 ]
446
495
}
447
496
448
497
// localMonthsNameIrish returns the Irish name of the month.
449
498
func localMonthsNameIrish (t time.Time , abbr int ) string {
450
499
if abbr == 3 {
451
- switch int (t .Month ()) {
452
- case 1 , 4 , 8 :
453
- return string ([]rune (monthNamesIrish [int (t .Month ())- 1 ])[:3 ])
454
- case 2 , 3 , 6 :
455
- return string ([]rune (monthNamesIrish [int (t .Month ())- 1 ])[:5 ])
456
- case 9 , 10 :
457
- return string ([]rune (monthNamesIrish [int (t .Month ())- 1 ])[:1 ]) + "Fómh"
458
- default :
459
- return string ([]rune (monthNamesIrish [int (t .Month ())- 1 ])[:4 ])
460
- }
500
+ return monthNamesIrishAbbr [int (t .Month ()- 1 )]
461
501
}
462
502
if abbr == 4 {
463
503
return monthNamesIrish [int (t .Month ())- 1 ]
464
504
}
465
- return string ([] rune ( monthNamesIrish [ int (t .Month ())- 1 ]) [:1 ])
505
+ return monthNamesIrishAbbr [ int (t .Month ())- 1 ][:1 ]
466
506
}
467
507
468
508
// localMonthsNameItalian returns the Italian name of the month.
469
509
func localMonthsNameItalian (t time.Time , abbr int ) string {
470
510
if abbr == 3 {
471
- return monthNamesItalian [int (t .Month ())- 1 ][: 3 ]
511
+ return monthNamesItalianAbbr [int (t .Month ())- 1 ]
472
512
}
473
513
if abbr == 4 {
474
514
return monthNamesItalian [int (t .Month ())- 1 ]
475
515
}
476
- return monthNamesItalian [int (t .Month ())- 1 ][:1 ]
516
+ return monthNamesItalianAbbr [int (t .Month ())- 1 ][:1 ]
477
517
}
478
518
479
519
// localMonthsNameGerman returns the German name of the month.
480
520
func localMonthsNameGerman (t time.Time , abbr int ) string {
481
521
if abbr == 3 {
482
- return string ([] rune ( monthNamesGerman [ int (t .Month ())- 1 ])[: 3 ])
522
+ return monthNamesGermanAbbr [ int (t .Month ())- 1 ]
483
523
}
484
524
if abbr == 4 {
485
525
return monthNamesGerman [int (t .Month ())- 1 ]
486
526
}
487
- return string ([] rune ( monthNamesGerman [ int (t .Month ())- 1 ]) [:1 ])
527
+ return monthNamesGermanAbbr [ int (t .Month ())- 1 ][:1 ]
488
528
}
489
529
490
530
// localMonthsNameChinese1 returns the Chinese name of the month.
491
531
func localMonthsNameChinese1 (t time.Time , abbr int ) string {
492
532
if abbr == 3 {
493
- return strconv . Itoa ( int (t .Month ())) + "月"
533
+ return monthNamesChineseAbbrPlus [ int (t .Month ())]
494
534
}
495
535
if abbr == 4 {
496
- return monthNamesChinese [int (t .Month ())- 1 ] + "月"
536
+ return monthNamesChinesePlus [int (t .Month ())- 1 ]
497
537
}
498
538
return monthNamesChinese [int (t .Month ())- 1 ]
499
539
}
500
540
501
541
// localMonthsNameChinese2 returns the Chinese name of the month.
502
542
func localMonthsNameChinese2 (t time.Time , abbr int ) string {
503
543
if abbr == 3 || abbr == 4 {
504
- return monthNamesChinese [int (t .Month ())- 1 ] + "月"
544
+ return monthNamesChinesePlus [int (t .Month ())- 1 ]
505
545
}
506
546
return monthNamesChinese [int (t .Month ())- 1 ]
507
547
}
508
548
509
549
// localMonthsNameChinese3 returns the Chinese name of the month.
510
550
func localMonthsNameChinese3 (t time.Time , abbr int ) string {
511
551
if abbr == 3 || abbr == 4 {
512
- return strconv . Itoa ( int (t .Month ())) + "月"
552
+ return monthNamesChineseAbbrPlus [ int (t .Month ())]
513
553
}
514
554
return strconv .Itoa (int (t .Month ()))
515
555
}
516
556
517
557
// localMonthsNameKorean returns the Korean name of the month.
518
558
func localMonthsNameKorean (t time.Time , abbr int ) string {
519
559
if abbr == 3 || abbr == 4 {
520
- return strconv . Itoa ( int (t .Month ())) + "월"
560
+ return monthNamesKoreanAbbrPlus [ int (t .Month ())]
521
561
}
522
562
return strconv .Itoa (int (t .Month ()))
523
563
}
@@ -527,7 +567,7 @@ func localMonthsNameTraditionalMongolian(t time.Time, abbr int) string {
527
567
if abbr == 5 {
528
568
return "M"
529
569
}
530
- return fmt . Sprintf ( "M%02d" , int (t .Month ()))
570
+ return monthNamesTradMongolian [ int (t .Month ()- 1 )]
531
571
}
532
572
533
573
// localMonthsNameRussian returns the Russian name of the month.
@@ -537,7 +577,7 @@ func localMonthsNameRussian(t time.Time, abbr int) string {
537
577
if len ([]rune (month )) <= 4 {
538
578
return month
539
579
}
540
- return string ([] rune ( month )[: 3 ]) + "."
580
+ return monthNamesRussianAbbr [ int ( t . Month ()) - 1 ]
541
581
}
542
582
if abbr == 4 {
543
583
return monthNamesRussian [int (t .Month ())- 1 ]
@@ -548,12 +588,12 @@ func localMonthsNameRussian(t time.Time, abbr int) string {
548
588
// localMonthsNameSpanish returns the Spanish name of the month.
549
589
func localMonthsNameSpanish (t time.Time , abbr int ) string {
550
590
if abbr == 3 {
551
- return monthNamesSpanish [int (t .Month ())- 1 ][: 3 ]
591
+ return monthNamesSpanishAbbr [int (t .Month ())- 1 ]
552
592
}
553
593
if abbr == 4 {
554
594
return monthNamesSpanish [int (t .Month ())- 1 ]
555
595
}
556
- return monthNamesSpanish [int (t .Month ())- 1 ][:1 ]
596
+ return monthNamesSpanishAbbr [int (t .Month ())- 1 ][:1 ]
557
597
}
558
598
559
599
// localMonthsNameThai returns the Thai name of the month.
@@ -571,7 +611,7 @@ func localMonthsNameThai(t time.Time, abbr int) string {
571
611
// localMonthsNameTibetan returns the Tibetan name of the month.
572
612
func localMonthsNameTibetan (t time.Time , abbr int ) string {
573
613
if abbr == 3 {
574
- return " \u0f5f \u0fb3 \u0f0b " + [] string { " \u0f21 " , " \u0f22 " , " \u0f23 " , " \u0f24 " , " \u0f25 " , " \u0f26 " , " \u0f27 " , " \u0f28 " , " \u0f29 " , " \u0f21 \u0f20 " , " \u0f21 \u0f21 " , " \u0f21 \u0f22 " } [int (t .Month ())- 1 ]
614
+ return monthNamesTibetanAbbr [int (t .Month ())- 1 ]
575
615
}
576
616
if abbr == 5 {
577
617
if t .Month () == 10 {
@@ -585,41 +625,34 @@ func localMonthsNameTibetan(t time.Time, abbr int) string {
585
625
// localMonthsNameTurkish returns the Turkish name of the month.
586
626
func localMonthsNameTurkish (t time.Time , abbr int ) string {
587
627
if abbr == 3 {
588
- return string ([] rune ( monthNamesTurkish [ int (t .Month ())- 1 ])[: 3 ])
628
+ return monthNamesTurkishAbbr [ int (t .Month ())- 1 ]
589
629
}
590
630
if abbr == 4 {
591
631
return monthNamesTurkish [int (t .Month ())- 1 ]
592
632
}
593
- return string ([]rune (monthNamesTurkish [int (t .Month ())- 1 ])[:1 ])
633
+ return string ([]rune (monthNamesTurkishAbbr [int (t .Month ())- 1 ])[:1 ])
594
634
}
595
635
596
636
// localMonthsNameWelsh returns the Welsh name of the month.
597
637
func localMonthsNameWelsh (t time.Time , abbr int ) string {
598
638
if abbr == 3 {
599
- switch int (t .Month ()) {
600
- case 2 , 7 :
601
- return monthNamesWelsh [int (t .Month ())- 1 ][:5 ]
602
- case 8 , 9 , 11 , 12 :
603
- return monthNamesWelsh [int (t .Month ())- 1 ][:4 ]
604
- default :
605
- return monthNamesWelsh [int (t .Month ())- 1 ][:3 ]
606
- }
639
+ return monthNamesWelshAbbr [int (t .Month ())- 1 ]
607
640
}
608
641
if abbr == 4 {
609
642
return monthNamesWelsh [int (t .Month ())- 1 ]
610
643
}
611
- return string ([] rune ( monthNamesWelsh [ int (t .Month ())- 1 ]) [:1 ])
644
+ return monthNamesWelshAbbr [ int (t .Month ())- 1 ][:1 ]
612
645
}
613
646
614
647
// localMonthsNameVietnamese returns the Vietnamese name of the month.
615
648
func localMonthsNameVietnamese (t time.Time , abbr int ) string {
616
649
if abbr == 3 {
617
- return "Thg " + strconv . Itoa ( int (t .Month ()))
650
+ return monthNamesVietnameseAbbr3 [ int (t .Month ()- 1 )]
618
651
}
619
652
if abbr == 5 {
620
- return "T " + strconv . Itoa ( int (t .Month ()))
653
+ return monthNamesVietnameseAbbr5 [ int (t .Month ()- 1 )]
621
654
}
622
- return "Tháng " + strconv . Itoa ( int (t .Month ()))
655
+ return monthNamesVietnamese [ int (t .Month ()- 1 )]
623
656
}
624
657
625
658
// localMonthsNameWolof returns the Wolof name of the month.
@@ -647,23 +680,20 @@ func localMonthsNameXhosa(t time.Time, abbr int) string {
647
680
// localMonthsNameYi returns the Yi name of the month.
648
681
func localMonthsNameYi (t time.Time , abbr int ) string {
649
682
if abbr == 3 || abbr == 4 {
650
- return string ( monthNamesYi [int (t .Month ()) - 1 ]) + " \ua1aa "
683
+ return monthNamesYiSuffix [int (t .Month ()- 1 )]
651
684
}
652
685
return string ([]rune (monthNamesYi [int (t .Month ())- 1 ])[:1 ])
653
686
}
654
687
655
688
// localMonthsNameZulu returns the Zulu name of the month.
656
689
func localMonthsNameZulu (t time.Time , abbr int ) string {
657
690
if abbr == 3 {
658
- if int (t .Month ()) == 8 {
659
- return string ([]rune (monthNamesZulu [int (t .Month ())- 1 ])[:4 ])
660
- }
661
- return string ([]rune (monthNamesZulu [int (t .Month ())- 1 ])[:3 ])
691
+ return monthNamesZuluAbbr [int (t .Month ()- 1 )]
662
692
}
663
693
if abbr == 4 {
664
694
return monthNamesZulu [int (t .Month ())- 1 ]
665
695
}
666
- return string ([] rune ( monthNamesZulu [ int (t .Month ())- 1 ]) [:1 ])
696
+ return monthNamesZuluAbbr [ int (t .Month ())- 1 ][:1 ]
667
697
}
668
698
669
699
// localMonthName return months name by supported language ID.
0 commit comments