ff_GN.go 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. package ff_GN
  2. import (
  3. "math"
  4. "strconv"
  5. "time"
  6. "github.com/go-playground/locales"
  7. "github.com/go-playground/locales/currency"
  8. )
  9. type ff_GN 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 'ff_GN' locale
  41. func New() locales.Translator {
  42. return &ff_GN{
  43. locale: "ff_GN",
  44. pluralsCardinal: []locales.PluralRule{2, 6},
  45. pluralsOrdinal: nil,
  46. pluralsRange: nil,
  47. decimal: ",",
  48. group: " ",
  49. timeSeparator: ":",
  50. 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", "FG", "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"},
  51. currencyPositiveSuffix: " ",
  52. currencyNegativeSuffix: " ",
  53. monthsAbbreviated: []string{"", "sii", "col", "mbo", "see", "duu", "kor", "mor", "juk", "slt", "yar", "jol", "bow"},
  54. monthsNarrow: []string{"", "s", "c", "m", "s", "d", "k", "m", "j", "s", "y", "j", "b"},
  55. monthsWide: []string{"", "siilo", "colte", "mbooy", "seeɗto", "duujal", "korse", "morso", "juko", "siilto", "yarkomaa", "jolal", "bowte"},
  56. daysAbbreviated: []string{"dew", "aaɓ", "maw", "nje", "naa", "mwd", "hbi"},
  57. daysNarrow: []string{"d", "a", "m", "n", "n", "m", "h"},
  58. daysWide: []string{"dewo", "aaɓnde", "mawbaare", "njeslaare", "naasaande", "mawnde", "hoore-biir"},
  59. periodsAbbreviated: []string{"subaka", "kikiiɗe"},
  60. periodsWide: []string{"subaka", "kikiiɗe"},
  61. erasAbbreviated: []string{"H-I", "C-I"},
  62. erasNarrow: []string{"", ""},
  63. erasWide: []string{"Hade Iisa", "Caggal Iisa"},
  64. timezones: map[string]string{"MEZ": "MEZ", "SRT": "SRT", "PST": "PST", "HEPMX": "HEPMX", "WEZ": "WEZ", "GFT": "GFT", "MYT": "MYT", "AKDT": "AKDT", "HEOG": "HEOG", "HKT": "HKT", "∅∅∅": "∅∅∅", "WIT": "WIT", "ChST": "ChST", "PDT": "PDT", "WAT": "WAT", "HENOMX": "HENOMX", "OESZ": "OESZ", "ACDT": "ACDT", "LHDT": "LHDT", "CHADT": "CHADT", "NZST": "NZST", "HEEG": "HEEG", "COST": "COST", "GMT": "GMT", "WAST": "WAST", "WESZ": "WESZ", "JST": "JST", "LHST": "LHST", "TMT": "TMT", "EAT": "EAT", "HNPMX": "HNPMX", "JDT": "JDT", "BOT": "BOT", "SGT": "SGT", "HAST": "HAST", "UYST": "UYST", "BT": "BT", "ECT": "ECT", "HNOG": "HNOG", "ACST": "ACST", "OEZ": "OEZ", "COT": "COT", "AWST": "AWST", "ADT": "ADT", "SAST": "SAST", "HKST": "HKST", "WITA": "WITA", "HADT": "HADT", "CHAST": "CHAST", "NZDT": "NZDT", "WARST": "WARST", "TMST": "TMST", "WIB": "WIB", "ACWST": "ACWST", "ART": "ART", "HNCU": "HNCU", "EST": "EST", "VET": "VET", "MST": "MST", "HECU": "HECU", "AWDT": "AWDT", "AEST": "AEST", "AKST": "AKST", "HEPM": "HEPM", "CLT": "CLT", "GYT": "GYT", "AST": "AST", "AEDT": "AEDT", "CLST": "CLST", "UYT": "UYT", "CST": "CST", "CDT": "CDT", "ACWDT": "ACWDT", "HNEG": "HNEG", "IST": "IST", "WART": "WART", "HAT": "HAT", "CAT": "CAT", "ARST": "ARST", "EDT": "EDT", "MESZ": "MESZ", "HNT": "HNT", "HNPM": "HNPM", "HNNOMX": "HNNOMX", "MDT": "MDT"},
  65. }
  66. }
  67. // Locale returns the current translators string locale
  68. func (ff *ff_GN) Locale() string {
  69. return ff.locale
  70. }
  71. // PluralsCardinal returns the list of cardinal plural rules associated with 'ff_GN'
  72. func (ff *ff_GN) PluralsCardinal() []locales.PluralRule {
  73. return ff.pluralsCardinal
  74. }
  75. // PluralsOrdinal returns the list of ordinal plural rules associated with 'ff_GN'
  76. func (ff *ff_GN) PluralsOrdinal() []locales.PluralRule {
  77. return ff.pluralsOrdinal
  78. }
  79. // PluralsRange returns the list of range plural rules associated with 'ff_GN'
  80. func (ff *ff_GN) PluralsRange() []locales.PluralRule {
  81. return ff.pluralsRange
  82. }
  83. // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'ff_GN'
  84. func (ff *ff_GN) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
  85. n := math.Abs(num)
  86. i := int64(n)
  87. if i == 0 || i == 1 {
  88. return locales.PluralRuleOne
  89. }
  90. return locales.PluralRuleOther
  91. }
  92. // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'ff_GN'
  93. func (ff *ff_GN) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
  94. return locales.PluralRuleUnknown
  95. }
  96. // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'ff_GN'
  97. func (ff *ff_GN) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
  98. return locales.PluralRuleUnknown
  99. }
  100. // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
  101. func (ff *ff_GN) MonthAbbreviated(month time.Month) string {
  102. return ff.monthsAbbreviated[month]
  103. }
  104. // MonthsAbbreviated returns the locales abbreviated months
  105. func (ff *ff_GN) MonthsAbbreviated() []string {
  106. return ff.monthsAbbreviated[1:]
  107. }
  108. // MonthNarrow returns the locales narrow month given the 'month' provided
  109. func (ff *ff_GN) MonthNarrow(month time.Month) string {
  110. return ff.monthsNarrow[month]
  111. }
  112. // MonthsNarrow returns the locales narrow months
  113. func (ff *ff_GN) MonthsNarrow() []string {
  114. return ff.monthsNarrow[1:]
  115. }
  116. // MonthWide returns the locales wide month given the 'month' provided
  117. func (ff *ff_GN) MonthWide(month time.Month) string {
  118. return ff.monthsWide[month]
  119. }
  120. // MonthsWide returns the locales wide months
  121. func (ff *ff_GN) MonthsWide() []string {
  122. return ff.monthsWide[1:]
  123. }
  124. // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
  125. func (ff *ff_GN) WeekdayAbbreviated(weekday time.Weekday) string {
  126. return ff.daysAbbreviated[weekday]
  127. }
  128. // WeekdaysAbbreviated returns the locales abbreviated weekdays
  129. func (ff *ff_GN) WeekdaysAbbreviated() []string {
  130. return ff.daysAbbreviated
  131. }
  132. // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
  133. func (ff *ff_GN) WeekdayNarrow(weekday time.Weekday) string {
  134. return ff.daysNarrow[weekday]
  135. }
  136. // WeekdaysNarrow returns the locales narrow weekdays
  137. func (ff *ff_GN) WeekdaysNarrow() []string {
  138. return ff.daysNarrow
  139. }
  140. // WeekdayShort returns the locales short weekday given the 'weekday' provided
  141. func (ff *ff_GN) WeekdayShort(weekday time.Weekday) string {
  142. return ff.daysShort[weekday]
  143. }
  144. // WeekdaysShort returns the locales short weekdays
  145. func (ff *ff_GN) WeekdaysShort() []string {
  146. return ff.daysShort
  147. }
  148. // WeekdayWide returns the locales wide weekday given the 'weekday' provided
  149. func (ff *ff_GN) WeekdayWide(weekday time.Weekday) string {
  150. return ff.daysWide[weekday]
  151. }
  152. // WeekdaysWide returns the locales wide weekdays
  153. func (ff *ff_GN) WeekdaysWide() []string {
  154. return ff.daysWide
  155. }
  156. // Decimal returns the decimal point of number
  157. func (ff *ff_GN) Decimal() string {
  158. return ff.decimal
  159. }
  160. // Group returns the group of number
  161. func (ff *ff_GN) Group() string {
  162. return ff.group
  163. }
  164. // Group returns the minus sign of number
  165. func (ff *ff_GN) Minus() string {
  166. return ff.minus
  167. }
  168. // FmtNumber returns 'num' with digits/precision of 'v' for 'ff_GN' and handles both Whole and Real numbers based on 'v'
  169. func (ff *ff_GN) FmtNumber(num float64, v uint64) string {
  170. return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  171. }
  172. // FmtPercent returns 'num' with digits/precision of 'v' for 'ff_GN' and handles both Whole and Real numbers based on 'v'
  173. // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
  174. func (ff *ff_GN) FmtPercent(num float64, v uint64) string {
  175. return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  176. }
  177. // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ff_GN'
  178. func (ff *ff_GN) FmtCurrency(num float64, v uint64, currency currency.Type) string {
  179. s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  180. symbol := ff.currencies[currency]
  181. l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3
  182. count := 0
  183. inWhole := v == 0
  184. b := make([]byte, 0, l)
  185. for i := len(s) - 1; i >= 0; i-- {
  186. if s[i] == '.' {
  187. b = append(b, ff.decimal[0])
  188. inWhole = true
  189. continue
  190. }
  191. if inWhole {
  192. if count == 3 {
  193. for j := len(ff.group) - 1; j >= 0; j-- {
  194. b = append(b, ff.group[j])
  195. }
  196. count = 1
  197. } else {
  198. count++
  199. }
  200. }
  201. b = append(b, s[i])
  202. }
  203. if num < 0 {
  204. b = append(b, ff.minus[0])
  205. }
  206. // reverse
  207. for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
  208. b[i], b[j] = b[j], b[i]
  209. }
  210. if int(v) < 2 {
  211. if v == 0 {
  212. b = append(b, ff.decimal...)
  213. }
  214. for i := 0; i < 2-int(v); i++ {
  215. b = append(b, '0')
  216. }
  217. }
  218. b = append(b, ff.currencyPositiveSuffix...)
  219. b = append(b, symbol...)
  220. return string(b)
  221. }
  222. // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ff_GN'
  223. // in accounting notation.
  224. func (ff *ff_GN) FmtAccounting(num float64, v uint64, currency currency.Type) string {
  225. s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  226. symbol := ff.currencies[currency]
  227. l := len(s) + len(symbol) + 3 + 2*len(s[:len(s)-int(v)-1])/3
  228. count := 0
  229. inWhole := v == 0
  230. b := make([]byte, 0, l)
  231. for i := len(s) - 1; i >= 0; i-- {
  232. if s[i] == '.' {
  233. b = append(b, ff.decimal[0])
  234. inWhole = true
  235. continue
  236. }
  237. if inWhole {
  238. if count == 3 {
  239. for j := len(ff.group) - 1; j >= 0; j-- {
  240. b = append(b, ff.group[j])
  241. }
  242. count = 1
  243. } else {
  244. count++
  245. }
  246. }
  247. b = append(b, s[i])
  248. }
  249. if num < 0 {
  250. b = append(b, ff.minus[0])
  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, ff.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, ff.currencyNegativeSuffix...)
  266. b = append(b, symbol...)
  267. } else {
  268. b = append(b, ff.currencyPositiveSuffix...)
  269. b = append(b, symbol...)
  270. }
  271. return string(b)
  272. }
  273. // FmtDateShort returns the short date representation of 't' for 'ff_GN'
  274. func (ff *ff_GN) 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 'ff_GN'
  288. func (ff *ff_GN) 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, ff.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 'ff_GN'
  302. func (ff *ff_GN) 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, ff.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 'ff_GN'
  316. func (ff *ff_GN) FmtDateFull(t time.Time) string {
  317. b := make([]byte, 0, 32)
  318. b = append(b, ff.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, ff.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 'ff_GN'
  332. func (ff *ff_GN) 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, ff.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 'ff_GN'
  346. func (ff *ff_GN) 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, ff.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, ff.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 'ff_GN'
  365. func (ff *ff_GN) 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, ff.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, ff.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 'ff_GN'
  387. func (ff *ff_GN) 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, ff.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, ff.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 := ff.timezones[tz]; ok {
  406. b = append(b, btz...)
  407. } else {
  408. b = append(b, tz...)
  409. }
  410. return string(b)
  411. }