8 "github.com/go-playground/locales"
9 "github.com/go-playground/locales/currency"
14 pluralsCardinal []locales.PluralRule
15 pluralsOrdinal []locales.PluralRule
16 pluralsRange []locales.PluralRule
24 currencies []string // idx = enum of currency code
25 currencyPositivePrefix string
26 currencyNegativePrefix string
27 monthsAbbreviated []string
30 daysAbbreviated []string
34 periodsAbbreviated []string
35 periodsNarrow []string
38 erasAbbreviated []string
41 timezones map[string]string
44 // New returns a new instance of translator for the 'ks' locale
45 func New() locales.Translator {
48 pluralsCardinal: []locales.PluralRule{2, 6},
58 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", "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", "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"},
59 currencyPositivePrefix: " ",
60 currencyNegativePrefix: " ",
61 monthsNarrow: []string{"", "ج", "ف", "م", "ا", "م", "ج", "ج", "ا", "س", "س", "ا", "ن"},
62 monthsWide: []string{"", "جنؤری", "فرؤری", "مارٕچ", "اپریل", "میٔ", "جوٗن", "جوٗلایی", "اگست", "ستمبر", "اکتوٗبر", "نومبر", "دسمبر"},
63 daysAbbreviated: []string{"آتھوار", "ژٔنٛدٕروار", "بوٚموار", "بودوار", "برٛٮ۪سوار", "جُمہ", "بٹوار"},
64 daysNarrow: []string{"ا", "ژ", "ب", "ب", "ب", "ج", "ب"},
65 daysWide: []string{"اَتھوار", "ژٔنٛدرٕروار", "بوٚموار", "بودوار", "برٛٮ۪سوار", "جُمہ", "بٹوار"},
66 erasAbbreviated: []string{"بی سی", "اے ڈی"},
67 erasNarrow: []string{"", ""},
68 erasWide: []string{"قبٕل مسیٖح", "عیٖسوی سنہٕ"},
69 timezones: map[string]string{"HNCU": "کیوٗبا سٹینڑاڑ ٹایِم", "OEZ": "مشرقی یوٗرپی سٹینڑاڑ ٹایِم", "HNT": "نیوٗ فاونڑلینڑ سٹینڑاڑ ٹایِم", "ACDT": "آسٹریلِیَن مرکزی ڈےلایِٔٹ ٹایِم", "WIB": "مغرِبی اِنڑونیشِیا ٹایِم", "PST": "پیسِفِک سٹینڑاڑ ٹایِم", "HAST": "حَواے اٮ۪لیوٗٹِیَن سٹینڑاڑ ٹایِم", "AEST": "آسٹریلِیَن مشرقی سٹینڑاڑ ٹایِم", "AEDT": "آسٹریلِیَن مشرقی ڈےلایِٔٹ ٹایِم", "ACWDT": "آسٹریلِیَن مرکزی مغربی ڈےلایِٔٹ ٹایِم", "HEPM": "سینٛٹ پَیری مِقیوٗلَن ڑےلایِٔٹ ٹایِم", "SRT": "سُرِنام ٹایِم", "WIT": "مشرِقی اِنڑونیشِیا ٹایِم", "WART": "مغربی ارجٮ۪نٹیٖنا سٹینڑاڑ ٹایِم", "AST": "اٮ۪ٹلانٹِک سٹینڑاڑ ٹایِم", "HKT": "حانگ کانٛگ سٹینڑاڑ ٹایِم", "COT": "کولومبِیا سٹینڑاڑ ٹایِم", "HNPM": "سینٛٹ پَیری مِقیوٗلَن سٹینڑاڑ ٹایِم", "ECT": "اِکویڑَر ٹایِم", "CLT": "چِلی سٹینڑاڑ ٹایِم", "CLST": "چِلی سَمَر ٹایِم", "ACST": "آسٹریلِیَن مرکزی سٹینڑاڑ ٹایِم", "SGT": "سِنٛگاپوٗر ٹایِم", "ChST": "کٮ۪مورو سٹینڑاڑ ٹایِم", "MYT": "مَلیشِیا ٹایِم", "COST": "کولومبِیا سَمَر ٹایِم", "GFT": "فرٛٮ۪نٛچ گیوٗٮ۪نا ٹایِم", "EST": "مشرقی سٹینڑاڑ ٹایِم", "AKST": "اٮ۪لاسکا سٹینڑاڑ ٹایِم", "HADT": "حَواے اٮ۪لیوٗٹِیَن سَمَر ٹایِم", "MEZ": "مرکزی یوٗرپی سٹینڑاڑ ٹایِم", "MESZ": "مرکزی یوٗرپی سَمَر ٹایِم", "VET": "وٮ۪نٮ۪زیوٗلا ٹایِم", "WITA": "مرکزی اِنڑونیشِیا ٹایِم", "HKST": "حانٛگ کانٛگ سَمَر ٹایِم", "HEPMX": "HEPMX", "ACWST": "آسٹریلِیَن مرکزی مغربی سٹینڑاڑ ٹایِم", "WAT": "مغربی افریٖقا سٹینڑاڑ ٹایِم", "HAT": "نیوٗ فاونڑ لینڑ ڑےلایِٔٹ ٹایِم", "CAT": "مرکزی افریٖقا ٹایِم", "LHST": "لعاڑ حووے سٹینڑاڑ ٹایِم", "TMST": "تُرکمٮ۪نِستان سَمَر ٹایِم", "OESZ": "مشرقی یوٗرپی سَمَر ٹایِم", "HEOG": "مغرِبی گریٖن لینڑُک سَمَر ٹایِم", "GYT": "گُیَنا ٹایِم", "AKDT": "اٮ۪لاسکا ڈےلایِٔٹ ٹایِم", "CST": "مرکزی سٹینڑاڑ ٹایِم", "UYST": "یوٗرٮ۪گوَے سَمَر ٹایِم", "WARST": "مغربی ارجٮ۪نٹیٖنا سَمَر ٹایِم", "HENOMX": "HENOMX", "EDT": "مشرقی ڈےلایِٔٹ ٹایِم", "CDT": "مرکزی ڈےلایِٔٹ ٹایِم", "HNNOMX": "HNNOMX", "HNOG": "مغرِبی گریٖن لینڑُک سٹینڑاڑ ٹایِم", "WAST": "مغربی افریٖقا سَمَر ٹایِم", "NZST": "نِوزِلینڑ سٹینڑاڑ ٹایِم", "HECU": "کیوٗبا ڈےلایِٔٹ ٹایِم", "JDT": "جاپٲنۍ ڑےلایِٔٹ ٹایِم", "IST": "ہِنٛدوستان", "CHADT": "چٮ۪تھَم سَمَر ٹایِم", "MDT": "مَکَعوٗ سَمَر ٹایِم", "AWST": "آسٹریلِیَن مغرِبی سٹینڑاڑ ٹایِم", "TMT": "تُرکمٮ۪نِستان سٹینڑاڑ ٹایِم", "SAST": "جنوٗبی افریقا ٹایِم", "HNEG": "مشرِقی گریٖن لینڑُک سٹینڑاڑ ٹایِم", "MST": "مَکَعوٗ سٹینڑاڑ ٹایِم", "WESZ": "مغرِبی یوٗرِپی سَمَر ٹایِم", "GMT": "گرٛیٖن وِچ میٖن ٹایِم", "AWDT": "آسٹریلِیَن مغرِبیٖ ڈےلایٔٹ ٹایِم", "NZDT": "نِوزِلینڑ ڑےلایٔٹ ٹایِم", "JST": "جاپٲنۍ سٹینڑاڑ ٹایِم", "ADT": "اٮ۪ٹلانٹِک ڈےلایِٔٹ ٹایِم", "UYT": "یوٗرٮ۪گوَے سٹینڑاڑ ٹایِم", "∅∅∅": "برٮ۪سِلِیا سَمَر ٹایِم", "BOT": "بولِوِیا ٹایِم", "ARST": "ارجٮ۪نٹیٖنا سَمَر ٹایِم", "EAT": "مشرقی افریٖقا ٹایِم", "HEEG": "مشرِقی گریٖن لینڑُک سَمَر ٹایِم", "CHAST": "کٮ۪تھَم سٹینڑاڑ ٹایِم", "BT": "بوٗٹان ٹایِم", "LHDT": "لعاڑ ڑےلایٔٹ ٹایِم", "ART": "ارجٮ۪نٹیٖنا سٹینڑاڑ ٹایِم", "WEZ": "مغرِبی یوٗرپی سٹینڑاڑ ٹایِم", "HNPMX": "HNPMX", "PDT": "پیسِفِک ڈےلایِٔٹ ٹایِم"},
73 // Locale returns the current translators string locale
74 func (ks *ks) Locale() string {
78 // PluralsCardinal returns the list of cardinal plural rules associated with 'ks'
79 func (ks *ks) PluralsCardinal() []locales.PluralRule {
80 return ks.pluralsCardinal
83 // PluralsOrdinal returns the list of ordinal plural rules associated with 'ks'
84 func (ks *ks) PluralsOrdinal() []locales.PluralRule {
85 return ks.pluralsOrdinal
88 // PluralsRange returns the list of range plural rules associated with 'ks'
89 func (ks *ks) PluralsRange() []locales.PluralRule {
90 return ks.pluralsRange
93 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'ks'
94 func (ks *ks) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
99 return locales.PluralRuleOne
102 return locales.PluralRuleOther
105 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'ks'
106 func (ks *ks) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
107 return locales.PluralRuleUnknown
110 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'ks'
111 func (ks *ks) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
112 return locales.PluralRuleUnknown
115 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
116 func (ks *ks) MonthAbbreviated(month time.Month) string {
117 return ks.monthsAbbreviated[month]
120 // MonthsAbbreviated returns the locales abbreviated months
121 func (ks *ks) MonthsAbbreviated() []string {
125 // MonthNarrow returns the locales narrow month given the 'month' provided
126 func (ks *ks) MonthNarrow(month time.Month) string {
127 return ks.monthsNarrow[month]
130 // MonthsNarrow returns the locales narrow months
131 func (ks *ks) MonthsNarrow() []string {
132 return ks.monthsNarrow[1:]
135 // MonthWide returns the locales wide month given the 'month' provided
136 func (ks *ks) MonthWide(month time.Month) string {
137 return ks.monthsWide[month]
140 // MonthsWide returns the locales wide months
141 func (ks *ks) MonthsWide() []string {
142 return ks.monthsWide[1:]
145 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
146 func (ks *ks) WeekdayAbbreviated(weekday time.Weekday) string {
147 return ks.daysAbbreviated[weekday]
150 // WeekdaysAbbreviated returns the locales abbreviated weekdays
151 func (ks *ks) WeekdaysAbbreviated() []string {
152 return ks.daysAbbreviated
155 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
156 func (ks *ks) WeekdayNarrow(weekday time.Weekday) string {
157 return ks.daysNarrow[weekday]
160 // WeekdaysNarrow returns the locales narrow weekdays
161 func (ks *ks) WeekdaysNarrow() []string {
165 // WeekdayShort returns the locales short weekday given the 'weekday' provided
166 func (ks *ks) WeekdayShort(weekday time.Weekday) string {
167 return ks.daysShort[weekday]
170 // WeekdaysShort returns the locales short weekdays
171 func (ks *ks) WeekdaysShort() []string {
175 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
176 func (ks *ks) WeekdayWide(weekday time.Weekday) string {
177 return ks.daysWide[weekday]
180 // WeekdaysWide returns the locales wide weekdays
181 func (ks *ks) WeekdaysWide() []string {
185 // Decimal returns the decimal point of number
186 func (ks *ks) Decimal() string {
190 // Group returns the group of number
191 func (ks *ks) Group() string {
195 // Group returns the minus sign of number
196 func (ks *ks) Minus() string {
200 // FmtNumber returns 'num' with digits/precision of 'v' for 'ks' and handles both Whole and Real numbers based on 'v'
201 func (ks *ks) FmtNumber(num float64, v uint64) string {
203 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
204 l := len(s) + 5 + 1*len(s[:len(s)-int(v)-1])/3
210 b := make([]byte, 0, l)
212 for i := len(s) - 1; i >= 0; i-- {
215 b = append(b, ks.decimal[0])
222 if count == groupThreshold {
223 b = append(b, ks.group[0])
239 for j := len(ks.minus) - 1; j >= 0; j-- {
240 b = append(b, ks.minus[j])
245 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
246 b[i], b[j] = b[j], b[i]
252 // FmtPercent returns 'num' with digits/precision of 'v' for 'ks' and handles both Whole and Real numbers based on 'v'
253 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
254 func (ks *ks) FmtPercent(num float64, v uint64) string {
255 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
257 b := make([]byte, 0, l)
259 for i := len(s) - 1; i >= 0; i-- {
262 b = append(b, ks.decimal[0])
270 for j := len(ks.minus) - 1; j >= 0; j-- {
271 b = append(b, ks.minus[j])
276 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
277 b[i], b[j] = b[j], b[i]
280 b = append(b, ks.percent...)
285 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ks'
286 func (ks *ks) FmtCurrency(num float64, v uint64, currency currency.Type) string {
288 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
289 symbol := ks.currencies[currency]
290 l := len(s) + len(symbol) + 7 + 1*len(s[:len(s)-int(v)-1])/3
296 b := make([]byte, 0, l)
298 for i := len(s) - 1; i >= 0; i-- {
301 b = append(b, ks.decimal[0])
308 if count == groupThreshold {
309 b = append(b, ks.group[0])
324 for j := len(symbol) - 1; j >= 0; j-- {
325 b = append(b, symbol[j])
328 for j := len(ks.currencyPositivePrefix) - 1; j >= 0; j-- {
329 b = append(b, ks.currencyPositivePrefix[j])
333 for j := len(ks.minus) - 1; j >= 0; j-- {
334 b = append(b, ks.minus[j])
339 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
340 b[i], b[j] = b[j], b[i]
346 b = append(b, ks.decimal...)
349 for i := 0; i < 2-int(v); i++ {
357 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ks'
358 // in accounting notation.
359 func (ks *ks) FmtAccounting(num float64, v uint64, currency currency.Type) string {
361 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
362 symbol := ks.currencies[currency]
363 l := len(s) + len(symbol) + 7 + 1*len(s[:len(s)-int(v)-1])/3
369 b := make([]byte, 0, l)
371 for i := len(s) - 1; i >= 0; i-- {
374 b = append(b, ks.decimal[0])
381 if count == groupThreshold {
382 b = append(b, ks.group[0])
399 for j := len(symbol) - 1; j >= 0; j-- {
400 b = append(b, symbol[j])
403 for j := len(ks.currencyNegativePrefix) - 1; j >= 0; j-- {
404 b = append(b, ks.currencyNegativePrefix[j])
407 for j := len(ks.minus) - 1; j >= 0; j-- {
408 b = append(b, ks.minus[j])
413 for j := len(symbol) - 1; j >= 0; j-- {
414 b = append(b, symbol[j])
417 for j := len(ks.currencyPositivePrefix) - 1; j >= 0; j-- {
418 b = append(b, ks.currencyPositivePrefix[j])
424 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
425 b[i], b[j] = b[j], b[i]
431 b = append(b, ks.decimal...)
434 for i := 0; i < 2-int(v); i++ {
442 // FmtDateShort returns the short date representation of 't' for 'ks'
443 func (ks *ks) FmtDateShort(t time.Time) string {
445 b := make([]byte, 0, 32)
447 b = strconv.AppendInt(b, int64(t.Month()), 10)
448 b = append(b, []byte{0x2f}...)
449 b = strconv.AppendInt(b, int64(t.Day()), 10)
450 b = append(b, []byte{0x2f}...)
453 b = append(b, strconv.Itoa(t.Year())[2:]...)
455 b = append(b, strconv.Itoa(t.Year())[1:]...)
461 // FmtDateMedium returns the medium date representation of 't' for 'ks'
462 func (ks *ks) FmtDateMedium(t time.Time) string {
464 b := make([]byte, 0, 32)
466 b = append(b, ks.monthsAbbreviated[t.Month()]...)
467 b = append(b, []byte{0x20}...)
468 b = strconv.AppendInt(b, int64(t.Day()), 10)
469 b = append(b, []byte{0x2c, 0x20}...)
472 b = strconv.AppendInt(b, int64(t.Year()), 10)
474 b = strconv.AppendInt(b, int64(-t.Year()), 10)
480 // FmtDateLong returns the long date representation of 't' for 'ks'
481 func (ks *ks) FmtDateLong(t time.Time) string {
483 b := make([]byte, 0, 32)
485 b = append(b, ks.monthsWide[t.Month()]...)
486 b = append(b, []byte{0x20}...)
487 b = strconv.AppendInt(b, int64(t.Day()), 10)
488 b = append(b, []byte{0x2c, 0x20}...)
491 b = strconv.AppendInt(b, int64(t.Year()), 10)
493 b = strconv.AppendInt(b, int64(-t.Year()), 10)
499 // FmtDateFull returns the full date representation of 't' for 'ks'
500 func (ks *ks) FmtDateFull(t time.Time) string {
502 b := make([]byte, 0, 32)
504 b = append(b, ks.daysWide[t.Weekday()]...)
505 b = append(b, []byte{0x2c, 0x20}...)
506 b = append(b, ks.monthsWide[t.Month()]...)
507 b = append(b, []byte{0x20}...)
508 b = strconv.AppendInt(b, int64(t.Day()), 10)
509 b = append(b, []byte{0x2c, 0x20}...)
512 b = strconv.AppendInt(b, int64(t.Year()), 10)
514 b = strconv.AppendInt(b, int64(-t.Year()), 10)
520 // FmtTimeShort returns the short time representation of 't' for 'ks'
521 func (ks *ks) FmtTimeShort(t time.Time) string {
523 b := make([]byte, 0, 32)
531 b = strconv.AppendInt(b, int64(h), 10)
532 b = append(b, ks.timeSeparator...)
538 b = strconv.AppendInt(b, int64(t.Minute()), 10)
539 b = append(b, []byte{0x20}...)
542 b = append(b, ks.periodsAbbreviated[0]...)
544 b = append(b, ks.periodsAbbreviated[1]...)
550 // FmtTimeMedium returns the medium time representation of 't' for 'ks'
551 func (ks *ks) FmtTimeMedium(t time.Time) string {
553 b := make([]byte, 0, 32)
561 b = strconv.AppendInt(b, int64(h), 10)
562 b = append(b, ks.timeSeparator...)
568 b = strconv.AppendInt(b, int64(t.Minute()), 10)
569 b = append(b, ks.timeSeparator...)
575 b = strconv.AppendInt(b, int64(t.Second()), 10)
576 b = append(b, []byte{0x20}...)
579 b = append(b, ks.periodsAbbreviated[0]...)
581 b = append(b, ks.periodsAbbreviated[1]...)
587 // FmtTimeLong returns the long time representation of 't' for 'ks'
588 func (ks *ks) FmtTimeLong(t time.Time) string {
590 b := make([]byte, 0, 32)
598 b = strconv.AppendInt(b, int64(h), 10)
599 b = append(b, ks.timeSeparator...)
605 b = strconv.AppendInt(b, int64(t.Minute()), 10)
606 b = append(b, ks.timeSeparator...)
612 b = strconv.AppendInt(b, int64(t.Second()), 10)
613 b = append(b, []byte{0x20}...)
616 b = append(b, ks.periodsAbbreviated[0]...)
618 b = append(b, ks.periodsAbbreviated[1]...)
621 b = append(b, []byte{0x20}...)
629 // FmtTimeFull returns the full time representation of 't' for 'ks'
630 func (ks *ks) FmtTimeFull(t time.Time) string {
632 b := make([]byte, 0, 32)
640 b = strconv.AppendInt(b, int64(h), 10)
641 b = append(b, ks.timeSeparator...)
647 b = strconv.AppendInt(b, int64(t.Minute()), 10)
648 b = append(b, ks.timeSeparator...)
654 b = strconv.AppendInt(b, int64(t.Second()), 10)
655 b = append(b, []byte{0x20}...)
658 b = append(b, ks.periodsAbbreviated[0]...)
660 b = append(b, ks.periodsAbbreviated[1]...)
663 b = append(b, []byte{0x20}...)
667 if btz, ok := ks.timezones[tz]; ok {
668 b = append(b, btz...)