OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / go-playground / locales / eu / eu.go
1 package eu
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 eu 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         percentPrefix          string
22         perMille               string
23         timeSeparator          string
24         inifinity              string
25         currencies             []string // idx = enum of currency code
26         currencyPositiveSuffix string
27         currencyNegativePrefix string
28         currencyNegativeSuffix string
29         monthsAbbreviated      []string
30         monthsNarrow           []string
31         monthsWide             []string
32         daysAbbreviated        []string
33         daysNarrow             []string
34         daysShort              []string
35         daysWide               []string
36         periodsAbbreviated     []string
37         periodsNarrow          []string
38         periodsShort           []string
39         periodsWide            []string
40         erasAbbreviated        []string
41         erasNarrow             []string
42         erasWide               []string
43         timezones              map[string]string
44 }
45
46 // New returns a new instance of translator for the 'eu' locale
47 func New() locales.Translator {
48         return &eu{
49                 locale:                 "eu",
50                 pluralsCardinal:        []locales.PluralRule{2, 6},
51                 pluralsOrdinal:         []locales.PluralRule{6},
52                 pluralsRange:           []locales.PluralRule{6},
53                 decimal:                ",",
54                 group:                  ".",
55                 minus:                  "-",
56                 percent:                "%",
57                 perMille:               "‰",
58                 timeSeparator:          ":",
59                 inifinity:              "∞",
60                 currencies:             []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "A$", "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", "R$", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CA$", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "₧", "ETB", "€", "FIM", "FJD", "FKP", "FRF", "£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HK$", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "₪", "₹", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JP¥", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "₩", "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", "MX$", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZ$", "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", "฿", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "NT$", "TZS", "UAH", "UAK", "UGS", "UGX", "US$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "₫", "VNN", "VUV", "WST", "FCFA", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "EC$", "XDR", "XEU", "XFO", "XFU", "CFA", "XPD", "CFPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"},
61                 percentPrefix:          " ",
62                 currencyPositiveSuffix: " ",
63                 currencyNegativePrefix: "(",
64                 currencyNegativeSuffix: " )",
65                 monthsAbbreviated:      []string{"", "urt.", "ots.", "mar.", "api.", "mai.", "eka.", "uzt.", "abu.", "ira.", "urr.", "aza.", "abe."},
66                 monthsNarrow:           []string{"", "U", "O", "M", "A", "M", "E", "U", "A", "I", "U", "A", "A"},
67                 monthsWide:             []string{"", "urtarrila", "otsaila", "martxoa", "apirila", "maiatza", "ekaina", "uztaila", "abuztua", "iraila", "urria", "azaroa", "abendua"},
68                 daysAbbreviated:        []string{"ig.", "al.", "ar.", "az.", "og.", "or.", "lr."},
69                 daysNarrow:             []string{"I", "A", "A", "A", "O", "O", "L"},
70                 daysShort:              []string{"ig.", "al.", "ar.", "az.", "og.", "or.", "lr."},
71                 daysWide:               []string{"igandea", "astelehena", "asteartea", "asteazkena", "osteguna", "ostirala", "larunbata"},
72                 periodsAbbreviated:     []string{"AM", "PM"},
73                 periodsWide:            []string{"AM", "PM"},
74                 erasAbbreviated:        []string{"K.a.", "K.o."},
75                 erasNarrow:             []string{"", ""},
76                 erasWide:               []string{"K.a.", "Kristo ondoren"},
77                 timezones:              map[string]string{"CHADT": "Chathamgo udako ordua", "HNNOMX": "Mexikoko ipar-ekialdeko ordutegi estandarra", "LHST": "Lord Howeko ordu estandarra", "ARST": "Argentinako udako ordutegia", "EDT": "Ipar Amerikako ekialdeko udako ordutegia", "HEEG": "Groenlandia ekialdeko udako ordutegia", "HNT": "Ternuako ordutegi estandarra", "COST": "Kolonbiako udako ordua", "AST": "Atlantikoko ordutegi estandarra", "HNEG": "Groenlandia ekialdeko ordutegi estandarra", "HKT": "Hong Kongo ordu estandarra", "ECT": "Ekuadorreko ordua", "CHAST": "Chathamgo ordu estandarra", "HNPM": "Saint-Pierre eta Mikeluneko ordutegi estandarra", "MEZ": "Europa erdialdeko ordu estandarra", "WITA": "Indonesia erdialdeko ordua", "ART": "Argentinako ordutegi estandarra", "HEOG": "Groenlandia mendebaldeko udako ordutegia", "CLT": "Txileko ordu estandarra", "CST": "Ipar Amerikako erdialdeko ordu estandarra", "SRT": "Surinamgo ordua", "ACWST": "Australia erdi-mendebaldeko ordu estandarra", "NZDT": "Zeelanda Berriko udako ordua", "TMT": "Turkmenistango ordu estandarra", "ADT": "Atlantikoko udako ordutegia", "WAT": "Afrika mendebaldeko ordu estandarra", "OEZ": "Europa ekialdeko ordu estandarra", "BT": "Bhutango ordua", "JST": "Japoniako ordu estandarra", "ACDT": "Australia erdialdeko udako ordua", "BOT": "Boliviako ordutegia", "UYST": "Uruguayko udako ordua", "HKST": "Hong Kongo udako ordua", "EST": "Ipar Amerikako ekialdeko ordutegi estandarra", "MDT": "MDT", "MESZ": "Europa erdialdeko udako ordua", "EAT": "Afrika ekialdeko ordua", "AKST": "Alaskako ordutegi estandarra", "PDT": "Ipar Amerikako Pazifikoko udako ordutegia", "MYT": "Malaysiako ordua", "WARST": "Argentina mendebaldeko udako ordutegia", "COT": "Kolonbiako ordu estandarra", "HNPMX": "Mexikoko Pazifikoko ordutegi estandarra", "AWDT": "Australia mendebaldeko udako ordua", "GFT": "Guyana Frantseseko ordua", "GMT": "Greenwich meridianoko ordua", "AEST": "Australia ekialdeko ordu estandarra", "LHDT": "Lord Howeko udako ordua", "HEPM": "Saint-Pierre eta Mikeluneko udako ordutegia", "CDT": "Ipar Amerikako erdialdeko udako ordutegia", "NZST": "Zeelanda Berriko ordu estandarra", "TMST": "Turkmenistango udako ordua", "IST": "Indiako ordua", "AEDT": "Australia ekialdeko udako ordua", "HAT": "Ternuako udako ordutegia", "GYT": "Guyanako ordua", "AKDT": "Alaskako udako ordutegia", "ACST": "Australia erdialdeko ordu estandarra", "SGT": "Singapurreko ordu estandarra", "PST": "Ipar Amerikako Pazifikoko ordutegi estandarra", "HNOG": "Groenlandia mendebaldeko ordutegi estandarra", "WAST": "Afrika mendebaldeko udako ordua", "VET": "Venezuelako ordua", "HAST": "Hawaii-Aleutiar uharteetako ordutegi estandarra", "JDT": "Japoniako udako ordua", "OESZ": "Europa ekialdeko udako ordua", "∅∅∅": "Azoreetako udako ordua", "ACWDT": "Australia erdi-mendebaldeko udako ordua", "WESZ": "Europa mendebaldeko udako ordua", "ChST": "Chamorroko ordu estandarra", "WIT": "Indonesia ekialdeko ordua", "HADT": "Hawaii-Aleutiar uharteetako udako ordutegia", "WART": "Argentina mendebaldeko ordutegia estandarra", "SAST": "Afrika hegoaldeko ordua", "CAT": "Afrika erdialdeko ordua", "HNCU": "Kubako ordutegi estandarra", "HECU": "Kubako udako ordutegia", "MST": "MST", "AWST": "Australia mendebaldeko ordu estandarra", "UYT": "Uruguayko ordu estandarra", "HENOMX": "Mexikoko ipar-ekialdeko udako ordutegia", "HEPMX": "Mexikoko Pazifikoko udako ordutegia", "WIB": "Indonesia mendebaldeko ordua", "CLST": "Txileko udako ordua", "WEZ": "Europa mendebaldeko ordu estandarra"},
78         }
79 }
80
81 // Locale returns the current translators string locale
82 func (eu *eu) Locale() string {
83         return eu.locale
84 }
85
86 // PluralsCardinal returns the list of cardinal plural rules associated with 'eu'
87 func (eu *eu) PluralsCardinal() []locales.PluralRule {
88         return eu.pluralsCardinal
89 }
90
91 // PluralsOrdinal returns the list of ordinal plural rules associated with 'eu'
92 func (eu *eu) PluralsOrdinal() []locales.PluralRule {
93         return eu.pluralsOrdinal
94 }
95
96 // PluralsRange returns the list of range plural rules associated with 'eu'
97 func (eu *eu) PluralsRange() []locales.PluralRule {
98         return eu.pluralsRange
99 }
100
101 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'eu'
102 func (eu *eu) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
103
104         n := math.Abs(num)
105
106         if n == 1 {
107                 return locales.PluralRuleOne
108         }
109
110         return locales.PluralRuleOther
111 }
112
113 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'eu'
114 func (eu *eu) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
115         return locales.PluralRuleOther
116 }
117
118 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'eu'
119 func (eu *eu) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
120         return locales.PluralRuleOther
121 }
122
123 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
124 func (eu *eu) MonthAbbreviated(month time.Month) string {
125         return eu.monthsAbbreviated[month]
126 }
127
128 // MonthsAbbreviated returns the locales abbreviated months
129 func (eu *eu) MonthsAbbreviated() []string {
130         return eu.monthsAbbreviated[1:]
131 }
132
133 // MonthNarrow returns the locales narrow month given the 'month' provided
134 func (eu *eu) MonthNarrow(month time.Month) string {
135         return eu.monthsNarrow[month]
136 }
137
138 // MonthsNarrow returns the locales narrow months
139 func (eu *eu) MonthsNarrow() []string {
140         return eu.monthsNarrow[1:]
141 }
142
143 // MonthWide returns the locales wide month given the 'month' provided
144 func (eu *eu) MonthWide(month time.Month) string {
145         return eu.monthsWide[month]
146 }
147
148 // MonthsWide returns the locales wide months
149 func (eu *eu) MonthsWide() []string {
150         return eu.monthsWide[1:]
151 }
152
153 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
154 func (eu *eu) WeekdayAbbreviated(weekday time.Weekday) string {
155         return eu.daysAbbreviated[weekday]
156 }
157
158 // WeekdaysAbbreviated returns the locales abbreviated weekdays
159 func (eu *eu) WeekdaysAbbreviated() []string {
160         return eu.daysAbbreviated
161 }
162
163 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
164 func (eu *eu) WeekdayNarrow(weekday time.Weekday) string {
165         return eu.daysNarrow[weekday]
166 }
167
168 // WeekdaysNarrow returns the locales narrow weekdays
169 func (eu *eu) WeekdaysNarrow() []string {
170         return eu.daysNarrow
171 }
172
173 // WeekdayShort returns the locales short weekday given the 'weekday' provided
174 func (eu *eu) WeekdayShort(weekday time.Weekday) string {
175         return eu.daysShort[weekday]
176 }
177
178 // WeekdaysShort returns the locales short weekdays
179 func (eu *eu) WeekdaysShort() []string {
180         return eu.daysShort
181 }
182
183 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
184 func (eu *eu) WeekdayWide(weekday time.Weekday) string {
185         return eu.daysWide[weekday]
186 }
187
188 // WeekdaysWide returns the locales wide weekdays
189 func (eu *eu) WeekdaysWide() []string {
190         return eu.daysWide
191 }
192
193 // Decimal returns the decimal point of number
194 func (eu *eu) Decimal() string {
195         return eu.decimal
196 }
197
198 // Group returns the group of number
199 func (eu *eu) Group() string {
200         return eu.group
201 }
202
203 // Group returns the minus sign of number
204 func (eu *eu) Minus() string {
205         return eu.minus
206 }
207
208 // FmtNumber returns 'num' with digits/precision of 'v' for 'eu' and handles both Whole and Real numbers based on 'v'
209 func (eu *eu) FmtNumber(num float64, v uint64) string {
210
211         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
212         l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3
213         count := 0
214         inWhole := v == 0
215         b := make([]byte, 0, l)
216
217         for i := len(s) - 1; i >= 0; i-- {
218
219                 if s[i] == '.' {
220                         b = append(b, eu.decimal[0])
221                         inWhole = true
222                         continue
223                 }
224
225                 if inWhole {
226                         if count == 3 {
227                                 b = append(b, eu.group[0])
228                                 count = 1
229                         } else {
230                                 count++
231                         }
232                 }
233
234                 b = append(b, s[i])
235         }
236
237         if num < 0 {
238                 b = append(b, eu.minus[0])
239         }
240
241         // reverse
242         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
243                 b[i], b[j] = b[j], b[i]
244         }
245
246         return string(b)
247 }
248
249 // FmtPercent returns 'num' with digits/precision of 'v' for 'eu' and handles both Whole and Real numbers based on 'v'
250 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
251 func (eu *eu) FmtPercent(num float64, v uint64) string {
252         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
253         l := len(s) + 5 + 1*len(s[:len(s)-int(v)-1])/3
254         count := 0
255         inWhole := v == 0
256         b := make([]byte, 0, l)
257
258         for i := len(s) - 1; i >= 0; i-- {
259
260                 if s[i] == '.' {
261                         b = append(b, eu.decimal[0])
262                         inWhole = true
263
264                         continue
265                 }
266
267                 if inWhole {
268                         if count == 3 {
269                                 b = append(b, eu.group[0])
270                                 count = 1
271                         } else {
272                                 count++
273                         }
274                 }
275
276                 b = append(b, s[i])
277         }
278
279         if num < 0 {
280                 b = append(b, eu.minus[0])
281         }
282
283         for j := len(eu.percentPrefix) - 1; j >= 0; j-- {
284                 b = append(b, eu.percentPrefix[j])
285         }
286
287         b = append(b, eu.percent[0])
288
289         // reverse
290         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
291                 b[i], b[j] = b[j], b[i]
292         }
293
294         return string(b)
295 }
296
297 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'eu'
298 func (eu *eu) FmtCurrency(num float64, v uint64, currency currency.Type) string {
299
300         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
301         symbol := eu.currencies[currency]
302         l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
303         count := 0
304         inWhole := v == 0
305         b := make([]byte, 0, l)
306
307         for i := len(s) - 1; i >= 0; i-- {
308
309                 if s[i] == '.' {
310                         b = append(b, eu.decimal[0])
311                         inWhole = true
312                         continue
313                 }
314
315                 if inWhole {
316                         if count == 3 {
317                                 b = append(b, eu.group[0])
318                                 count = 1
319                         } else {
320                                 count++
321                         }
322                 }
323
324                 b = append(b, s[i])
325         }
326
327         if num < 0 {
328                 b = append(b, eu.minus[0])
329         }
330
331         // reverse
332         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
333                 b[i], b[j] = b[j], b[i]
334         }
335
336         if int(v) < 2 {
337
338                 if v == 0 {
339                         b = append(b, eu.decimal...)
340                 }
341
342                 for i := 0; i < 2-int(v); i++ {
343                         b = append(b, '0')
344                 }
345         }
346
347         b = append(b, eu.currencyPositiveSuffix...)
348
349         b = append(b, symbol...)
350
351         return string(b)
352 }
353
354 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'eu'
355 // in accounting notation.
356 func (eu *eu) FmtAccounting(num float64, v uint64, currency currency.Type) string {
357
358         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
359         symbol := eu.currencies[currency]
360         l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3
361         count := 0
362         inWhole := v == 0
363         b := make([]byte, 0, l)
364
365         for i := len(s) - 1; i >= 0; i-- {
366
367                 if s[i] == '.' {
368                         b = append(b, eu.decimal[0])
369                         inWhole = true
370                         continue
371                 }
372
373                 if inWhole {
374                         if count == 3 {
375                                 b = append(b, eu.group[0])
376                                 count = 1
377                         } else {
378                                 count++
379                         }
380                 }
381
382                 b = append(b, s[i])
383         }
384
385         if num < 0 {
386
387                 b = append(b, eu.currencyNegativePrefix[0])
388
389         }
390
391         // reverse
392         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
393                 b[i], b[j] = b[j], b[i]
394         }
395
396         if int(v) < 2 {
397
398                 if v == 0 {
399                         b = append(b, eu.decimal...)
400                 }
401
402                 for i := 0; i < 2-int(v); i++ {
403                         b = append(b, '0')
404                 }
405         }
406
407         if num < 0 {
408                 b = append(b, eu.currencyNegativeSuffix...)
409                 b = append(b, symbol...)
410         } else {
411
412                 b = append(b, eu.currencyPositiveSuffix...)
413                 b = append(b, symbol...)
414         }
415
416         return string(b)
417 }
418
419 // FmtDateShort returns the short date representation of 't' for 'eu'
420 func (eu *eu) FmtDateShort(t time.Time) string {
421
422         b := make([]byte, 0, 32)
423
424         if t.Year() > 9 {
425                 b = append(b, strconv.Itoa(t.Year())[2:]...)
426         } else {
427                 b = append(b, strconv.Itoa(t.Year())[1:]...)
428         }
429
430         b = append(b, []byte{0x2f}...)
431         b = strconv.AppendInt(b, int64(t.Month()), 10)
432         b = append(b, []byte{0x2f}...)
433         b = strconv.AppendInt(b, int64(t.Day()), 10)
434
435         return string(b)
436 }
437
438 // FmtDateMedium returns the medium date representation of 't' for 'eu'
439 func (eu *eu) FmtDateMedium(t time.Time) string {
440
441         b := make([]byte, 0, 32)
442
443         if t.Year() > 0 {
444                 b = strconv.AppendInt(b, int64(t.Year()), 10)
445         } else {
446                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
447         }
448
449         b = append(b, []byte{0x20}...)
450         b = append(b, eu.monthsAbbreviated[t.Month()]...)
451         b = append(b, []byte{0x20}...)
452         b = strconv.AppendInt(b, int64(t.Day()), 10)
453
454         return string(b)
455 }
456
457 // FmtDateLong returns the long date representation of 't' for 'eu'
458 func (eu *eu) FmtDateLong(t time.Time) string {
459
460         b := make([]byte, 0, 32)
461
462         if t.Year() > 0 {
463                 b = strconv.AppendInt(b, int64(t.Year()), 10)
464         } else {
465                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
466         }
467
468         b = append(b, []byte{0x28, 0x65}...)
469         b = append(b, []byte{0x29, 0x6b, 0x6f}...)
470         b = append(b, []byte{0x20}...)
471         b = append(b, eu.monthsWide[t.Month()]...)
472         b = append(b, []byte{0x20}...)
473         b = strconv.AppendInt(b, int64(t.Day()), 10)
474
475         return string(b)
476 }
477
478 // FmtDateFull returns the full date representation of 't' for 'eu'
479 func (eu *eu) FmtDateFull(t time.Time) string {
480
481         b := make([]byte, 0, 32)
482
483         if t.Year() > 0 {
484                 b = strconv.AppendInt(b, int64(t.Year()), 10)
485         } else {
486                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
487         }
488
489         b = append(b, []byte{0x28, 0x65}...)
490         b = append(b, []byte{0x29, 0x6b, 0x6f}...)
491         b = append(b, []byte{0x20}...)
492         b = append(b, eu.monthsWide[t.Month()]...)
493         b = append(b, []byte{0x20}...)
494         b = strconv.AppendInt(b, int64(t.Day()), 10)
495         b = append(b, []byte{0x2c, 0x20}...)
496         b = append(b, eu.daysWide[t.Weekday()]...)
497
498         return string(b)
499 }
500
501 // FmtTimeShort returns the short time representation of 't' for 'eu'
502 func (eu *eu) FmtTimeShort(t time.Time) string {
503
504         b := make([]byte, 0, 32)
505
506         if t.Hour() < 10 {
507                 b = append(b, '0')
508         }
509
510         b = strconv.AppendInt(b, int64(t.Hour()), 10)
511         b = append(b, eu.timeSeparator...)
512
513         if t.Minute() < 10 {
514                 b = append(b, '0')
515         }
516
517         b = strconv.AppendInt(b, int64(t.Minute()), 10)
518
519         return string(b)
520 }
521
522 // FmtTimeMedium returns the medium time representation of 't' for 'eu'
523 func (eu *eu) FmtTimeMedium(t time.Time) string {
524
525         b := make([]byte, 0, 32)
526
527         if t.Hour() < 10 {
528                 b = append(b, '0')
529         }
530
531         b = strconv.AppendInt(b, int64(t.Hour()), 10)
532         b = append(b, eu.timeSeparator...)
533
534         if t.Minute() < 10 {
535                 b = append(b, '0')
536         }
537
538         b = strconv.AppendInt(b, int64(t.Minute()), 10)
539         b = append(b, eu.timeSeparator...)
540
541         if t.Second() < 10 {
542                 b = append(b, '0')
543         }
544
545         b = strconv.AppendInt(b, int64(t.Second()), 10)
546
547         return string(b)
548 }
549
550 // FmtTimeLong returns the long time representation of 't' for 'eu'
551 func (eu *eu) FmtTimeLong(t time.Time) string {
552
553         b := make([]byte, 0, 32)
554
555         if t.Hour() < 10 {
556                 b = append(b, '0')
557         }
558
559         b = strconv.AppendInt(b, int64(t.Hour()), 10)
560         b = append(b, eu.timeSeparator...)
561
562         if t.Minute() < 10 {
563                 b = append(b, '0')
564         }
565
566         b = strconv.AppendInt(b, int64(t.Minute()), 10)
567         b = append(b, eu.timeSeparator...)
568
569         if t.Second() < 10 {
570                 b = append(b, '0')
571         }
572
573         b = strconv.AppendInt(b, int64(t.Second()), 10)
574         b = append(b, []byte{0x20, 0x28}...)
575
576         tz, _ := t.Zone()
577         b = append(b, tz...)
578
579         b = append(b, []byte{0x29}...)
580
581         return string(b)
582 }
583
584 // FmtTimeFull returns the full time representation of 't' for 'eu'
585 func (eu *eu) FmtTimeFull(t time.Time) string {
586
587         b := make([]byte, 0, 32)
588
589         if t.Hour() < 10 {
590                 b = append(b, '0')
591         }
592
593         b = strconv.AppendInt(b, int64(t.Hour()), 10)
594         b = append(b, eu.timeSeparator...)
595
596         if t.Minute() < 10 {
597                 b = append(b, '0')
598         }
599
600         b = strconv.AppendInt(b, int64(t.Minute()), 10)
601         b = append(b, eu.timeSeparator...)
602
603         if t.Second() < 10 {
604                 b = append(b, '0')
605         }
606
607         b = strconv.AppendInt(b, int64(t.Second()), 10)
608         b = append(b, []byte{0x20, 0x28}...)
609
610         tz, _ := t.Zone()
611
612         if btz, ok := eu.timezones[tz]; ok {
613                 b = append(b, btz...)
614         } else {
615                 b = append(b, tz...)
616         }
617
618         b = append(b, []byte{0x29}...)
619
620         return string(b)
621 }