mas_KE.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539
  1. package mas_KE
  2. import (
  3. "math"
  4. "strconv"
  5. "time"
  6. "github.com/go-playground/locales"
  7. "github.com/go-playground/locales/currency"
  8. )
  9. type mas_KE 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. currencyNegativePrefix string
  23. currencyNegativeSuffix string
  24. monthsAbbreviated []string
  25. monthsNarrow []string
  26. monthsWide []string
  27. daysAbbreviated []string
  28. daysNarrow []string
  29. daysShort []string
  30. daysWide []string
  31. periodsAbbreviated []string
  32. periodsNarrow []string
  33. periodsShort []string
  34. periodsWide []string
  35. erasAbbreviated []string
  36. erasNarrow []string
  37. erasWide []string
  38. timezones map[string]string
  39. }
  40. // New returns a new instance of translator for the 'mas_KE' locale
  41. func New() locales.Translator {
  42. return &mas_KE{
  43. locale: "mas_KE",
  44. pluralsCardinal: []locales.PluralRule{2, 6},
  45. pluralsOrdinal: nil,
  46. pluralsRange: nil,
  47. timeSeparator: ":",
  48. 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"},
  49. currencyNegativePrefix: "(",
  50. currencyNegativeSuffix: ")",
  51. monthsAbbreviated: []string{"", "Dal", "Ará", "Ɔɛn", "Doy", "Lép", "Rok", "Sás", "Bɔ́r", "Kús", "Gís", "Shʉ́", "Ntʉ́"},
  52. monthsWide: []string{"", "Oladalʉ́", "Arát", "Ɔɛnɨ́ɔɨŋɔk", "Olodoyíóríê inkókúâ", "Oloilépūnyīē inkókúâ", "Kújúɔrɔk", "Mórusásin", "Ɔlɔ́ɨ́bɔ́rárɛ", "Kúshîn", "Olgísan", "Pʉshʉ́ka", "Ntʉ́ŋʉ́s"},
  53. daysAbbreviated: []string{"Jpi", "Jtt", "Jnn", "Jtn", "Alh", "Iju", "Jmo"},
  54. daysNarrow: []string{"2", "3", "4", "5", "6", "7", "1"},
  55. daysWide: []string{"Jumapílí", "Jumatátu", "Jumane", "Jumatánɔ", "Alaámisi", "Jumáa", "Jumamósi"},
  56. periodsAbbreviated: []string{"Ɛnkakɛnyá", "Ɛndámâ"},
  57. periodsWide: []string{"Ɛnkakɛnyá", "Ɛndámâ"},
  58. erasAbbreviated: []string{"MY", "EY"},
  59. erasNarrow: []string{"", ""},
  60. erasWide: []string{"Meínō Yɛ́sʉ", "Eínō Yɛ́sʉ"},
  61. timezones: map[string]string{"HNT": "HNT", "HAST": "HAST", "HNPMX": "HNPMX", "LHST": "LHST", "WART": "WART", "IST": "IST", "HNNOMX": "HNNOMX", "COT": "COT", "PDT": "PDT", "AST": "AST", "GFT": "GFT", "UYT": "UYT", "∅∅∅": "∅∅∅", "HNOG": "HNOG", "HKT": "HKT", "ACDT": "ACDT", "HAT": "HAT", "WESZ": "WESZ", "JST": "JST", "EST": "EST", "WEZ": "WEZ", "JDT": "JDT", "WITA": "WITA", "CLT": "CLT", "AEDT": "AEDT", "WIB": "WIB", "WAT": "WAT", "HEEG": "HEEG", "HKST": "HKST", "VET": "VET", "EAT": "EAT", "HEPMX": "HEPMX", "PST": "PST", "AKST": "AKST", "HEOG": "HEOG", "TMT": "TMT", "TMST": "TMST", "CHAST": "CHAST", "CST": "CST", "MDT": "MDT", "CDT": "CDT", "MYT": "MYT", "GMT": "GMT", "BOT": "BOT", "NZST": "NZST", "HNPM": "HNPM", "ARST": "ARST", "ADT": "ADT", "MST": "MST", "WAST": "WAST", "HNEG": "HNEG", "ACWDT": "ACWDT", "WIT": "WIT", "OESZ": "OESZ", "ART": "ART", "UYST": "UYST", "HNCU": "HNCU", "HECU": "HECU", "LHDT": "LHDT", "AEST": "AEST", "OEZ": "OEZ", "ACST": "ACST", "HENOMX": "HENOMX", "SRT": "SRT", "CAT": "CAT", "HADT": "HADT", "BT": "BT", "ECT": "ECT", "EDT": "EDT", "GYT": "GYT", "COST": "COST", "ChST": "ChST", "AWST": "AWST", "AWDT": "AWDT", "MEZ": "MEZ", "SGT": "SGT", "WARST": "WARST", "SAST": "SAST", "NZDT": "NZDT", "AKDT": "AKDT", "HEPM": "HEPM", "CLST": "CLST", "CHADT": "CHADT", "ACWST": "ACWST", "MESZ": "MESZ"},
  62. }
  63. }
  64. // Locale returns the current translators string locale
  65. func (mas *mas_KE) Locale() string {
  66. return mas.locale
  67. }
  68. // PluralsCardinal returns the list of cardinal plural rules associated with 'mas_KE'
  69. func (mas *mas_KE) PluralsCardinal() []locales.PluralRule {
  70. return mas.pluralsCardinal
  71. }
  72. // PluralsOrdinal returns the list of ordinal plural rules associated with 'mas_KE'
  73. func (mas *mas_KE) PluralsOrdinal() []locales.PluralRule {
  74. return mas.pluralsOrdinal
  75. }
  76. // PluralsRange returns the list of range plural rules associated with 'mas_KE'
  77. func (mas *mas_KE) PluralsRange() []locales.PluralRule {
  78. return mas.pluralsRange
  79. }
  80. // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'mas_KE'
  81. func (mas *mas_KE) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
  82. n := math.Abs(num)
  83. if n == 1 {
  84. return locales.PluralRuleOne
  85. }
  86. return locales.PluralRuleOther
  87. }
  88. // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'mas_KE'
  89. func (mas *mas_KE) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
  90. return locales.PluralRuleUnknown
  91. }
  92. // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'mas_KE'
  93. func (mas *mas_KE) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
  94. return locales.PluralRuleUnknown
  95. }
  96. // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
  97. func (mas *mas_KE) MonthAbbreviated(month time.Month) string {
  98. return mas.monthsAbbreviated[month]
  99. }
  100. // MonthsAbbreviated returns the locales abbreviated months
  101. func (mas *mas_KE) MonthsAbbreviated() []string {
  102. return mas.monthsAbbreviated[1:]
  103. }
  104. // MonthNarrow returns the locales narrow month given the 'month' provided
  105. func (mas *mas_KE) MonthNarrow(month time.Month) string {
  106. return mas.monthsNarrow[month]
  107. }
  108. // MonthsNarrow returns the locales narrow months
  109. func (mas *mas_KE) MonthsNarrow() []string {
  110. return nil
  111. }
  112. // MonthWide returns the locales wide month given the 'month' provided
  113. func (mas *mas_KE) MonthWide(month time.Month) string {
  114. return mas.monthsWide[month]
  115. }
  116. // MonthsWide returns the locales wide months
  117. func (mas *mas_KE) MonthsWide() []string {
  118. return mas.monthsWide[1:]
  119. }
  120. // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
  121. func (mas *mas_KE) WeekdayAbbreviated(weekday time.Weekday) string {
  122. return mas.daysAbbreviated[weekday]
  123. }
  124. // WeekdaysAbbreviated returns the locales abbreviated weekdays
  125. func (mas *mas_KE) WeekdaysAbbreviated() []string {
  126. return mas.daysAbbreviated
  127. }
  128. // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
  129. func (mas *mas_KE) WeekdayNarrow(weekday time.Weekday) string {
  130. return mas.daysNarrow[weekday]
  131. }
  132. // WeekdaysNarrow returns the locales narrow weekdays
  133. func (mas *mas_KE) WeekdaysNarrow() []string {
  134. return mas.daysNarrow
  135. }
  136. // WeekdayShort returns the locales short weekday given the 'weekday' provided
  137. func (mas *mas_KE) WeekdayShort(weekday time.Weekday) string {
  138. return mas.daysShort[weekday]
  139. }
  140. // WeekdaysShort returns the locales short weekdays
  141. func (mas *mas_KE) WeekdaysShort() []string {
  142. return mas.daysShort
  143. }
  144. // WeekdayWide returns the locales wide weekday given the 'weekday' provided
  145. func (mas *mas_KE) WeekdayWide(weekday time.Weekday) string {
  146. return mas.daysWide[weekday]
  147. }
  148. // WeekdaysWide returns the locales wide weekdays
  149. func (mas *mas_KE) WeekdaysWide() []string {
  150. return mas.daysWide
  151. }
  152. // Decimal returns the decimal point of number
  153. func (mas *mas_KE) Decimal() string {
  154. return mas.decimal
  155. }
  156. // Group returns the group of number
  157. func (mas *mas_KE) Group() string {
  158. return mas.group
  159. }
  160. // Group returns the minus sign of number
  161. func (mas *mas_KE) Minus() string {
  162. return mas.minus
  163. }
  164. // FmtNumber returns 'num' with digits/precision of 'v' for 'mas_KE' and handles both Whole and Real numbers based on 'v'
  165. func (mas *mas_KE) FmtNumber(num float64, v uint64) string {
  166. return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  167. }
  168. // FmtPercent returns 'num' with digits/precision of 'v' for 'mas_KE' and handles both Whole and Real numbers based on 'v'
  169. // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
  170. func (mas *mas_KE) FmtPercent(num float64, v uint64) string {
  171. return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  172. }
  173. // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'mas_KE'
  174. func (mas *mas_KE) FmtCurrency(num float64, v uint64, currency currency.Type) string {
  175. s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  176. symbol := mas.currencies[currency]
  177. l := len(s) + len(symbol) + 0
  178. count := 0
  179. inWhole := v == 0
  180. b := make([]byte, 0, l)
  181. for i := len(s) - 1; i >= 0; i-- {
  182. if s[i] == '.' {
  183. b = append(b, mas.decimal[0])
  184. inWhole = true
  185. continue
  186. }
  187. if inWhole {
  188. if count == 3 {
  189. b = append(b, mas.group[0])
  190. count = 1
  191. } else {
  192. count++
  193. }
  194. }
  195. b = append(b, s[i])
  196. }
  197. for j := len(symbol) - 1; j >= 0; j-- {
  198. b = append(b, symbol[j])
  199. }
  200. if num < 0 {
  201. b = append(b, mas.minus[0])
  202. }
  203. // reverse
  204. for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
  205. b[i], b[j] = b[j], b[i]
  206. }
  207. if int(v) < 2 {
  208. if v == 0 {
  209. b = append(b, mas.decimal...)
  210. }
  211. for i := 0; i < 2-int(v); i++ {
  212. b = append(b, '0')
  213. }
  214. }
  215. return string(b)
  216. }
  217. // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'mas_KE'
  218. // in accounting notation.
  219. func (mas *mas_KE) FmtAccounting(num float64, v uint64, currency currency.Type) string {
  220. s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  221. symbol := mas.currencies[currency]
  222. l := len(s) + len(symbol) + 2
  223. count := 0
  224. inWhole := v == 0
  225. b := make([]byte, 0, l)
  226. for i := len(s) - 1; i >= 0; i-- {
  227. if s[i] == '.' {
  228. b = append(b, mas.decimal[0])
  229. inWhole = true
  230. continue
  231. }
  232. if inWhole {
  233. if count == 3 {
  234. b = append(b, mas.group[0])
  235. count = 1
  236. } else {
  237. count++
  238. }
  239. }
  240. b = append(b, s[i])
  241. }
  242. if num < 0 {
  243. for j := len(symbol) - 1; j >= 0; j-- {
  244. b = append(b, symbol[j])
  245. }
  246. b = append(b, mas.currencyNegativePrefix[0])
  247. } else {
  248. for j := len(symbol) - 1; j >= 0; j-- {
  249. b = append(b, symbol[j])
  250. }
  251. }
  252. // reverse
  253. for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
  254. b[i], b[j] = b[j], b[i]
  255. }
  256. if int(v) < 2 {
  257. if v == 0 {
  258. b = append(b, mas.decimal...)
  259. }
  260. for i := 0; i < 2-int(v); i++ {
  261. b = append(b, '0')
  262. }
  263. }
  264. if num < 0 {
  265. b = append(b, mas.currencyNegativeSuffix...)
  266. }
  267. return string(b)
  268. }
  269. // FmtDateShort returns the short date representation of 't' for 'mas_KE'
  270. func (mas *mas_KE) FmtDateShort(t time.Time) string {
  271. b := make([]byte, 0, 32)
  272. if t.Day() < 10 {
  273. b = append(b, '0')
  274. }
  275. b = strconv.AppendInt(b, int64(t.Day()), 10)
  276. b = append(b, []byte{0x2f}...)
  277. if t.Month() < 10 {
  278. b = append(b, '0')
  279. }
  280. b = strconv.AppendInt(b, int64(t.Month()), 10)
  281. b = append(b, []byte{0x2f}...)
  282. if t.Year() > 0 {
  283. b = strconv.AppendInt(b, int64(t.Year()), 10)
  284. } else {
  285. b = strconv.AppendInt(b, int64(-t.Year()), 10)
  286. }
  287. return string(b)
  288. }
  289. // FmtDateMedium returns the medium date representation of 't' for 'mas_KE'
  290. func (mas *mas_KE) FmtDateMedium(t time.Time) string {
  291. b := make([]byte, 0, 32)
  292. b = strconv.AppendInt(b, int64(t.Day()), 10)
  293. b = append(b, []byte{0x20}...)
  294. b = append(b, mas.monthsAbbreviated[t.Month()]...)
  295. b = append(b, []byte{0x20}...)
  296. if t.Year() > 0 {
  297. b = strconv.AppendInt(b, int64(t.Year()), 10)
  298. } else {
  299. b = strconv.AppendInt(b, int64(-t.Year()), 10)
  300. }
  301. return string(b)
  302. }
  303. // FmtDateLong returns the long date representation of 't' for 'mas_KE'
  304. func (mas *mas_KE) FmtDateLong(t time.Time) string {
  305. b := make([]byte, 0, 32)
  306. b = strconv.AppendInt(b, int64(t.Day()), 10)
  307. b = append(b, []byte{0x20}...)
  308. b = append(b, mas.monthsWide[t.Month()]...)
  309. b = append(b, []byte{0x20}...)
  310. if t.Year() > 0 {
  311. b = strconv.AppendInt(b, int64(t.Year()), 10)
  312. } else {
  313. b = strconv.AppendInt(b, int64(-t.Year()), 10)
  314. }
  315. return string(b)
  316. }
  317. // FmtDateFull returns the full date representation of 't' for 'mas_KE'
  318. func (mas *mas_KE) FmtDateFull(t time.Time) string {
  319. b := make([]byte, 0, 32)
  320. b = append(b, mas.daysWide[t.Weekday()]...)
  321. b = append(b, []byte{0x2c, 0x20}...)
  322. b = strconv.AppendInt(b, int64(t.Day()), 10)
  323. b = append(b, []byte{0x20}...)
  324. b = append(b, mas.monthsWide[t.Month()]...)
  325. b = append(b, []byte{0x20}...)
  326. if t.Year() > 0 {
  327. b = strconv.AppendInt(b, int64(t.Year()), 10)
  328. } else {
  329. b = strconv.AppendInt(b, int64(-t.Year()), 10)
  330. }
  331. return string(b)
  332. }
  333. // FmtTimeShort returns the short time representation of 't' for 'mas_KE'
  334. func (mas *mas_KE) FmtTimeShort(t time.Time) string {
  335. b := make([]byte, 0, 32)
  336. if t.Hour() < 10 {
  337. b = append(b, '0')
  338. }
  339. b = strconv.AppendInt(b, int64(t.Hour()), 10)
  340. b = append(b, mas.timeSeparator...)
  341. if t.Minute() < 10 {
  342. b = append(b, '0')
  343. }
  344. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  345. return string(b)
  346. }
  347. // FmtTimeMedium returns the medium time representation of 't' for 'mas_KE'
  348. func (mas *mas_KE) FmtTimeMedium(t time.Time) string {
  349. b := make([]byte, 0, 32)
  350. if t.Hour() < 10 {
  351. b = append(b, '0')
  352. }
  353. b = strconv.AppendInt(b, int64(t.Hour()), 10)
  354. b = append(b, mas.timeSeparator...)
  355. if t.Minute() < 10 {
  356. b = append(b, '0')
  357. }
  358. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  359. b = append(b, mas.timeSeparator...)
  360. if t.Second() < 10 {
  361. b = append(b, '0')
  362. }
  363. b = strconv.AppendInt(b, int64(t.Second()), 10)
  364. return string(b)
  365. }
  366. // FmtTimeLong returns the long time representation of 't' for 'mas_KE'
  367. func (mas *mas_KE) FmtTimeLong(t time.Time) string {
  368. b := make([]byte, 0, 32)
  369. if t.Hour() < 10 {
  370. b = append(b, '0')
  371. }
  372. b = strconv.AppendInt(b, int64(t.Hour()), 10)
  373. b = append(b, mas.timeSeparator...)
  374. if t.Minute() < 10 {
  375. b = append(b, '0')
  376. }
  377. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  378. b = append(b, mas.timeSeparator...)
  379. if t.Second() < 10 {
  380. b = append(b, '0')
  381. }
  382. b = strconv.AppendInt(b, int64(t.Second()), 10)
  383. b = append(b, []byte{0x20}...)
  384. tz, _ := t.Zone()
  385. b = append(b, tz...)
  386. return string(b)
  387. }
  388. // FmtTimeFull returns the full time representation of 't' for 'mas_KE'
  389. func (mas *mas_KE) FmtTimeFull(t time.Time) string {
  390. b := make([]byte, 0, 32)
  391. if t.Hour() < 10 {
  392. b = append(b, '0')
  393. }
  394. b = strconv.AppendInt(b, int64(t.Hour()), 10)
  395. b = append(b, mas.timeSeparator...)
  396. if t.Minute() < 10 {
  397. b = append(b, '0')
  398. }
  399. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  400. b = append(b, mas.timeSeparator...)
  401. if t.Second() < 10 {
  402. b = append(b, '0')
  403. }
  404. b = strconv.AppendInt(b, int64(t.Second()), 10)
  405. b = append(b, []byte{0x20}...)
  406. tz, _ := t.Zone()
  407. if btz, ok := mas.timezones[tz]; ok {
  408. b = append(b, btz...)
  409. } else {
  410. b = append(b, tz...)
  411. }
  412. return string(b)
  413. }