asa_TZ.go 16 KB

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