OSDN Git Service

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