1 package ps_PK
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 ps_PK 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 currencyPositiveSuffix string
26 currencyNegativeSuffix 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 &ps_PK{
47 locale: "ps_PK",
48 pluralsCardinal: []locales.PluralRule{2, 6},
49 pluralsOrdinal: []locales.PluralRule{6},
50 pluralsRange: []locales.PluralRule{2, 6},
51 percent: "٪",
52 perMille: "؉",
53 timeSeparator: ":",
54 inifinity: "∞",
55 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", "Rs", "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", "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"},
56 currencyPositiveSuffix: " ",
57 currencyNegativeSuffix: " ",
58 monthsAbbreviated: []string{"", "جنوري", "فبروري", "مارچ", "اپریل", "مۍ", "جون", "جولای", "اګست", "سېپتمبر", "اکتوبر", "نومبر", "دسمبر"},
59 monthsNarrow: []string{"", "ج", "ف", "م", "ا", "م", "ج", "ج", "ا", "س", "ا", "ن", "د"},
60 monthsWide: []string{"", "جنوري", "فبروري", "مارچ", "اپریل", "مۍ", "جون", "جولای", "اګست", "سېپتمبر", "اکتوبر", "نومبر", "دسمبر"},
61 daysAbbreviated: []string{"يونۍ", "دونۍ", "درېنۍ", "څلرنۍ", "پينځنۍ", "جمعه", "اونۍ"},
62 daysNarrow: []string{"S", "M", "T", "W", "T", "F", "S"},
63 daysShort: []string{"يونۍ", "دونۍ", "درېنۍ", "څلرنۍ", "پينځنۍ", "جمعه", "اونۍ"},
64 daysWide: []string{"يونۍ", "دونۍ", "درېنۍ", "څلرنۍ", "پينځنۍ", "جمعه", "اونۍ"},
65 periodsAbbreviated: []string{"غ.م.", "غ.و."},
66 periodsNarrow: []string{"غ.م.", "غ.و."},
67 periodsWide: []string{"غ.م.", "غ.و."},
68 erasAbbreviated: []string{"له میلاد وړاندې", "م."},
69 erasNarrow: []string{"", ""},
70 erasWide: []string{"له میلاد څخه وړاندې", "له میلاد څخه وروسته"},
71 timezones: map[string]string{"ACDT": "آسترالوي مرکزي د ورځې روښانه وخت", "ACST": "آسترالوي مرکزي معياري وخت", "ACWDT": "آسترالوي مرکزي لوېديځ د ورځې روښانه وخت", "ACWST": "آسترالوي مرکزي لوېديځ معياري وخت", "ADT": "اتلانتیک د رڼا ورځے وخت", "AEDT": "آسترالوي ختيځ د ورځې روښانه وخت", "AEST": "آسترالوي ختيځ معياري وخت", "AKDT": "د الاسکا د ورځے روښانه کول", "AKST": "", "ARST": "ارجنټاین اوړي وخت", "ART": "ارجنټاین معیاری وخت", "AST": "", "AWDT": "د اسټرالیا لویدیځ د ورځے وخت", "AWST": "", "BOT": "بولیویا وخت", "BT": "بهوټان وخت", "CAT": "منځنی افريقا وخت", "CDT": "مرکزي رڼا ورځے وخت", "CHADT": "چاتام د ورځې روښانه وخت", "CHAST": "چاتام معياري وخت", "CLST": "چلی اوړي وخت", "CLT": "چلی معیاری وخت", "COST": "کولمبیا اوړي وخت", "COT": "کولمبیا معیاری وخت", "CST": "", "ChST": "چمارو معياري وخت", "EAT": "ختيځ افريقا وخت", "ECT": "د اکوادور وخت", "EDT": "ختيځ د رڼا ورځے وخت", "EST": "", "GFT": "د فرانسوي ګانا وخت", "GMT": "ګرينويچ معياري وخت", "GST": "خلیج معياري وخت", "GYT": "د ګوانانا وخت", "HADT": "هوایی الیوتین رڼا ورځے وخت", "HAST": "", "HAT": "د نوي فیلډلینډ رڼا ورځے وخت", "HECU": "کیوبا د رڼا ورځے وخت", "HEEG": "د ختیځ ګرینلینډ اوړي وخت", "HENOMX": "د شمال لویدیځ مکسیکو رڼا ورځے وخت", "HEOG": "لویدیځ ګرینلینډ اوړي وخت", "HEPM": "سینټ پییرا و ميکلين رڼا ورځے وخت", "HEPMX": "مکسیکن پیسفک رڼا ورځے وخت", "HKST": "هانګ کانګ اوړي وخت", "HKT": "هانګ کانګ معياري وخت", "HNCU": "", "HNEG": "د ختیځ ګرینلینډ معياري وخت", "HNNOMX": "", "HNOG": "لویدیځ ګرینلینډ معياري وخت", "HNPM": "", "HNPMX": "", "HNT": "", "IST": "هند معیاري وخت", "JDT": "جاپان د رڼا ورځے وخت", "JST": "", "LHDT": "رب هاو د ورځے د رڼا وخت", "LHST": "", "MDT": "د غره د رڼا ورځے وخت", "MESZ": "وسطي اروپايي د اوړي وخت", "MEZ": "د مرکزي اروپا معیاري وخت", "MST": "", "MYT": "ملائیشیا وخت", "NZDT": "د نیوزی لینڈ د ورځے د رڼا وخت", "NZST": "", "OESZ": "ختيځ اروپايي اوړي وخت", "OEZ": "ختيځ اروپايي معياري وخت", "PDT": "پیسفک د رڼا ورځے وخت", "PST": "", "SAST": "جنوبي افريقا معياري وخت", "SGT": "سنګاپور معیاري وخت", "SRT": "سورینام وخت", "TMST": "ترکمنستان اوړي وخت", "TMT": "ترکمنستان معياري وخت", "UYST": "یوروګوای اوړي وخت", "UYT": "یوروګوای معياري وخت", "VET": "وینزویلا وخت", "WARST": "لوېديځ ارجنټاين اوړي وخت", "WART": "لوېديځ ارجنټاين معياري وخت", "WAST": "د افریقا افریقا لویدیځ وخت", "WAT": "لویدیځ افریقایي معیاري وخت", "WESZ": "د لودیځے اورپا د اوړي وخت", "WEZ": "د لودیځے اروپا معیاري وخت", "WIB": "لویدیځ اندونیزیا وخت", "WIT": "اندونیزیا وخت", "WITA": "مرکزي ادونيزيا وخت", "∅∅∅": "ايزورس اوړي وخت"},
72 }
73 }
74
75
76 func (ps *ps_PK) Locale() string {
77 return ps.locale
78 }
79
80
81 func (ps *ps_PK) PluralsCardinal() []locales.PluralRule {
82 return ps.pluralsCardinal
83 }
84
85
86 func (ps *ps_PK) PluralsOrdinal() []locales.PluralRule {
87 return ps.pluralsOrdinal
88 }
89
90
91 func (ps *ps_PK) PluralsRange() []locales.PluralRule {
92 return ps.pluralsRange
93 }
94
95
96 func (ps *ps_PK) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
97
98 n := math.Abs(num)
99
100 if n == 1 {
101 return locales.PluralRuleOne
102 }
103
104 return locales.PluralRuleOther
105 }
106
107
108 func (ps *ps_PK) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
109 return locales.PluralRuleOther
110 }
111
112
113 func (ps *ps_PK) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
114
115 start := ps.CardinalPluralRule(num1, v1)
116 end := ps.CardinalPluralRule(num2, v2)
117
118 if start == locales.PluralRuleOne && end == locales.PluralRuleOne {
119 return locales.PluralRuleOne
120 } else if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
121 return locales.PluralRuleOther
122 }
123
124 return locales.PluralRuleOther
125
126 }
127
128
129 func (ps *ps_PK) MonthAbbreviated(month time.Month) string {
130 return ps.monthsAbbreviated[month]
131 }
132
133
134 func (ps *ps_PK) MonthsAbbreviated() []string {
135 return ps.monthsAbbreviated[1:]
136 }
137
138
139 func (ps *ps_PK) MonthNarrow(month time.Month) string {
140 return ps.monthsNarrow[month]
141 }
142
143
144 func (ps *ps_PK) MonthsNarrow() []string {
145 return ps.monthsNarrow[1:]
146 }
147
148
149 func (ps *ps_PK) MonthWide(month time.Month) string {
150 return ps.monthsWide[month]
151 }
152
153
154 func (ps *ps_PK) MonthsWide() []string {
155 return ps.monthsWide[1:]
156 }
157
158
159 func (ps *ps_PK) WeekdayAbbreviated(weekday time.Weekday) string {
160 return ps.daysAbbreviated[weekday]
161 }
162
163
164 func (ps *ps_PK) WeekdaysAbbreviated() []string {
165 return ps.daysAbbreviated
166 }
167
168
169 func (ps *ps_PK) WeekdayNarrow(weekday time.Weekday) string {
170 return ps.daysNarrow[weekday]
171 }
172
173
174 func (ps *ps_PK) WeekdaysNarrow() []string {
175 return ps.daysNarrow
176 }
177
178
179 func (ps *ps_PK) WeekdayShort(weekday time.Weekday) string {
180 return ps.daysShort[weekday]
181 }
182
183
184 func (ps *ps_PK) WeekdaysShort() []string {
185 return ps.daysShort
186 }
187
188
189 func (ps *ps_PK) WeekdayWide(weekday time.Weekday) string {
190 return ps.daysWide[weekday]
191 }
192
193
194 func (ps *ps_PK) WeekdaysWide() []string {
195 return ps.daysWide
196 }
197
198
199 func (ps *ps_PK) Decimal() string {
200 return ps.decimal
201 }
202
203
204 func (ps *ps_PK) Group() string {
205 return ps.group
206 }
207
208
209 func (ps *ps_PK) Minus() string {
210 return ps.minus
211 }
212
213
214 func (ps *ps_PK) FmtNumber(num float64, v uint64) string {
215
216 return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
217 }
218
219
220
221 func (ps *ps_PK) FmtPercent(num float64, v uint64) string {
222 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
223 l := len(s) + 2
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, ps.decimal[0])
230 continue
231 }
232
233 b = append(b, s[i])
234 }
235
236 if num < 0 {
237 b = append(b, ps.minus[0])
238 }
239
240
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
245 b = append(b, ps.percent...)
246
247 return string(b)
248 }
249
250
251 func (ps *ps_PK) FmtCurrency(num float64, v uint64, currency currency.Type) string {
252
253 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
254 symbol := ps.currencies[currency]
255 l := len(s) + len(symbol) + 2
256 count := 0
257 inWhole := v == 0
258 b := make([]byte, 0, l)
259
260 for i := len(s) - 1; i >= 0; i-- {
261
262 if s[i] == '.' {
263 b = append(b, ps.decimal[0])
264 inWhole = true
265 continue
266 }
267
268 if inWhole {
269 if count == 3 {
270 b = append(b, ps.group[0])
271 count = 1
272 } else {
273 count++
274 }
275 }
276
277 b = append(b, s[i])
278 }
279
280 if num < 0 {
281 b = append(b, ps.minus[0])
282 }
283
284
285 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
286 b[i], b[j] = b[j], b[i]
287 }
288
289 if int(v) < 2 {
290
291 if v == 0 {
292 b = append(b, ps.decimal...)
293 }
294
295 for i := 0; i < 2-int(v); i++ {
296 b = append(b, '0')
297 }
298 }
299
300 b = append(b, ps.currencyPositiveSuffix...)
301
302 b = append(b, symbol...)
303
304 return string(b)
305 }
306
307
308
309 func (ps *ps_PK) FmtAccounting(num float64, v uint64, currency currency.Type) string {
310
311 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
312 symbol := ps.currencies[currency]
313 l := len(s) + len(symbol) + 2
314 count := 0
315 inWhole := v == 0
316 b := make([]byte, 0, l)
317
318 for i := len(s) - 1; i >= 0; i-- {
319
320 if s[i] == '.' {
321 b = append(b, ps.decimal[0])
322 inWhole = true
323 continue
324 }
325
326 if inWhole {
327 if count == 3 {
328 b = append(b, ps.group[0])
329 count = 1
330 } else {
331 count++
332 }
333 }
334
335 b = append(b, s[i])
336 }
337
338 if num < 0 {
339
340 b = append(b, ps.minus[0])
341
342 }
343
344
345 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
346 b[i], b[j] = b[j], b[i]
347 }
348
349 if int(v) < 2 {
350
351 if v == 0 {
352 b = append(b, ps.decimal...)
353 }
354
355 for i := 0; i < 2-int(v); i++ {
356 b = append(b, '0')
357 }
358 }
359
360 if num < 0 {
361 b = append(b, ps.currencyNegativeSuffix...)
362 b = append(b, symbol...)
363 } else {
364
365 b = append(b, ps.currencyPositiveSuffix...)
366 b = append(b, symbol...)
367 }
368
369 return string(b)
370 }
371
372
373 func (ps *ps_PK) FmtDateShort(t time.Time) string {
374
375 b := make([]byte, 0, 32)
376
377 if t.Year() > 0 {
378 b = strconv.AppendInt(b, int64(t.Year()), 10)
379 } else {
380 b = strconv.AppendInt(b, int64(-t.Year()), 10)
381 }
382
383 b = append(b, []byte{0x2f}...)
384 b = strconv.AppendInt(b, int64(t.Month()), 10)
385 b = append(b, []byte{0x2f}...)
386 b = strconv.AppendInt(b, int64(t.Day()), 10)
387
388 return string(b)
389 }
390
391
392 func (ps *ps_PK) FmtDateMedium(t time.Time) string {
393
394 b := make([]byte, 0, 32)
395
396 if t.Year() > 0 {
397 b = strconv.AppendInt(b, int64(t.Year()), 10)
398 } else {
399 b = strconv.AppendInt(b, int64(-t.Year()), 10)
400 }
401
402 b = append(b, []byte{0x20}...)
403 b = append(b, ps.monthsAbbreviated[t.Month()]...)
404 b = append(b, []byte{0x20}...)
405 b = strconv.AppendInt(b, int64(t.Day()), 10)
406
407 return string(b)
408 }
409
410
411 func (ps *ps_PK) FmtDateLong(t time.Time) string {
412
413 b := make([]byte, 0, 32)
414
415 b = append(b, []byte{0xd8, 0xaf, 0x20}...)
416
417 if t.Year() > 0 {
418 b = strconv.AppendInt(b, int64(t.Year()), 10)
419 } else {
420 b = strconv.AppendInt(b, int64(-t.Year()), 10)
421 }
422
423 b = append(b, []byte{0x20, 0xd8, 0xaf, 0x20}...)
424 b = append(b, ps.monthsWide[t.Month()]...)
425 b = append(b, []byte{0x20}...)
426 b = strconv.AppendInt(b, int64(t.Day()), 10)
427
428 return string(b)
429 }
430
431
432 func (ps *ps_PK) FmtDateFull(t time.Time) string {
433
434 b := make([]byte, 0, 32)
435
436 b = append(b, ps.daysWide[t.Weekday()]...)
437 b = append(b, []byte{0x20, 0xd8, 0xaf, 0x20}...)
438
439 if t.Year() > 0 {
440 b = strconv.AppendInt(b, int64(t.Year()), 10)
441 } else {
442 b = strconv.AppendInt(b, int64(-t.Year()), 10)
443 }
444
445 b = append(b, []byte{0x20, 0xd8, 0xaf, 0x20}...)
446 b = append(b, ps.monthsWide[t.Month()]...)
447 b = append(b, []byte{0x20}...)
448 b = strconv.AppendInt(b, int64(t.Day()), 10)
449
450 return string(b)
451 }
452
453
454 func (ps *ps_PK) FmtTimeShort(t time.Time) string {
455
456 b := make([]byte, 0, 32)
457
458 h := t.Hour()
459
460 if h > 12 {
461 h -= 12
462 }
463
464 b = strconv.AppendInt(b, int64(h), 10)
465 b = append(b, ps.timeSeparator...)
466
467 if t.Minute() < 10 {
468 b = append(b, '0')
469 }
470
471 b = strconv.AppendInt(b, int64(t.Minute()), 10)
472 b = append(b, []byte{0x20}...)
473
474 if t.Hour() < 12 {
475 b = append(b, ps.periodsAbbreviated[0]...)
476 } else {
477 b = append(b, ps.periodsAbbreviated[1]...)
478 }
479
480 return string(b)
481 }
482
483
484 func (ps *ps_PK) FmtTimeMedium(t time.Time) string {
485
486 b := make([]byte, 0, 32)
487
488 h := t.Hour()
489
490 if h > 12 {
491 h -= 12
492 }
493
494 b = strconv.AppendInt(b, int64(h), 10)
495 b = append(b, ps.timeSeparator...)
496
497 if t.Minute() < 10 {
498 b = append(b, '0')
499 }
500
501 b = strconv.AppendInt(b, int64(t.Minute()), 10)
502 b = append(b, ps.timeSeparator...)
503
504 if t.Second() < 10 {
505 b = append(b, '0')
506 }
507
508 b = strconv.AppendInt(b, int64(t.Second()), 10)
509 b = append(b, []byte{0x20}...)
510
511 if t.Hour() < 12 {
512 b = append(b, ps.periodsAbbreviated[0]...)
513 } else {
514 b = append(b, ps.periodsAbbreviated[1]...)
515 }
516
517 return string(b)
518 }
519
520
521 func (ps *ps_PK) FmtTimeLong(t time.Time) string {
522
523 b := make([]byte, 0, 32)
524
525 h := t.Hour()
526
527 if h > 12 {
528 h -= 12
529 }
530
531 b = strconv.AppendInt(b, int64(h), 10)
532 b = append(b, ps.timeSeparator...)
533
534 if t.Minute() < 10 {
535 b = append(b, '0')
536 }
537
538 b = strconv.AppendInt(b, int64(t.Minute()), 10)
539 b = append(b, ps.timeSeparator...)
540
541 if t.Second() < 10 {
542 b = append(b, '0')
543 }
544
545 b = strconv.AppendInt(b, int64(t.Second()), 10)
546 b = append(b, []byte{0x20}...)
547
548 if t.Hour() < 12 {
549 b = append(b, ps.periodsAbbreviated[0]...)
550 } else {
551 b = append(b, ps.periodsAbbreviated[1]...)
552 }
553
554 b = append(b, []byte{0x20}...)
555
556 tz, _ := t.Zone()
557 b = append(b, tz...)
558
559 return string(b)
560 }
561
562
563 func (ps *ps_PK) FmtTimeFull(t time.Time) string {
564
565 b := make([]byte, 0, 32)
566
567 h := t.Hour()
568
569 if h > 12 {
570 h -= 12
571 }
572
573 b = strconv.AppendInt(b, int64(h), 10)
574 b = append(b, ps.timeSeparator...)
575
576 if t.Minute() < 10 {
577 b = append(b, '0')
578 }
579
580 b = strconv.AppendInt(b, int64(t.Minute()), 10)
581 b = append(b, ps.timeSeparator...)
582
583 if t.Second() < 10 {
584 b = append(b, '0')
585 }
586
587 b = strconv.AppendInt(b, int64(t.Second()), 10)
588 b = append(b, []byte{0x20}...)
589
590 if t.Hour() < 12 {
591 b = append(b, ps.periodsAbbreviated[0]...)
592 } else {
593 b = append(b, ps.periodsAbbreviated[1]...)
594 }
595
596 b = append(b, []byte{0x20}...)
597
598 tz, _ := t.Zone()
599
600 if btz, ok := ps.timezones[tz]; ok {
601 b = append(b, btz...)
602 } else {
603 b = append(b, tz...)
604 }
605
606 return string(b)
607 }
608
View as plain text