1 package sw_KE
2
3 import (
4 "math"
5 "strconv"
6 "time"
7
8 "github.com/go-playground/locales"
9 "github.com/go-playground/locales/currency"
10 )
11
12 type sw_KE struct {
13 locale string
14 pluralsCardinal []locales.PluralRule
15 pluralsOrdinal []locales.PluralRule
16 pluralsRange []locales.PluralRule
17 decimal string
18 group string
19 minus string
20 percent string
21 perMille string
22 timeSeparator string
23 inifinity string
24 currencies []string
25 currencyPositivePrefix string
26 currencyNegativePrefix string
27 monthsAbbreviated []string
28 monthsNarrow []string
29 monthsWide []string
30 daysAbbreviated []string
31 daysNarrow []string
32 daysShort []string
33 daysWide []string
34 periodsAbbreviated []string
35 periodsNarrow []string
36 periodsShort []string
37 periodsWide []string
38 erasAbbreviated []string
39 erasNarrow []string
40 erasWide []string
41 timezones map[string]string
42 }
43
44
45 func New() locales.Translator {
46 return &sw_KE{
47 locale: "sw_KE",
48 pluralsCardinal: []locales.PluralRule{2, 6},
49 pluralsOrdinal: []locales.PluralRule{6},
50 pluralsRange: []locales.PluralRule{2, 6},
51 decimal: ".",
52 group: ",",
53 minus: "-",
54 percent: "%",
55 perMille: "‰",
56 timeSeparator: ":",
57 inifinity: "∞",
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", "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", "MRU", "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", "$", "USN", "USS", "UYI", "UYP", "UYU", "UYW", "UZS", "VEB", "VEF", "VES", "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: " M",
60 currencyNegativePrefix: " M",
61 monthsAbbreviated: []string{"", "Jan", "Feb", "Mac", "Apr", "Mei", "Jun", "Jul", "Ago", "Sep", "Okt", "Nov", "Des"},
62 monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"},
63 monthsWide: []string{"", "Januari", "Februari", "Machi", "Aprili", "Mei", "Juni", "Julai", "Agosti", "Septemba", "Oktoba", "Novemba", "Desemba"},
64 daysAbbreviated: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"},
65 daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"},
66 daysShort: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"},
67 daysWide: []string{"Jumapili", "Jumatatu", "Jumanne", "Jumatano", "Alhamisi", "Ijumaa", "Jumamosi"},
68 periodsAbbreviated: []string{"AM", "PM"},
69 periodsNarrow: []string{"am", "pm"},
70 periodsWide: []string{"AM", "PM"},
71 erasAbbreviated: []string{"KK", "BK"},
72 erasNarrow: []string{"", ""},
73 erasWide: []string{"Kabla ya Kristo", "Baada ya Kristo"},
74 timezones: map[string]string{"ACDT": "Saa za Mchana za Australia ya Kati", "ACST": "Saa za Wastani za Australia ya Kati", "ACWDT": "Saa za Mchana za Magharibi mwa Australia ya Kati", "ACWST": "Saa za Wastani za Magharibi mwa Australia ya Kati", "ADT": "Saa za Mchana za Atlantiki", "AEDT": "Saa za Mchana za Mashariki mwa Australia", "AEST": "Saa za Wastani za Mashariki mwa Australia", "AKDT": "Saa za Mchana za Alaska", "AKST": "Saa za Wastani za Alaska", "ARST": "Saa za Majira Joto za Ajentina", "ART": "Saa za Wastani za Ajentina", "AST": "Saa za Wastani za Atlantiki", "AWDT": "Saa za Mchana za Australia Magharibi", "AWST": "Saa za Wastani za Australia Magharibi", "BOT": "Saa za Bolivia", "BT": "Saa za Butani", "CAT": "Saa za Afrika ya Kati", "CDT": "Saa za Mchana za Kati", "CHADT": "Saa za Mchana za Chatham", "CHAST": "Saa za Wastani za Chatham", "CLST": "Saa za Majira ya joto za Chile", "CLT": "Saa za Wastani za Chile", "COST": "Saa za Majira ya Joto za Kolombia", "COT": "Saa za Wastani za Kolombia", "CST": "Saa za Wastani za Kati", "ChST": "Saa za Wastani za Chamorro", "EAT": "Saa za Afrika Mashariki", "ECT": "Saa za Ekwado", "EDT": "Saa za Mchana za Mashariki", "EST": "Saa za Wastani za Mashariki", "GFT": "Saa za Guiana", "GMT": "Saa za Greenwich", "GST": "Saa za Wastani za Ghuba", "GYT": "Saa za Guyana", "HADT": "Saa za Mchana za Hawaii-Aleutian", "HAST": "Saa za Wastani za Hawaii-Aleutian", "HAT": "Saa za Mchana za Newfoundland", "HECU": "Saa za Mchana za Kuba", "HEEG": "Saa za Majira ya joto za Greenland Mashariki", "HENOMX": "Saa za Mchana za Kaskazini Magharibi mwa Meksiko", "HEOG": "Saa za Majira ya joto za Greenland Magharibi", "HEPM": "Saa za Mchana za Saint-Pierre na Miquelon", "HEPMX": "Saa za mchana za pasifiki za Mexico", "HKST": "Saa za Majira ya joto za Hong Kong", "HKT": "Saa za Wastani za Hong Kong", "HNCU": "Saa za Wastani za Kuba", "HNEG": "Saa za Wastani za Greenland Mashariki", "HNNOMX": "Saa za Wastani za Kaskazini Magharibi mwa Meksiko", "HNOG": "Saa za Wastani za Greenland Magharibi", "HNPM": "Saa za Wastani ya Saint-Pierre na Miquelon", "HNPMX": "Saa za wastani za pasifiki za Mexico", "HNT": "Saa za Wastani za Newfoundland", "IST": "Saa za Wastani za India", "JDT": "Saa za Mchana za Japani", "JST": "Saa za Wastani za Japani", "LHDT": "Saa za Mchana za Lord Howe", "LHST": "Saa za Wastani za Lord Howe", "MDT": "Saa za Mchana za Mountain", "MESZ": "Saa za Majira ya joto za Ulaya ya Kati", "MEZ": "Saa za Wastani za Ulaya ya kati", "MST": "Saa za Wastani za Mountain", "MYT": "Saa za Malesia", "NZDT": "Saa za Mchana za Nyuzilandi", "NZST": "Saa za Wastani za Nyuzilandi", "OESZ": "Saa za Majira ya joto za Mashariki mwa Ulaya", "OEZ": "Saa za Wastani za Mashariki mwa Ulaya", "PDT": "Saa za Mchana za Pasifiki", "PST": "Saa za Wastani za Pasifiki", "SAST": "Saa za Wastani za Afrika Kusini", "SGT": "Saa za Wastani za Singapoo", "SRT": "Saa za Suriname", "TMST": "Saa za Majira ya Joto za Turkmenistani", "TMT": "Saa za Wastani za Turkmenistani", "UYST": "Saa za Majira ya Joto za Urugwai", "UYT": "Saa za Wastani za Urugwai", "VET": "Saa za Venezuela", "WARST": "Saa za Majira ya Joto za Magharibi mwa Ajentina", "WART": "Saa za Wastani za Magharibi mwa Ajentina", "WAST": "Saa za Majira ya joto za Afrika Magharibi", "WAT": "Saa za Wastani za Afrika Magharibi", "WESZ": "Saa za Majira ya joto za Magharibi mwa Ulaya", "WEZ": "Saa za Wastani za Magharibi mwa Ulaya", "WIB": "Saa za Magharibi mwa Indonesia", "WIT": "Saa za Mashariki mwa Indonesia", "WITA": "Saa za Indonesia ya Kati", "∅∅∅": "Saa za Majira ya Joto za Brazili"},
75 }
76 }
77
78
79 func (sw *sw_KE) Locale() string {
80 return sw.locale
81 }
82
83
84 func (sw *sw_KE) PluralsCardinal() []locales.PluralRule {
85 return sw.pluralsCardinal
86 }
87
88
89 func (sw *sw_KE) PluralsOrdinal() []locales.PluralRule {
90 return sw.pluralsOrdinal
91 }
92
93
94 func (sw *sw_KE) PluralsRange() []locales.PluralRule {
95 return sw.pluralsRange
96 }
97
98
99 func (sw *sw_KE) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
100
101 n := math.Abs(num)
102 i := int64(n)
103
104 if i == 1 && v == 0 {
105 return locales.PluralRuleOne
106 }
107
108 return locales.PluralRuleOther
109 }
110
111
112 func (sw *sw_KE) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
113 return locales.PluralRuleOther
114 }
115
116
117 func (sw *sw_KE) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
118
119 start := sw.CardinalPluralRule(num1, v1)
120 end := sw.CardinalPluralRule(num2, v2)
121
122 if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
123 return locales.PluralRuleOther
124 } else if start == locales.PluralRuleOther && end == locales.PluralRuleOne {
125 return locales.PluralRuleOne
126 }
127
128 return locales.PluralRuleOther
129
130 }
131
132
133 func (sw *sw_KE) MonthAbbreviated(month time.Month) string {
134 return sw.monthsAbbreviated[month]
135 }
136
137
138 func (sw *sw_KE) MonthsAbbreviated() []string {
139 return sw.monthsAbbreviated[1:]
140 }
141
142
143 func (sw *sw_KE) MonthNarrow(month time.Month) string {
144 return sw.monthsNarrow[month]
145 }
146
147
148 func (sw *sw_KE) MonthsNarrow() []string {
149 return sw.monthsNarrow[1:]
150 }
151
152
153 func (sw *sw_KE) MonthWide(month time.Month) string {
154 return sw.monthsWide[month]
155 }
156
157
158 func (sw *sw_KE) MonthsWide() []string {
159 return sw.monthsWide[1:]
160 }
161
162
163 func (sw *sw_KE) WeekdayAbbreviated(weekday time.Weekday) string {
164 return sw.daysAbbreviated[weekday]
165 }
166
167
168 func (sw *sw_KE) WeekdaysAbbreviated() []string {
169 return sw.daysAbbreviated
170 }
171
172
173 func (sw *sw_KE) WeekdayNarrow(weekday time.Weekday) string {
174 return sw.daysNarrow[weekday]
175 }
176
177
178 func (sw *sw_KE) WeekdaysNarrow() []string {
179 return sw.daysNarrow
180 }
181
182
183 func (sw *sw_KE) WeekdayShort(weekday time.Weekday) string {
184 return sw.daysShort[weekday]
185 }
186
187
188 func (sw *sw_KE) WeekdaysShort() []string {
189 return sw.daysShort
190 }
191
192
193 func (sw *sw_KE) WeekdayWide(weekday time.Weekday) string {
194 return sw.daysWide[weekday]
195 }
196
197
198 func (sw *sw_KE) WeekdaysWide() []string {
199 return sw.daysWide
200 }
201
202
203 func (sw *sw_KE) Decimal() string {
204 return sw.decimal
205 }
206
207
208 func (sw *sw_KE) Group() string {
209 return sw.group
210 }
211
212
213 func (sw *sw_KE) Minus() string {
214 return sw.minus
215 }
216
217
218 func (sw *sw_KE) FmtNumber(num float64, v uint64) string {
219
220 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
221 l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3
222 count := 0
223 inWhole := v == 0
224 b := make([]byte, 0, l)
225
226 for i := len(s) - 1; i >= 0; i-- {
227
228 if s[i] == '.' {
229 b = append(b, sw.decimal[0])
230 inWhole = true
231 continue
232 }
233
234 if inWhole {
235 if count == 3 {
236 b = append(b, sw.group[0])
237 count = 1
238 } else {
239 count++
240 }
241 }
242
243 b = append(b, s[i])
244 }
245
246 if num < 0 {
247 b = append(b, sw.minus[0])
248 }
249
250
251 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
252 b[i], b[j] = b[j], b[i]
253 }
254
255 return string(b)
256 }
257
258
259
260 func (sw *sw_KE) FmtPercent(num float64, v uint64) string {
261 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
262 l := len(s) + 3
263 b := make([]byte, 0, l)
264
265 for i := len(s) - 1; i >= 0; i-- {
266
267 if s[i] == '.' {
268 b = append(b, sw.decimal[0])
269 continue
270 }
271
272 b = append(b, s[i])
273 }
274
275 if num < 0 {
276 b = append(b, sw.minus[0])
277 }
278
279
280 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
281 b[i], b[j] = b[j], b[i]
282 }
283
284 b = append(b, sw.percent...)
285
286 return string(b)
287 }
288
289
290 func (sw *sw_KE) FmtCurrency(num float64, v uint64, currency currency.Type) string {
291
292 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
293 symbol := sw.currencies[currency]
294 l := len(s) + len(symbol) + 5
295
296 b := make([]byte, 0, l)
297
298 for i := len(s) - 1; i >= 0; i-- {
299
300 if s[i] == '.' {
301 b = append(b, sw.decimal[0])
302 continue
303 }
304
305 b = append(b, s[i])
306 }
307
308 for j := len(symbol) - 1; j >= 0; j-- {
309 b = append(b, symbol[j])
310 }
311
312 for j := len(sw.currencyPositivePrefix) - 1; j >= 0; j-- {
313 b = append(b, sw.currencyPositivePrefix[j])
314 }
315
316 if num < 0 {
317 b = append(b, sw.minus[0])
318 }
319
320
321 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
322 b[i], b[j] = b[j], b[i]
323 }
324
325 return string(b)
326 }
327
328
329
330 func (sw *sw_KE) FmtAccounting(num float64, v uint64, currency currency.Type) string {
331
332 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
333 symbol := sw.currencies[currency]
334 l := len(s) + len(symbol) + 5
335
336 b := make([]byte, 0, l)
337
338 for i := len(s) - 1; i >= 0; i-- {
339
340 if s[i] == '.' {
341 b = append(b, sw.decimal[0])
342 continue
343 }
344
345 b = append(b, s[i])
346 }
347
348 if num < 0 {
349
350 for j := len(symbol) - 1; j >= 0; j-- {
351 b = append(b, symbol[j])
352 }
353
354 for j := len(sw.currencyNegativePrefix) - 1; j >= 0; j-- {
355 b = append(b, sw.currencyNegativePrefix[j])
356 }
357
358 b = append(b, sw.minus[0])
359
360 } else {
361
362 for j := len(symbol) - 1; j >= 0; j-- {
363 b = append(b, symbol[j])
364 }
365
366 for j := len(sw.currencyPositivePrefix) - 1; j >= 0; j-- {
367 b = append(b, sw.currencyPositivePrefix[j])
368 }
369
370 }
371
372
373 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
374 b[i], b[j] = b[j], b[i]
375 }
376
377 return string(b)
378 }
379
380
381 func (sw *sw_KE) FmtDateShort(t time.Time) string {
382
383 b := make([]byte, 0, 32)
384
385 if t.Day() < 10 {
386 b = append(b, '0')
387 }
388
389 b = strconv.AppendInt(b, int64(t.Day()), 10)
390 b = append(b, []byte{0x2f}...)
391
392 if t.Month() < 10 {
393 b = append(b, '0')
394 }
395
396 b = strconv.AppendInt(b, int64(t.Month()), 10)
397
398 b = append(b, []byte{0x2f}...)
399
400 if t.Year() > 0 {
401 b = strconv.AppendInt(b, int64(t.Year()), 10)
402 } else {
403 b = strconv.AppendInt(b, int64(-t.Year()), 10)
404 }
405
406 return string(b)
407 }
408
409
410 func (sw *sw_KE) FmtDateMedium(t time.Time) string {
411
412 b := make([]byte, 0, 32)
413
414 b = strconv.AppendInt(b, int64(t.Day()), 10)
415 b = append(b, []byte{0x20}...)
416 b = append(b, sw.monthsAbbreviated[t.Month()]...)
417 b = append(b, []byte{0x20}...)
418
419 if t.Year() > 0 {
420 b = strconv.AppendInt(b, int64(t.Year()), 10)
421 } else {
422 b = strconv.AppendInt(b, int64(-t.Year()), 10)
423 }
424
425 return string(b)
426 }
427
428
429 func (sw *sw_KE) FmtDateLong(t time.Time) string {
430
431 b := make([]byte, 0, 32)
432
433 b = strconv.AppendInt(b, int64(t.Day()), 10)
434 b = append(b, []byte{0x20}...)
435 b = append(b, sw.monthsWide[t.Month()]...)
436 b = append(b, []byte{0x20}...)
437
438 if t.Year() > 0 {
439 b = strconv.AppendInt(b, int64(t.Year()), 10)
440 } else {
441 b = strconv.AppendInt(b, int64(-t.Year()), 10)
442 }
443
444 return string(b)
445 }
446
447
448 func (sw *sw_KE) FmtDateFull(t time.Time) string {
449
450 b := make([]byte, 0, 32)
451
452 b = append(b, sw.daysWide[t.Weekday()]...)
453 b = append(b, []byte{0x2c, 0x20}...)
454 b = strconv.AppendInt(b, int64(t.Day()), 10)
455 b = append(b, []byte{0x20}...)
456 b = append(b, sw.monthsWide[t.Month()]...)
457 b = append(b, []byte{0x20}...)
458
459 if t.Year() > 0 {
460 b = strconv.AppendInt(b, int64(t.Year()), 10)
461 } else {
462 b = strconv.AppendInt(b, int64(-t.Year()), 10)
463 }
464
465 return string(b)
466 }
467
468
469 func (sw *sw_KE) FmtTimeShort(t time.Time) string {
470
471 b := make([]byte, 0, 32)
472
473 if t.Hour() < 10 {
474 b = append(b, '0')
475 }
476
477 b = strconv.AppendInt(b, int64(t.Hour()), 10)
478 b = append(b, sw.timeSeparator...)
479
480 if t.Minute() < 10 {
481 b = append(b, '0')
482 }
483
484 b = strconv.AppendInt(b, int64(t.Minute()), 10)
485
486 return string(b)
487 }
488
489
490 func (sw *sw_KE) FmtTimeMedium(t time.Time) string {
491
492 b := make([]byte, 0, 32)
493
494 if t.Hour() < 10 {
495 b = append(b, '0')
496 }
497
498 b = strconv.AppendInt(b, int64(t.Hour()), 10)
499 b = append(b, sw.timeSeparator...)
500
501 if t.Minute() < 10 {
502 b = append(b, '0')
503 }
504
505 b = strconv.AppendInt(b, int64(t.Minute()), 10)
506 b = append(b, sw.timeSeparator...)
507
508 if t.Second() < 10 {
509 b = append(b, '0')
510 }
511
512 b = strconv.AppendInt(b, int64(t.Second()), 10)
513
514 return string(b)
515 }
516
517
518 func (sw *sw_KE) FmtTimeLong(t time.Time) string {
519
520 b := make([]byte, 0, 32)
521
522 if t.Hour() < 10 {
523 b = append(b, '0')
524 }
525
526 b = strconv.AppendInt(b, int64(t.Hour()), 10)
527 b = append(b, sw.timeSeparator...)
528
529 if t.Minute() < 10 {
530 b = append(b, '0')
531 }
532
533 b = strconv.AppendInt(b, int64(t.Minute()), 10)
534 b = append(b, sw.timeSeparator...)
535
536 if t.Second() < 10 {
537 b = append(b, '0')
538 }
539
540 b = strconv.AppendInt(b, int64(t.Second()), 10)
541 b = append(b, []byte{0x20}...)
542
543 tz, _ := t.Zone()
544 b = append(b, tz...)
545
546 return string(b)
547 }
548
549
550 func (sw *sw_KE) FmtTimeFull(t time.Time) string {
551
552 b := make([]byte, 0, 32)
553
554 if t.Hour() < 10 {
555 b = append(b, '0')
556 }
557
558 b = strconv.AppendInt(b, int64(t.Hour()), 10)
559 b = append(b, sw.timeSeparator...)
560
561 if t.Minute() < 10 {
562 b = append(b, '0')
563 }
564
565 b = strconv.AppendInt(b, int64(t.Minute()), 10)
566 b = append(b, sw.timeSeparator...)
567
568 if t.Second() < 10 {
569 b = append(b, '0')
570 }
571
572 b = strconv.AppendInt(b, int64(t.Second()), 10)
573 b = append(b, []byte{0x20}...)
574
575 tz, _ := t.Zone()
576
577 if btz, ok := sw.timezones[tz]; ok {
578 b = append(b, btz...)
579 } else {
580 b = append(b, tz...)
581 }
582
583 return string(b)
584 }
585
View as plain text