From 8a335225c705232fe1174755a1b1ea475456b864 Mon Sep 17 00:00:00 2001 From: xuri Date: Thu, 24 Mar 2022 00:19:30 +0800 Subject: Format code, update documentation and remove exported variable `XMLHeaderByte` --- numfmt.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'numfmt.go') diff --git a/numfmt.go b/numfmt.go index 3b20e02..685005f 100644 --- a/numfmt.go +++ b/numfmt.go @@ -456,7 +456,7 @@ func localMonthsNameIrish(t time.Time, abbr int) string { } } if abbr == 4 { - return string([]rune(monthNamesIrish[int(t.Month())-1])) + return monthNamesIrish[int(t.Month())-1] } return string([]rune(monthNamesIrish[int(t.Month())-1])[:1]) } @@ -536,7 +536,7 @@ func localMonthsNameRussian(t time.Time, abbr int) string { return string([]rune(month)[:3]) + "." } if abbr == 4 { - return string([]rune(monthNamesRussian[int(t.Month())-1])) + return monthNamesRussian[int(t.Month())-1] } return string([]rune(monthNamesRussian[int(t.Month())-1])[:1]) } @@ -559,7 +559,7 @@ func localMonthsNameThai(t time.Time, abbr int) string { return string(r[:1]) + "." + string(r[len(r)-2:len(r)-1]) + "." } if abbr == 4 { - return string([]rune(monthNamesThai[int(t.Month())-1])) + return monthNamesThai[int(t.Month())-1] } return string([]rune(monthNamesThai[int(t.Month())-1])[:1]) } @@ -575,7 +575,7 @@ func localMonthsNameTibetan(t time.Time, abbr int) string { } return "\u0f5f" } - return string(monthNamesTibetan[int(t.Month())-1]) + return monthNamesTibetan[int(t.Month())-1] } // localMonthsNameTurkish returns the Turkish name of the month. @@ -661,7 +661,7 @@ func localMonthsNameXhosa(t time.Time, abbr int) string { // localMonthsNameYi returns the Yi name of the month. func localMonthsNameYi(t time.Time, abbr int) string { if abbr == 3 || abbr == 4 { - return string([]rune(monthNamesYi[int(t.Month())-1])) + "\ua1aa" + return string(monthNamesYi[int(t.Month())-1]) + "\ua1aa" } return string([]rune(monthNamesYi[int(t.Month())-1])[:1]) } -- cgit v1.2.1