shi_Latn.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531
  1. package shi_Latn
  2. import (
  3. "math"
  4. "strconv"
  5. "time"
  6. "github.com/go-playground/locales"
  7. "github.com/go-playground/locales/currency"
  8. )
  9. type shi_Latn struct {
  10. locale string
  11. pluralsCardinal []locales.PluralRule
  12. pluralsOrdinal []locales.PluralRule
  13. pluralsRange []locales.PluralRule
  14. decimal string
  15. group string
  16. minus string
  17. percent string
  18. perMille string
  19. timeSeparator string
  20. inifinity string
  21. currencies []string // idx = enum of currency code
  22. monthsAbbreviated []string
  23. monthsNarrow []string
  24. monthsWide []string
  25. daysAbbreviated []string
  26. daysNarrow []string
  27. daysShort []string
  28. daysWide []string
  29. periodsAbbreviated []string
  30. periodsNarrow []string
  31. periodsShort []string
  32. periodsWide []string
  33. erasAbbreviated []string
  34. erasNarrow []string
  35. erasWide []string
  36. timezones map[string]string
  37. }
  38. // New returns a new instance of translator for the 'shi_Latn' locale
  39. func New() locales.Translator {
  40. return &shi_Latn{
  41. locale: "shi_Latn",
  42. pluralsCardinal: []locales.PluralRule{2, 4, 6},
  43. pluralsOrdinal: nil,
  44. pluralsRange: nil,
  45. decimal: ",",
  46. group: " ",
  47. minus: "-",
  48. percent: "%",
  49. perMille: "‰",
  50. timeSeparator: ":",
  51. inifinity: "∞",
  52. currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNH", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "STN", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"},
  53. monthsAbbreviated: []string{"", "inn", "bṛa", "maṛ", "ibr", "may", "yun", "yul", "ɣuc", "cut", "ktu", "nuw", "duj"},
  54. monthsNarrow: []string{"", "i", "b", "m", "i", "m", "y", "y", "ɣ", "c", "k", "n", "d"},
  55. monthsWide: []string{"", "innayr", "bṛayṛ", "maṛṣ", "ibrir", "mayyu", "yunyu", "yulyuz", "ɣuct", "cutanbir", "ktubr", "nuwanbir", "dujanbir"},
  56. daysAbbreviated: []string{"asa", "ayn", "asi", "akṛ", "akw", "asim", "asiḍ"},
  57. daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"},
  58. daysWide: []string{"asamas", "aynas", "asinas", "akṛas", "akwas", "asimwas", "asiḍyas"},
  59. periodsAbbreviated: []string{"tifawt", "tadggʷat"},
  60. periodsNarrow: []string{"", ""},
  61. periodsWide: []string{"tifawt", "tadggʷat"},
  62. erasAbbreviated: []string{"daɛ", "dfɛ"},
  63. erasNarrow: []string{"", ""},
  64. erasWide: []string{"dat n ɛisa", "dffir n ɛisa"},
  65. timezones: map[string]string{"WEZ": "WEZ", "MESZ": "MESZ", "HKT": "HKT", "LHST": "LHST", "CLT": "CLT", "AEDT": "AEDT", "MYT": "MYT", "SGT": "SGT", "COST": "COST", "SRT": "SRT", "CAT": "CAT", "CHAST": "CHAST", "CHADT": "CHADT", "WESZ": "WESZ", "NZDT": "NZDT", "MDT": "MDT", "HECU": "HECU", "AEST": "AEST", "BT": "BT", "AKST": "AKST", "IST": "IST", "VET": "VET", "HAST": "HAST", "PST": "PST", "EST": "EST", "ACST": "ACST", "HNOG": "HNOG", "WITA": "WITA", "UYST": "UYST", "PDT": "PDT", "HNEG": "HNEG", "HEEG": "HEEG", "WART": "WART", "OESZ": "OESZ", "ART": "ART", "AWDT": "AWDT", "NZST": "NZST", "TMST": "TMST", "JST": "JST", "AKDT": "AKDT", "ACWDT": "ACWDT", "HEPM": "HEPM", "ADT": "ADT", "ChST": "ChST", "ECT": "ECT", "CLST": "CLST", "HAT": "HAT", "HNPM": "HNPM", "HNPMX": "HNPMX", "HEPMX": "HEPMX", "JDT": "JDT", "HEOG": "HEOG", "HKST": "HKST", "LHDT": "LHDT", "HENOMX": "HENOMX", "WIT": "WIT", "WAT": "WAT", "WIB": "WIB", "WARST": "WARST", "SAST": "SAST", "∅∅∅": "∅∅∅", "GMT": "GMT", "CST": "CST", "CDT": "CDT", "ACDT": "ACDT", "HNT": "HNT", "HNNOMX": "HNNOMX", "HADT": "HADT", "COT": "COT", "HNCU": "HNCU", "EAT": "EAT", "ARST": "ARST", "GYT": "GYT", "AWST": "AWST", "WAST": "WAST", "GFT": "GFT", "EDT": "EDT", "ACWST": "ACWST", "TMT": "TMT", "MEZ": "MEZ", "OEZ": "OEZ", "UYT": "UYT", "AST": "AST", "BOT": "BOT", "MST": "MST"},
  66. }
  67. }
  68. // Locale returns the current translators string locale
  69. func (shi *shi_Latn) Locale() string {
  70. return shi.locale
  71. }
  72. // PluralsCardinal returns the list of cardinal plural rules associated with 'shi_Latn'
  73. func (shi *shi_Latn) PluralsCardinal() []locales.PluralRule {
  74. return shi.pluralsCardinal
  75. }
  76. // PluralsOrdinal returns the list of ordinal plural rules associated with 'shi_Latn'
  77. func (shi *shi_Latn) PluralsOrdinal() []locales.PluralRule {
  78. return shi.pluralsOrdinal
  79. }
  80. // PluralsRange returns the list of range plural rules associated with 'shi_Latn'
  81. func (shi *shi_Latn) PluralsRange() []locales.PluralRule {
  82. return shi.pluralsRange
  83. }
  84. // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'shi_Latn'
  85. func (shi *shi_Latn) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
  86. n := math.Abs(num)
  87. i := int64(n)
  88. if (i == 0) || (n == 1) {
  89. return locales.PluralRuleOne
  90. } else if n >= 2 && n <= 10 {
  91. return locales.PluralRuleFew
  92. }
  93. return locales.PluralRuleOther
  94. }
  95. // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'shi_Latn'
  96. func (shi *shi_Latn) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
  97. return locales.PluralRuleUnknown
  98. }
  99. // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'shi_Latn'
  100. func (shi *shi_Latn) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
  101. return locales.PluralRuleUnknown
  102. }
  103. // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
  104. func (shi *shi_Latn) MonthAbbreviated(month time.Month) string {
  105. return shi.monthsAbbreviated[month]
  106. }
  107. // MonthsAbbreviated returns the locales abbreviated months
  108. func (shi *shi_Latn) MonthsAbbreviated() []string {
  109. return shi.monthsAbbreviated[1:]
  110. }
  111. // MonthNarrow returns the locales narrow month given the 'month' provided
  112. func (shi *shi_Latn) MonthNarrow(month time.Month) string {
  113. return shi.monthsNarrow[month]
  114. }
  115. // MonthsNarrow returns the locales narrow months
  116. func (shi *shi_Latn) MonthsNarrow() []string {
  117. return shi.monthsNarrow[1:]
  118. }
  119. // MonthWide returns the locales wide month given the 'month' provided
  120. func (shi *shi_Latn) MonthWide(month time.Month) string {
  121. return shi.monthsWide[month]
  122. }
  123. // MonthsWide returns the locales wide months
  124. func (shi *shi_Latn) MonthsWide() []string {
  125. return shi.monthsWide[1:]
  126. }
  127. // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
  128. func (shi *shi_Latn) WeekdayAbbreviated(weekday time.Weekday) string {
  129. return shi.daysAbbreviated[weekday]
  130. }
  131. // WeekdaysAbbreviated returns the locales abbreviated weekdays
  132. func (shi *shi_Latn) WeekdaysAbbreviated() []string {
  133. return shi.daysAbbreviated
  134. }
  135. // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
  136. func (shi *shi_Latn) WeekdayNarrow(weekday time.Weekday) string {
  137. return shi.daysNarrow[weekday]
  138. }
  139. // WeekdaysNarrow returns the locales narrow weekdays
  140. func (shi *shi_Latn) WeekdaysNarrow() []string {
  141. return shi.daysNarrow
  142. }
  143. // WeekdayShort returns the locales short weekday given the 'weekday' provided
  144. func (shi *shi_Latn) WeekdayShort(weekday time.Weekday) string {
  145. return shi.daysShort[weekday]
  146. }
  147. // WeekdaysShort returns the locales short weekdays
  148. func (shi *shi_Latn) WeekdaysShort() []string {
  149. return shi.daysShort
  150. }
  151. // WeekdayWide returns the locales wide weekday given the 'weekday' provided
  152. func (shi *shi_Latn) WeekdayWide(weekday time.Weekday) string {
  153. return shi.daysWide[weekday]
  154. }
  155. // WeekdaysWide returns the locales wide weekdays
  156. func (shi *shi_Latn) WeekdaysWide() []string {
  157. return shi.daysWide
  158. }
  159. // Decimal returns the decimal point of number
  160. func (shi *shi_Latn) Decimal() string {
  161. return shi.decimal
  162. }
  163. // Group returns the group of number
  164. func (shi *shi_Latn) Group() string {
  165. return shi.group
  166. }
  167. // Group returns the minus sign of number
  168. func (shi *shi_Latn) Minus() string {
  169. return shi.minus
  170. }
  171. // FmtNumber returns 'num' with digits/precision of 'v' for 'shi_Latn' and handles both Whole and Real numbers based on 'v'
  172. func (shi *shi_Latn) FmtNumber(num float64, v uint64) string {
  173. return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  174. }
  175. // FmtPercent returns 'num' with digits/precision of 'v' for 'shi_Latn' and handles both Whole and Real numbers based on 'v'
  176. // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
  177. func (shi *shi_Latn) FmtPercent(num float64, v uint64) string {
  178. return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  179. }
  180. // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'shi_Latn'
  181. func (shi *shi_Latn) FmtCurrency(num float64, v uint64, currency currency.Type) string {
  182. s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  183. symbol := shi.currencies[currency]
  184. l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3
  185. count := 0
  186. inWhole := v == 0
  187. b := make([]byte, 0, l)
  188. for i := len(s) - 1; i >= 0; i-- {
  189. if s[i] == '.' {
  190. b = append(b, shi.decimal[0])
  191. inWhole = true
  192. continue
  193. }
  194. if inWhole {
  195. if count == 3 {
  196. for j := len(shi.group) - 1; j >= 0; j-- {
  197. b = append(b, shi.group[j])
  198. }
  199. count = 1
  200. } else {
  201. count++
  202. }
  203. }
  204. b = append(b, s[i])
  205. }
  206. if num < 0 {
  207. b = append(b, shi.minus[0])
  208. }
  209. // reverse
  210. for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
  211. b[i], b[j] = b[j], b[i]
  212. }
  213. if int(v) < 2 {
  214. if v == 0 {
  215. b = append(b, shi.decimal...)
  216. }
  217. for i := 0; i < 2-int(v); i++ {
  218. b = append(b, '0')
  219. }
  220. }
  221. b = append(b, symbol...)
  222. return string(b)
  223. }
  224. // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'shi_Latn'
  225. // in accounting notation.
  226. func (shi *shi_Latn) FmtAccounting(num float64, v uint64, currency currency.Type) string {
  227. s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  228. symbol := shi.currencies[currency]
  229. l := len(s) + len(symbol) + 2 + 2*len(s[:len(s)-int(v)-1])/3
  230. count := 0
  231. inWhole := v == 0
  232. b := make([]byte, 0, l)
  233. for i := len(s) - 1; i >= 0; i-- {
  234. if s[i] == '.' {
  235. b = append(b, shi.decimal[0])
  236. inWhole = true
  237. continue
  238. }
  239. if inWhole {
  240. if count == 3 {
  241. for j := len(shi.group) - 1; j >= 0; j-- {
  242. b = append(b, shi.group[j])
  243. }
  244. count = 1
  245. } else {
  246. count++
  247. }
  248. }
  249. b = append(b, s[i])
  250. }
  251. if num < 0 {
  252. b = append(b, shi.minus[0])
  253. }
  254. // reverse
  255. for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
  256. b[i], b[j] = b[j], b[i]
  257. }
  258. if int(v) < 2 {
  259. if v == 0 {
  260. b = append(b, shi.decimal...)
  261. }
  262. for i := 0; i < 2-int(v); i++ {
  263. b = append(b, '0')
  264. }
  265. }
  266. if num < 0 {
  267. b = append(b, symbol...)
  268. } else {
  269. b = append(b, symbol...)
  270. }
  271. return string(b)
  272. }
  273. // FmtDateShort returns the short date representation of 't' for 'shi_Latn'
  274. func (shi *shi_Latn) FmtDateShort(t time.Time) string {
  275. b := make([]byte, 0, 32)
  276. b = strconv.AppendInt(b, int64(t.Day()), 10)
  277. b = append(b, []byte{0x2f}...)
  278. b = strconv.AppendInt(b, int64(t.Month()), 10)
  279. b = append(b, []byte{0x2f}...)
  280. if t.Year() > 0 {
  281. b = strconv.AppendInt(b, int64(t.Year()), 10)
  282. } else {
  283. b = strconv.AppendInt(b, int64(-t.Year()), 10)
  284. }
  285. return string(b)
  286. }
  287. // FmtDateMedium returns the medium date representation of 't' for 'shi_Latn'
  288. func (shi *shi_Latn) FmtDateMedium(t time.Time) string {
  289. b := make([]byte, 0, 32)
  290. b = strconv.AppendInt(b, int64(t.Day()), 10)
  291. b = append(b, []byte{0x20}...)
  292. b = append(b, shi.monthsAbbreviated[t.Month()]...)
  293. b = append(b, []byte{0x2c, 0x20}...)
  294. if t.Year() > 0 {
  295. b = strconv.AppendInt(b, int64(t.Year()), 10)
  296. } else {
  297. b = strconv.AppendInt(b, int64(-t.Year()), 10)
  298. }
  299. return string(b)
  300. }
  301. // FmtDateLong returns the long date representation of 't' for 'shi_Latn'
  302. func (shi *shi_Latn) FmtDateLong(t time.Time) string {
  303. b := make([]byte, 0, 32)
  304. b = strconv.AppendInt(b, int64(t.Day()), 10)
  305. b = append(b, []byte{0x20}...)
  306. b = append(b, shi.monthsWide[t.Month()]...)
  307. b = append(b, []byte{0x20}...)
  308. if t.Year() > 0 {
  309. b = strconv.AppendInt(b, int64(t.Year()), 10)
  310. } else {
  311. b = strconv.AppendInt(b, int64(-t.Year()), 10)
  312. }
  313. return string(b)
  314. }
  315. // FmtDateFull returns the full date representation of 't' for 'shi_Latn'
  316. func (shi *shi_Latn) FmtDateFull(t time.Time) string {
  317. b := make([]byte, 0, 32)
  318. b = append(b, shi.daysWide[t.Weekday()]...)
  319. b = append(b, []byte{0x20}...)
  320. b = strconv.AppendInt(b, int64(t.Day()), 10)
  321. b = append(b, []byte{0x20}...)
  322. b = append(b, shi.monthsWide[t.Month()]...)
  323. b = append(b, []byte{0x20}...)
  324. if t.Year() > 0 {
  325. b = strconv.AppendInt(b, int64(t.Year()), 10)
  326. } else {
  327. b = strconv.AppendInt(b, int64(-t.Year()), 10)
  328. }
  329. return string(b)
  330. }
  331. // FmtTimeShort returns the short time representation of 't' for 'shi_Latn'
  332. func (shi *shi_Latn) FmtTimeShort(t time.Time) string {
  333. b := make([]byte, 0, 32)
  334. if t.Hour() < 10 {
  335. b = append(b, '0')
  336. }
  337. b = strconv.AppendInt(b, int64(t.Hour()), 10)
  338. b = append(b, shi.timeSeparator...)
  339. if t.Minute() < 10 {
  340. b = append(b, '0')
  341. }
  342. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  343. return string(b)
  344. }
  345. // FmtTimeMedium returns the medium time representation of 't' for 'shi_Latn'
  346. func (shi *shi_Latn) FmtTimeMedium(t time.Time) string {
  347. b := make([]byte, 0, 32)
  348. if t.Hour() < 10 {
  349. b = append(b, '0')
  350. }
  351. b = strconv.AppendInt(b, int64(t.Hour()), 10)
  352. b = append(b, shi.timeSeparator...)
  353. if t.Minute() < 10 {
  354. b = append(b, '0')
  355. }
  356. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  357. b = append(b, shi.timeSeparator...)
  358. if t.Second() < 10 {
  359. b = append(b, '0')
  360. }
  361. b = strconv.AppendInt(b, int64(t.Second()), 10)
  362. return string(b)
  363. }
  364. // FmtTimeLong returns the long time representation of 't' for 'shi_Latn'
  365. func (shi *shi_Latn) FmtTimeLong(t time.Time) string {
  366. b := make([]byte, 0, 32)
  367. if t.Hour() < 10 {
  368. b = append(b, '0')
  369. }
  370. b = strconv.AppendInt(b, int64(t.Hour()), 10)
  371. b = append(b, shi.timeSeparator...)
  372. if t.Minute() < 10 {
  373. b = append(b, '0')
  374. }
  375. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  376. b = append(b, shi.timeSeparator...)
  377. if t.Second() < 10 {
  378. b = append(b, '0')
  379. }
  380. b = strconv.AppendInt(b, int64(t.Second()), 10)
  381. b = append(b, []byte{0x20}...)
  382. tz, _ := t.Zone()
  383. b = append(b, tz...)
  384. return string(b)
  385. }
  386. // FmtTimeFull returns the full time representation of 't' for 'shi_Latn'
  387. func (shi *shi_Latn) FmtTimeFull(t time.Time) string {
  388. b := make([]byte, 0, 32)
  389. if t.Hour() < 10 {
  390. b = append(b, '0')
  391. }
  392. b = strconv.AppendInt(b, int64(t.Hour()), 10)
  393. b = append(b, shi.timeSeparator...)
  394. if t.Minute() < 10 {
  395. b = append(b, '0')
  396. }
  397. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  398. b = append(b, shi.timeSeparator...)
  399. if t.Second() < 10 {
  400. b = append(b, '0')
  401. }
  402. b = strconv.AppendInt(b, int64(t.Second()), 10)
  403. b = append(b, []byte{0x20}...)
  404. tz, _ := t.Zone()
  405. if btz, ok := shi.timezones[tz]; ok {
  406. b = append(b, btz...)
  407. } else {
  408. b = append(b, tz...)
  409. }
  410. return string(b)
  411. }