OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / go-playground / locales / gl_ES / gl_ES.go
1 package gl_ES
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 gl_ES 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         currencyPositiveSuffix string
27         currencyNegativeSuffix string
28         monthsAbbreviated      []string
29         monthsNarrow           []string
30         monthsWide             []string
31         daysAbbreviated        []string
32         daysNarrow             []string
33         daysShort              []string
34         daysWide               []string
35         periodsAbbreviated     []string
36         periodsNarrow          []string
37         periodsShort           []string
38         periodsWide            []string
39         erasAbbreviated        []string
40         erasNarrow             []string
41         erasWide               []string
42         timezones              map[string]string
43 }
44
45 // New returns a new instance of translator for the 'gl_ES' locale
46 func New() locales.Translator {
47         return &gl_ES{
48                 locale:                 "gl_ES",
49                 pluralsCardinal:        []locales.PluralRule{2, 6},
50                 pluralsOrdinal:         []locales.PluralRule{6},
51                 pluralsRange:           []locales.PluralRule{2, 6},
52                 decimal:                ",",
53                 group:                  ".",
54                 minus:                  "-",
55                 percent:                "%",
56                 perMille:               "‰",
57                 timeSeparator:          ":",
58                 inifinity:              "∞",
59                 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"},
60                 percentSuffix:          " ",
61                 currencyPositiveSuffix: " ",
62                 currencyNegativeSuffix: " ",
63                 monthsAbbreviated:      []string{"", "xan.", "feb.", "mar.", "abr.", "maio", "xuño", "xul.", "ago.", "set.", "out.", "nov.", "dec."},
64                 monthsNarrow:           []string{"", "x.", "f.", "m.", "a.", "m.", "x.", "x.", "a.", "s.", "o.", "n.", "d."},
65                 monthsWide:             []string{"", "xaneiro", "febreiro", "marzo", "abril", "maio", "xuño", "xullo", "agosto", "setembro", "outubro", "novembro", "decembro"},
66                 daysAbbreviated:        []string{"dom.", "luns", "mar.", "mér.", "xov.", "ven.", "sáb."},
67                 daysNarrow:             []string{"d.", "l.", "m.", "m.", "x.", "v.", "s."},
68                 daysShort:              []string{"dom.", "luns", "mar.", "mér.", "xov.", "ven.", "sáb."},
69                 daysWide:               []string{"domingo", "luns", "martes", "mércores", "xoves", "venres", "sábado"},
70                 periodsAbbreviated:     []string{"a.m.", "p.m."},
71                 periodsNarrow:          []string{"a.m.", "p.m."},
72                 periodsWide:            []string{"a.m.", "p.m."},
73                 erasAbbreviated:        []string{"a.C.", "d.C."},
74                 erasNarrow:             []string{"", ""},
75                 erasWide:               []string{"antes de Cristo", "despois de Cristo"},
76                 timezones:              map[string]string{"HNPMX": "Horario estándar do Pacífico mexicano", "AEDT": "Horario de verán de Australia Oriental", "CAT": "Horario de África Central", "ACDT": "Horario de verán de Australia Central", "CHADT": "Horario de verán de Chatham", "UYST": "Horario de verán de Uruguai", "COST": "Horario de verán de Colombia", "EST": "Horario estándar do leste, Norteamérica", "GYT": "Horario da Güiana", "SRT": "Horario de Suriname", "WIT": "Horario de Indonesia Oriental", "LHST": "Horario estándar de Lord Howe", "ARST": "Horario de verán de Arxentina", "AKST": "Horario estándar de Alasca", "OESZ": "Horario de verán de Europa Oriental", "WART": "Horario estándar de Arxentina Occidental", "HKST": "Horario de verán de Hong Kong", "HNPM": "Horario estándar de Saint Pierre e Miquelon", "∅∅∅": "Horario de verán de Brasilia", "NZST": "Horario estándar de Nova Zelandia", "NZDT": "Horario de verán de Nova Zelandia", "HENOMX": "Horario de verán de México Noroeste", "ACST": "Horario estándar de Australia Central", "PDT": "Horario de verán do Pacífico, Norteamérica", "CHAST": "Horario estándar de Chatham", "TMST": "Horario de verán de Turcomenistán", "HNOG": "Horario estándar de Groenlandia Occidental", "CLT": "Horario estándar de Chile", "HNCU": "Horario estándar de Cuba", "MST": "MST", "MDT": "MDT", "JST": "Horario estándar do Xapón", "IST": "Horario estándar da India", "ECT": "Horario de Ecuador", "WEZ": "Horario estándar de Europa Occidental", "HEPMX": "Horario de verán do Pacífico mexicano", "TMT": "Horario estándar de Turcomenistán", "WARST": "Horario de verán de Arxentina Occidental", "COT": "Horario estándar de Colombia", "EDT": "Horario de verán do leste, Norteamérica", "ACWST": "Horario estándar de Australia Occidental Central", "MEZ": "Horario estándar de Europa Central", "OEZ": "Horario estándar de Europa Oriental", "HKT": "Horario estándar de Hong Kong", "CLST": "Horario de verán de Chile", "MYT": "Horario de Malaisia", "AST": "Horario estándar do Atlántico", "EAT": "Horario de África Oriental", "HNEG": "Horario estándar de Groenlandia Oriental", "GMT": "Horario do meridiano de Greenwich", "HEPM": "Horario de verán de Saint Pierre e Miquelon", "HAST": "Horario estándar de Hawai-Aleutiano", "AKDT": "Horario de verán de Alasca", "CST": "Horario estándar central, Norteamérica", "WITA": "Horario de Indonesia Central", "LHDT": "Horario de verán de Lord Howe", "HEOG": "Horario de verán de Groenlandia Occidental", "WESZ": "Horario de verán de Europa Occidental", "HAT": "Horario de verán de Terranova", "ChST": "Horario estándar chamorro", "PST": "Horario estándar do Pacífico, Norteamérica", "BOT": "Horario de Bolivia", "VET": "Horario de Venezuela", "ART": "Horario estándar de Arxentina", "WAST": "Horario de verán de África Occidental", "SGT": "Horario estándar de Singapur", "WIB": "Horario de Indonesia Occidental", "AWST": "Horario estándar de Australia Occidental", "MESZ": "Horario de verán de Europa Central", "ADT": "Horario de verán do Atlántico", "SAST": "Horario estándar de África do Sur", "HEEG": "Horario de verán de Groenlandia Oriental", "HECU": "Horario de verán de Cuba", "BT": "Horario de Bután", "HNNOMX": "Horario estándar de México Noroeste", "AEST": "Horario estándar de Australia Oriental", "WAT": "Horario estándar de África Occidental", "AWDT": "Horario de verán de Australia Occidental", "ACWDT": "Horario de verán de Australia Occidental Central", "UYT": "Horario estándar de Uruguai", "HADT": "Horario de verán de Hawai-Aleutiano", "GFT": "Horario da Güiana Francesa", "CDT": "Horario de verán central, Norteamérica", "JDT": "Horario de verán do Xapón", "HNT": "Horario estándar de Terranova"},
77         }
78 }
79
80 // Locale returns the current translators string locale
81 func (gl *gl_ES) Locale() string {
82         return gl.locale
83 }
84
85 // PluralsCardinal returns the list of cardinal plural rules associated with 'gl_ES'
86 func (gl *gl_ES) PluralsCardinal() []locales.PluralRule {
87         return gl.pluralsCardinal
88 }
89
90 // PluralsOrdinal returns the list of ordinal plural rules associated with 'gl_ES'
91 func (gl *gl_ES) PluralsOrdinal() []locales.PluralRule {
92         return gl.pluralsOrdinal
93 }
94
95 // PluralsRange returns the list of range plural rules associated with 'gl_ES'
96 func (gl *gl_ES) PluralsRange() []locales.PluralRule {
97         return gl.pluralsRange
98 }
99
100 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'gl_ES'
101 func (gl *gl_ES) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
102
103         n := math.Abs(num)
104         i := int64(n)
105
106         if i == 1 && v == 0 {
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 'gl_ES'
114 func (gl *gl_ES) 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 'gl_ES'
119 func (gl *gl_ES) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
120
121         start := gl.CardinalPluralRule(num1, v1)
122         end := gl.CardinalPluralRule(num2, v2)
123
124         if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
125                 return locales.PluralRuleOther
126         } else if start == locales.PluralRuleOther && end == locales.PluralRuleOne {
127                 return locales.PluralRuleOne
128         }
129
130         return locales.PluralRuleOther
131
132 }
133
134 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
135 func (gl *gl_ES) MonthAbbreviated(month time.Month) string {
136         return gl.monthsAbbreviated[month]
137 }
138
139 // MonthsAbbreviated returns the locales abbreviated months
140 func (gl *gl_ES) MonthsAbbreviated() []string {
141         return gl.monthsAbbreviated[1:]
142 }
143
144 // MonthNarrow returns the locales narrow month given the 'month' provided
145 func (gl *gl_ES) MonthNarrow(month time.Month) string {
146         return gl.monthsNarrow[month]
147 }
148
149 // MonthsNarrow returns the locales narrow months
150 func (gl *gl_ES) MonthsNarrow() []string {
151         return gl.monthsNarrow[1:]
152 }
153
154 // MonthWide returns the locales wide month given the 'month' provided
155 func (gl *gl_ES) MonthWide(month time.Month) string {
156         return gl.monthsWide[month]
157 }
158
159 // MonthsWide returns the locales wide months
160 func (gl *gl_ES) MonthsWide() []string {
161         return gl.monthsWide[1:]
162 }
163
164 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
165 func (gl *gl_ES) WeekdayAbbreviated(weekday time.Weekday) string {
166         return gl.daysAbbreviated[weekday]
167 }
168
169 // WeekdaysAbbreviated returns the locales abbreviated weekdays
170 func (gl *gl_ES) WeekdaysAbbreviated() []string {
171         return gl.daysAbbreviated
172 }
173
174 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
175 func (gl *gl_ES) WeekdayNarrow(weekday time.Weekday) string {
176         return gl.daysNarrow[weekday]
177 }
178
179 // WeekdaysNarrow returns the locales narrow weekdays
180 func (gl *gl_ES) WeekdaysNarrow() []string {
181         return gl.daysNarrow
182 }
183
184 // WeekdayShort returns the locales short weekday given the 'weekday' provided
185 func (gl *gl_ES) WeekdayShort(weekday time.Weekday) string {
186         return gl.daysShort[weekday]
187 }
188
189 // WeekdaysShort returns the locales short weekdays
190 func (gl *gl_ES) WeekdaysShort() []string {
191         return gl.daysShort
192 }
193
194 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
195 func (gl *gl_ES) WeekdayWide(weekday time.Weekday) string {
196         return gl.daysWide[weekday]
197 }
198
199 // WeekdaysWide returns the locales wide weekdays
200 func (gl *gl_ES) WeekdaysWide() []string {
201         return gl.daysWide
202 }
203
204 // Decimal returns the decimal point of number
205 func (gl *gl_ES) Decimal() string {
206         return gl.decimal
207 }
208
209 // Group returns the group of number
210 func (gl *gl_ES) Group() string {
211         return gl.group
212 }
213
214 // Group returns the minus sign of number
215 func (gl *gl_ES) Minus() string {
216         return gl.minus
217 }
218
219 // FmtNumber returns 'num' with digits/precision of 'v' for 'gl_ES' and handles both Whole and Real numbers based on 'v'
220 func (gl *gl_ES) FmtNumber(num float64, v uint64) string {
221
222         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
223         l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3
224         count := 0
225         inWhole := v == 0
226         b := make([]byte, 0, l)
227
228         for i := len(s) - 1; i >= 0; i-- {
229
230                 if s[i] == '.' {
231                         b = append(b, gl.decimal[0])
232                         inWhole = true
233                         continue
234                 }
235
236                 if inWhole {
237                         if count == 3 {
238                                 b = append(b, gl.group[0])
239                                 count = 1
240                         } else {
241                                 count++
242                         }
243                 }
244
245                 b = append(b, s[i])
246         }
247
248         if num < 0 {
249                 b = append(b, gl.minus[0])
250         }
251
252         // reverse
253         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
254                 b[i], b[j] = b[j], b[i]
255         }
256
257         return string(b)
258 }
259
260 // FmtPercent returns 'num' with digits/precision of 'v' for 'gl_ES' and handles both Whole and Real numbers based on 'v'
261 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
262 func (gl *gl_ES) FmtPercent(num float64, v uint64) string {
263         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
264         l := len(s) + 5
265         b := make([]byte, 0, l)
266
267         for i := len(s) - 1; i >= 0; i-- {
268
269                 if s[i] == '.' {
270                         b = append(b, gl.decimal[0])
271                         continue
272                 }
273
274                 b = append(b, s[i])
275         }
276
277         if num < 0 {
278                 b = append(b, gl.minus[0])
279         }
280
281         // reverse
282         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
283                 b[i], b[j] = b[j], b[i]
284         }
285
286         b = append(b, gl.percentSuffix...)
287
288         b = append(b, gl.percent...)
289
290         return string(b)
291 }
292
293 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'gl_ES'
294 func (gl *gl_ES) FmtCurrency(num float64, v uint64, currency currency.Type) string {
295
296         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
297         symbol := gl.currencies[currency]
298         l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
299         count := 0
300         inWhole := v == 0
301         b := make([]byte, 0, l)
302
303         for i := len(s) - 1; i >= 0; i-- {
304
305                 if s[i] == '.' {
306                         b = append(b, gl.decimal[0])
307                         inWhole = true
308                         continue
309                 }
310
311                 if inWhole {
312                         if count == 3 {
313                                 b = append(b, gl.group[0])
314                                 count = 1
315                         } else {
316                                 count++
317                         }
318                 }
319
320                 b = append(b, s[i])
321         }
322
323         if num < 0 {
324                 b = append(b, gl.minus[0])
325         }
326
327         // reverse
328         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
329                 b[i], b[j] = b[j], b[i]
330         }
331
332         if int(v) < 2 {
333
334                 if v == 0 {
335                         b = append(b, gl.decimal...)
336                 }
337
338                 for i := 0; i < 2-int(v); i++ {
339                         b = append(b, '0')
340                 }
341         }
342
343         b = append(b, gl.currencyPositiveSuffix...)
344
345         b = append(b, symbol...)
346
347         return string(b)
348 }
349
350 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'gl_ES'
351 // in accounting notation.
352 func (gl *gl_ES) FmtAccounting(num float64, v uint64, currency currency.Type) string {
353
354         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
355         symbol := gl.currencies[currency]
356         l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
357         count := 0
358         inWhole := v == 0
359         b := make([]byte, 0, l)
360
361         for i := len(s) - 1; i >= 0; i-- {
362
363                 if s[i] == '.' {
364                         b = append(b, gl.decimal[0])
365                         inWhole = true
366                         continue
367                 }
368
369                 if inWhole {
370                         if count == 3 {
371                                 b = append(b, gl.group[0])
372                                 count = 1
373                         } else {
374                                 count++
375                         }
376                 }
377
378                 b = append(b, s[i])
379         }
380
381         if num < 0 {
382
383                 b = append(b, gl.minus[0])
384
385         }
386
387         // reverse
388         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
389                 b[i], b[j] = b[j], b[i]
390         }
391
392         if int(v) < 2 {
393
394                 if v == 0 {
395                         b = append(b, gl.decimal...)
396                 }
397
398                 for i := 0; i < 2-int(v); i++ {
399                         b = append(b, '0')
400                 }
401         }
402
403         if num < 0 {
404                 b = append(b, gl.currencyNegativeSuffix...)
405                 b = append(b, symbol...)
406         } else {
407
408                 b = append(b, gl.currencyPositiveSuffix...)
409                 b = append(b, symbol...)
410         }
411
412         return string(b)
413 }
414
415 // FmtDateShort returns the short date representation of 't' for 'gl_ES'
416 func (gl *gl_ES) FmtDateShort(t time.Time) string {
417
418         b := make([]byte, 0, 32)
419
420         if t.Day() < 10 {
421                 b = append(b, '0')
422         }
423
424         b = strconv.AppendInt(b, int64(t.Day()), 10)
425         b = append(b, []byte{0x2f}...)
426
427         if t.Month() < 10 {
428                 b = append(b, '0')
429         }
430
431         b = strconv.AppendInt(b, int64(t.Month()), 10)
432
433         b = append(b, []byte{0x2f}...)
434
435         if t.Year() > 9 {
436                 b = append(b, strconv.Itoa(t.Year())[2:]...)
437         } else {
438                 b = append(b, strconv.Itoa(t.Year())[1:]...)
439         }
440
441         return string(b)
442 }
443
444 // FmtDateMedium returns the medium date representation of 't' for 'gl_ES'
445 func (gl *gl_ES) FmtDateMedium(t time.Time) string {
446
447         b := make([]byte, 0, 32)
448
449         b = strconv.AppendInt(b, int64(t.Day()), 10)
450         b = append(b, []byte{0x20, 0x64, 0x65}...)
451         b = append(b, []byte{0x20}...)
452         b = append(b, gl.monthsAbbreviated[t.Month()]...)
453         b = append(b, []byte{0x20, 0x64, 0x65}...)
454         b = append(b, []byte{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 // FmtDateLong returns the long date representation of 't' for 'gl_ES'
466 func (gl *gl_ES) FmtDateLong(t time.Time) string {
467
468         b := make([]byte, 0, 32)
469
470         b = strconv.AppendInt(b, int64(t.Day()), 10)
471         b = append(b, []byte{0x20, 0x64, 0x65}...)
472         b = append(b, []byte{0x20}...)
473         b = append(b, gl.monthsWide[t.Month()]...)
474         b = append(b, []byte{0x20, 0x64, 0x65}...)
475         b = append(b, []byte{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 // FmtDateFull returns the full date representation of 't' for 'gl_ES'
487 func (gl *gl_ES) FmtDateFull(t time.Time) string {
488
489         b := make([]byte, 0, 32)
490
491         b = append(b, gl.daysWide[t.Weekday()]...)
492         b = append(b, []byte{0x2c, 0x20}...)
493         b = strconv.AppendInt(b, int64(t.Day()), 10)
494         b = append(b, []byte{0x20, 0x64, 0x65}...)
495         b = append(b, []byte{0x20}...)
496         b = append(b, gl.monthsWide[t.Month()]...)
497         b = append(b, []byte{0x20, 0x64, 0x65}...)
498         b = append(b, []byte{0x20}...)
499
500         if t.Year() > 0 {
501                 b = strconv.AppendInt(b, int64(t.Year()), 10)
502         } else {
503                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
504         }
505
506         return string(b)
507 }
508
509 // FmtTimeShort returns the short time representation of 't' for 'gl_ES'
510 func (gl *gl_ES) FmtTimeShort(t time.Time) string {
511
512         b := make([]byte, 0, 32)
513
514         if t.Hour() < 10 {
515                 b = append(b, '0')
516         }
517
518         b = strconv.AppendInt(b, int64(t.Hour()), 10)
519         b = append(b, gl.timeSeparator...)
520
521         if t.Minute() < 10 {
522                 b = append(b, '0')
523         }
524
525         b = strconv.AppendInt(b, int64(t.Minute()), 10)
526
527         return string(b)
528 }
529
530 // FmtTimeMedium returns the medium time representation of 't' for 'gl_ES'
531 func (gl *gl_ES) FmtTimeMedium(t time.Time) string {
532
533         b := make([]byte, 0, 32)
534
535         if t.Hour() < 10 {
536                 b = append(b, '0')
537         }
538
539         b = strconv.AppendInt(b, int64(t.Hour()), 10)
540         b = append(b, gl.timeSeparator...)
541
542         if t.Minute() < 10 {
543                 b = append(b, '0')
544         }
545
546         b = strconv.AppendInt(b, int64(t.Minute()), 10)
547         b = append(b, gl.timeSeparator...)
548
549         if t.Second() < 10 {
550                 b = append(b, '0')
551         }
552
553         b = strconv.AppendInt(b, int64(t.Second()), 10)
554
555         return string(b)
556 }
557
558 // FmtTimeLong returns the long time representation of 't' for 'gl_ES'
559 func (gl *gl_ES) FmtTimeLong(t time.Time) string {
560
561         b := make([]byte, 0, 32)
562
563         if t.Hour() < 10 {
564                 b = append(b, '0')
565         }
566
567         b = strconv.AppendInt(b, int64(t.Hour()), 10)
568         b = append(b, gl.timeSeparator...)
569
570         if t.Minute() < 10 {
571                 b = append(b, '0')
572         }
573
574         b = strconv.AppendInt(b, int64(t.Minute()), 10)
575         b = append(b, gl.timeSeparator...)
576
577         if t.Second() < 10 {
578                 b = append(b, '0')
579         }
580
581         b = strconv.AppendInt(b, int64(t.Second()), 10)
582         b = append(b, []byte{0x20}...)
583
584         tz, _ := t.Zone()
585         b = append(b, tz...)
586
587         return string(b)
588 }
589
590 // FmtTimeFull returns the full time representation of 't' for 'gl_ES'
591 func (gl *gl_ES) FmtTimeFull(t time.Time) string {
592
593         b := make([]byte, 0, 32)
594
595         if t.Hour() < 10 {
596                 b = append(b, '0')
597         }
598
599         b = strconv.AppendInt(b, int64(t.Hour()), 10)
600         b = append(b, gl.timeSeparator...)
601
602         if t.Minute() < 10 {
603                 b = append(b, '0')
604         }
605
606         b = strconv.AppendInt(b, int64(t.Minute()), 10)
607         b = append(b, gl.timeSeparator...)
608
609         if t.Second() < 10 {
610                 b = append(b, '0')
611         }
612
613         b = strconv.AppendInt(b, int64(t.Second()), 10)
614         b = append(b, []byte{0x20}...)
615
616         tz, _ := t.Zone()
617
618         if btz, ok := gl.timezones[tz]; ok {
619                 b = append(b, btz...)
620         } else {
621                 b = append(b, tz...)
622         }
623
624         return string(b)
625 }