OSDN Git Service

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