seh_MZ.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523
  1. package seh_MZ
  2. import (
  3. "math"
  4. "strconv"
  5. "time"
  6. "github.com/go-playground/locales"
  7. "github.com/go-playground/locales/currency"
  8. )
  9. type seh_MZ 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 'seh_MZ' locale
  39. func New() locales.Translator {
  40. return &seh_MZ{
  41. locale: "seh_MZ",
  42. pluralsCardinal: []locales.PluralRule{2, 6},
  43. pluralsOrdinal: nil,
  44. pluralsRange: nil,
  45. decimal: ",",
  46. group: ".",
  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. monthsAbbreviated: []string{"", "Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Aug", "Set", "Otu", "Nov", "Dec"},
  50. monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"},
  51. monthsWide: []string{"", "Janeiro", "Fevreiro", "Marco", "Abril", "Maio", "Junho", "Julho", "Augusto", "Setembro", "Otubro", "Novembro", "Decembro"},
  52. daysAbbreviated: []string{"Dim", "Pos", "Pir", "Tat", "Nai", "Sha", "Sab"},
  53. daysNarrow: []string{"D", "P", "C", "T", "N", "S", "S"},
  54. daysWide: []string{"Dimingu", "Chiposi", "Chipiri", "Chitatu", "Chinai", "Chishanu", "Sabudu"},
  55. erasAbbreviated: []string{"AC", "AD"},
  56. erasNarrow: []string{"", ""},
  57. erasWide: []string{"Antes de Cristo", "Anno Domini"},
  58. timezones: map[string]string{"IST": "IST", "HEPM": "HEPM", "HAST": "HAST", "HADT": "HADT", "GFT": "GFT", "HNT": "HNT", "WITA": "WITA", "EAT": "EAT", "ADT": "ADT", "WAT": "WAT", "JDT": "JDT", "MESZ": "MESZ", "MYT": "MYT", "VET": "VET", "HNPM": "HNPM", "WIT": "WIT", "COST": "COST", "ARST": "ARST", "AEDT": "AEDT", "SGT": "SGT", "EDT": "EDT", "HEOG": "HEOG", "LHDT": "LHDT", "HECU": "HECU", "ECT": "ECT", "HEEG": "HEEG", "MDT": "MDT", "GYT": "GYT", "ChST": "ChST", "BT": "BT", "ACWDT": "ACWDT", "HNOG": "HNOG", "MEZ": "MEZ", "CAT": "CAT", "OESZ": "OESZ", "COT": "COT", "CDT": "CDT", "PDT": "PDT", "HEPMX": "HEPMX", "AKST": "AKST", "WART": "WART", "WAST": "WAST", "ART": "ART", "AWDT": "AWDT", "AST": "AST", "ACWST": "ACWST", "HENOMX": "HENOMX", "SRT": "SRT", "CLT": "CLT", "CHADT": "CHADT", "CST": "CST", "ACDT": "ACDT", "HKT": "HKT", "HAT": "HAT", "CLST": "CLST", "HNCU": "HNCU", "SAST": "SAST", "JST": "JST", "GMT": "GMT", "UYT": "UYT", "CHAST": "CHAST", "AWST": "AWST", "WIB": "WIB", "EST": "EST", "HKST": "HKST", "WARST": "WARST", "NZDT": "NZDT", "NZST": "NZST", "∅∅∅": "∅∅∅", "HNNOMX": "HNNOMX", "MST": "MST", "TMT": "TMT", "TMST": "TMST", "UYST": "UYST", "HNPMX": "HNPMX", "AKDT": "AKDT", "ACST": "ACST", "HNEG": "HNEG", "LHST": "LHST", "OEZ": "OEZ", "PST": "PST", "AEST": "AEST", "WEZ": "WEZ", "WESZ": "WESZ", "BOT": "BOT"},
  59. }
  60. }
  61. // Locale returns the current translators string locale
  62. func (seh *seh_MZ) Locale() string {
  63. return seh.locale
  64. }
  65. // PluralsCardinal returns the list of cardinal plural rules associated with 'seh_MZ'
  66. func (seh *seh_MZ) PluralsCardinal() []locales.PluralRule {
  67. return seh.pluralsCardinal
  68. }
  69. // PluralsOrdinal returns the list of ordinal plural rules associated with 'seh_MZ'
  70. func (seh *seh_MZ) PluralsOrdinal() []locales.PluralRule {
  71. return seh.pluralsOrdinal
  72. }
  73. // PluralsRange returns the list of range plural rules associated with 'seh_MZ'
  74. func (seh *seh_MZ) PluralsRange() []locales.PluralRule {
  75. return seh.pluralsRange
  76. }
  77. // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'seh_MZ'
  78. func (seh *seh_MZ) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
  79. n := math.Abs(num)
  80. if n == 1 {
  81. return locales.PluralRuleOne
  82. }
  83. return locales.PluralRuleOther
  84. }
  85. // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'seh_MZ'
  86. func (seh *seh_MZ) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
  87. return locales.PluralRuleUnknown
  88. }
  89. // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'seh_MZ'
  90. func (seh *seh_MZ) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
  91. return locales.PluralRuleUnknown
  92. }
  93. // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
  94. func (seh *seh_MZ) MonthAbbreviated(month time.Month) string {
  95. return seh.monthsAbbreviated[month]
  96. }
  97. // MonthsAbbreviated returns the locales abbreviated months
  98. func (seh *seh_MZ) MonthsAbbreviated() []string {
  99. return seh.monthsAbbreviated[1:]
  100. }
  101. // MonthNarrow returns the locales narrow month given the 'month' provided
  102. func (seh *seh_MZ) MonthNarrow(month time.Month) string {
  103. return seh.monthsNarrow[month]
  104. }
  105. // MonthsNarrow returns the locales narrow months
  106. func (seh *seh_MZ) MonthsNarrow() []string {
  107. return seh.monthsNarrow[1:]
  108. }
  109. // MonthWide returns the locales wide month given the 'month' provided
  110. func (seh *seh_MZ) MonthWide(month time.Month) string {
  111. return seh.monthsWide[month]
  112. }
  113. // MonthsWide returns the locales wide months
  114. func (seh *seh_MZ) MonthsWide() []string {
  115. return seh.monthsWide[1:]
  116. }
  117. // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
  118. func (seh *seh_MZ) WeekdayAbbreviated(weekday time.Weekday) string {
  119. return seh.daysAbbreviated[weekday]
  120. }
  121. // WeekdaysAbbreviated returns the locales abbreviated weekdays
  122. func (seh *seh_MZ) WeekdaysAbbreviated() []string {
  123. return seh.daysAbbreviated
  124. }
  125. // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
  126. func (seh *seh_MZ) WeekdayNarrow(weekday time.Weekday) string {
  127. return seh.daysNarrow[weekday]
  128. }
  129. // WeekdaysNarrow returns the locales narrow weekdays
  130. func (seh *seh_MZ) WeekdaysNarrow() []string {
  131. return seh.daysNarrow
  132. }
  133. // WeekdayShort returns the locales short weekday given the 'weekday' provided
  134. func (seh *seh_MZ) WeekdayShort(weekday time.Weekday) string {
  135. return seh.daysShort[weekday]
  136. }
  137. // WeekdaysShort returns the locales short weekdays
  138. func (seh *seh_MZ) WeekdaysShort() []string {
  139. return seh.daysShort
  140. }
  141. // WeekdayWide returns the locales wide weekday given the 'weekday' provided
  142. func (seh *seh_MZ) WeekdayWide(weekday time.Weekday) string {
  143. return seh.daysWide[weekday]
  144. }
  145. // WeekdaysWide returns the locales wide weekdays
  146. func (seh *seh_MZ) WeekdaysWide() []string {
  147. return seh.daysWide
  148. }
  149. // Decimal returns the decimal point of number
  150. func (seh *seh_MZ) Decimal() string {
  151. return seh.decimal
  152. }
  153. // Group returns the group of number
  154. func (seh *seh_MZ) Group() string {
  155. return seh.group
  156. }
  157. // Group returns the minus sign of number
  158. func (seh *seh_MZ) Minus() string {
  159. return seh.minus
  160. }
  161. // FmtNumber returns 'num' with digits/precision of 'v' for 'seh_MZ' and handles both Whole and Real numbers based on 'v'
  162. func (seh *seh_MZ) FmtNumber(num float64, v uint64) string {
  163. return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  164. }
  165. // FmtPercent returns 'num' with digits/precision of 'v' for 'seh_MZ' and handles both Whole and Real numbers based on 'v'
  166. // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
  167. func (seh *seh_MZ) FmtPercent(num float64, v uint64) string {
  168. return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  169. }
  170. // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'seh_MZ'
  171. func (seh *seh_MZ) FmtCurrency(num float64, v uint64, currency currency.Type) string {
  172. s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  173. symbol := seh.currencies[currency]
  174. l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3
  175. count := 0
  176. inWhole := v == 0
  177. b := make([]byte, 0, l)
  178. for i := len(s) - 1; i >= 0; i-- {
  179. if s[i] == '.' {
  180. b = append(b, seh.decimal[0])
  181. inWhole = true
  182. continue
  183. }
  184. if inWhole {
  185. if count == 3 {
  186. b = append(b, seh.group[0])
  187. count = 1
  188. } else {
  189. count++
  190. }
  191. }
  192. b = append(b, s[i])
  193. }
  194. if num < 0 {
  195. b = append(b, seh.minus[0])
  196. }
  197. // reverse
  198. for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
  199. b[i], b[j] = b[j], b[i]
  200. }
  201. if int(v) < 2 {
  202. if v == 0 {
  203. b = append(b, seh.decimal...)
  204. }
  205. for i := 0; i < 2-int(v); i++ {
  206. b = append(b, '0')
  207. }
  208. }
  209. b = append(b, symbol...)
  210. return string(b)
  211. }
  212. // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'seh_MZ'
  213. // in accounting notation.
  214. func (seh *seh_MZ) FmtAccounting(num float64, v uint64, currency currency.Type) string {
  215. s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  216. symbol := seh.currencies[currency]
  217. l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3
  218. count := 0
  219. inWhole := v == 0
  220. b := make([]byte, 0, l)
  221. for i := len(s) - 1; i >= 0; i-- {
  222. if s[i] == '.' {
  223. b = append(b, seh.decimal[0])
  224. inWhole = true
  225. continue
  226. }
  227. if inWhole {
  228. if count == 3 {
  229. b = append(b, seh.group[0])
  230. count = 1
  231. } else {
  232. count++
  233. }
  234. }
  235. b = append(b, s[i])
  236. }
  237. if num < 0 {
  238. b = append(b, seh.minus[0])
  239. }
  240. // reverse
  241. for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
  242. b[i], b[j] = b[j], b[i]
  243. }
  244. if int(v) < 2 {
  245. if v == 0 {
  246. b = append(b, seh.decimal...)
  247. }
  248. for i := 0; i < 2-int(v); i++ {
  249. b = append(b, '0')
  250. }
  251. }
  252. if num < 0 {
  253. b = append(b, symbol...)
  254. } else {
  255. b = append(b, symbol...)
  256. }
  257. return string(b)
  258. }
  259. // FmtDateShort returns the short date representation of 't' for 'seh_MZ'
  260. func (seh *seh_MZ) FmtDateShort(t time.Time) string {
  261. b := make([]byte, 0, 32)
  262. b = strconv.AppendInt(b, int64(t.Day()), 10)
  263. b = append(b, []byte{0x2f}...)
  264. b = strconv.AppendInt(b, int64(t.Month()), 10)
  265. b = append(b, []byte{0x2f}...)
  266. if t.Year() > 0 {
  267. b = strconv.AppendInt(b, int64(t.Year()), 10)
  268. } else {
  269. b = strconv.AppendInt(b, int64(-t.Year()), 10)
  270. }
  271. return string(b)
  272. }
  273. // FmtDateMedium returns the medium date representation of 't' for 'seh_MZ'
  274. func (seh *seh_MZ) FmtDateMedium(t time.Time) string {
  275. b := make([]byte, 0, 32)
  276. b = strconv.AppendInt(b, int64(t.Day()), 10)
  277. b = append(b, []byte{0x20, 0x64, 0x65}...)
  278. b = append(b, []byte{0x20}...)
  279. b = append(b, seh.monthsAbbreviated[t.Month()]...)
  280. b = append(b, []byte{0x20, 0x64, 0x65}...)
  281. b = append(b, []byte{0x20}...)
  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. // FmtDateLong returns the long date representation of 't' for 'seh_MZ'
  290. func (seh *seh_MZ) FmtDateLong(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, 0x64, 0x65}...)
  294. b = append(b, []byte{0x20}...)
  295. b = append(b, seh.monthsWide[t.Month()]...)
  296. b = append(b, []byte{0x20, 0x64, 0x65}...)
  297. b = append(b, []byte{0x20}...)
  298. if t.Year() > 0 {
  299. b = strconv.AppendInt(b, int64(t.Year()), 10)
  300. } else {
  301. b = strconv.AppendInt(b, int64(-t.Year()), 10)
  302. }
  303. return string(b)
  304. }
  305. // FmtDateFull returns the full date representation of 't' for 'seh_MZ'
  306. func (seh *seh_MZ) FmtDateFull(t time.Time) string {
  307. b := make([]byte, 0, 32)
  308. b = append(b, seh.daysWide[t.Weekday()]...)
  309. b = append(b, []byte{0x2c, 0x20}...)
  310. b = strconv.AppendInt(b, int64(t.Day()), 10)
  311. b = append(b, []byte{0x20, 0x64, 0x65}...)
  312. b = append(b, []byte{0x20}...)
  313. b = append(b, seh.monthsWide[t.Month()]...)
  314. b = append(b, []byte{0x20, 0x64, 0x65}...)
  315. b = append(b, []byte{0x20}...)
  316. if t.Year() > 0 {
  317. b = strconv.AppendInt(b, int64(t.Year()), 10)
  318. } else {
  319. b = strconv.AppendInt(b, int64(-t.Year()), 10)
  320. }
  321. return string(b)
  322. }
  323. // FmtTimeShort returns the short time representation of 't' for 'seh_MZ'
  324. func (seh *seh_MZ) FmtTimeShort(t time.Time) string {
  325. b := make([]byte, 0, 32)
  326. if t.Hour() < 10 {
  327. b = append(b, '0')
  328. }
  329. b = strconv.AppendInt(b, int64(t.Hour()), 10)
  330. b = append(b, seh.timeSeparator...)
  331. if t.Minute() < 10 {
  332. b = append(b, '0')
  333. }
  334. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  335. return string(b)
  336. }
  337. // FmtTimeMedium returns the medium time representation of 't' for 'seh_MZ'
  338. func (seh *seh_MZ) FmtTimeMedium(t time.Time) string {
  339. b := make([]byte, 0, 32)
  340. if t.Hour() < 10 {
  341. b = append(b, '0')
  342. }
  343. b = strconv.AppendInt(b, int64(t.Hour()), 10)
  344. b = append(b, seh.timeSeparator...)
  345. if t.Minute() < 10 {
  346. b = append(b, '0')
  347. }
  348. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  349. b = append(b, seh.timeSeparator...)
  350. if t.Second() < 10 {
  351. b = append(b, '0')
  352. }
  353. b = strconv.AppendInt(b, int64(t.Second()), 10)
  354. return string(b)
  355. }
  356. // FmtTimeLong returns the long time representation of 't' for 'seh_MZ'
  357. func (seh *seh_MZ) FmtTimeLong(t time.Time) string {
  358. b := make([]byte, 0, 32)
  359. if t.Hour() < 10 {
  360. b = append(b, '0')
  361. }
  362. b = strconv.AppendInt(b, int64(t.Hour()), 10)
  363. b = append(b, seh.timeSeparator...)
  364. if t.Minute() < 10 {
  365. b = append(b, '0')
  366. }
  367. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  368. b = append(b, seh.timeSeparator...)
  369. if t.Second() < 10 {
  370. b = append(b, '0')
  371. }
  372. b = strconv.AppendInt(b, int64(t.Second()), 10)
  373. b = append(b, []byte{0x20}...)
  374. tz, _ := t.Zone()
  375. b = append(b, tz...)
  376. return string(b)
  377. }
  378. // FmtTimeFull returns the full time representation of 't' for 'seh_MZ'
  379. func (seh *seh_MZ) FmtTimeFull(t time.Time) string {
  380. b := make([]byte, 0, 32)
  381. if t.Hour() < 10 {
  382. b = append(b, '0')
  383. }
  384. b = strconv.AppendInt(b, int64(t.Hour()), 10)
  385. b = append(b, seh.timeSeparator...)
  386. if t.Minute() < 10 {
  387. b = append(b, '0')
  388. }
  389. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  390. b = append(b, seh.timeSeparator...)
  391. if t.Second() < 10 {
  392. b = append(b, '0')
  393. }
  394. b = strconv.AppendInt(b, int64(t.Second()), 10)
  395. b = append(b, []byte{0x20}...)
  396. tz, _ := t.Zone()
  397. if btz, ok := seh.timezones[tz]; ok {
  398. b = append(b, btz...)
  399. } else {
  400. b = append(b, tz...)
  401. }
  402. return string(b)
  403. }