OSDN Git Service

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