OSDN Git Service

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