1package es_ES
2
3import (
4	"math"
5	"strconv"
6	"time"
7
8	"github.com/gohugoio/locales"
9	"github.com/gohugoio/locales/currency"
10)
11
12type es_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 'es_ES' locale
46func New() locales.Translator {
47	return &es_ES{
48		locale:                 "es_ES",
49		pluralsCardinal:        []locales.PluralRule{2, 6},
50		pluralsOrdinal:         []locales.PluralRule{6},
51		pluralsRange:           []locales.PluralRule{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", "CNH", "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", "MRU", "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", "STN", "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", "UYW", "UZS", "VEB", "VEF", "VES", "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{"", "ene.", "feb.", "mar.", "abr.", "may.", "jun.", "jul.", "ago.", "sept.", "oct.", "nov.", "dic."},
64		monthsNarrow:           []string{"", "E", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"},
65		monthsWide:             []string{"", "enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"},
66		daysAbbreviated:        []string{"dom.", "lun.", "mar.", "mié.", "jue.", "vie.", "sáb."},
67		daysNarrow:             []string{"D", "L", "M", "X", "J", "V", "S"},
68		daysShort:              []string{"DO", "LU", "MA", "MI", "JU", "VI", "SA"},
69		daysWide:               []string{"domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"},
70		periodsAbbreviated:     []string{"a.\u00a0m.", "p.\u00a0m."},
71		periodsNarrow:          []string{"a.\u00a0m.", "p.\u00a0m."},
72		periodsWide:            []string{"a.\u00a0m.", "p.\u00a0m."},
73		erasAbbreviated:        []string{"a. C.", "d. C."},
74		erasNarrow:             []string{"", ""},
75		erasWide:               []string{"antes de Cristo", "después de Cristo"},
76		timezones:              map[string]string{"ACDT": "hora de verano de Australia central", "ACST": "hora estándar de Australia central", "ACWDT": "hora de verano de Australia centroccidental", "ACWST": "hora estándar de Australia centroccidental", "ADT": "hora de verano del Atlántico", "AEDT": "hora de verano de Australia oriental", "AEST": "hora estándar de Australia oriental", "AKDT": "hora de verano de Alaska", "AKST": "hora estándar de Alaska", "ARST": "hora de verano de Argentina", "ART": "hora estándar de Argentina", "AST": "hora estándar del Atlántico", "AWDT": "hora de verano de Australia occidental", "AWST": "hora estándar de Australia occidental", "BOT": "hora de Bolivia", "BT": "hora de Bután", "CAT": "hora de África central", "CDT": "hora de verano central", "CHADT": "hora de verano de Chatham", "CHAST": "hora estándar de Chatham", "CLST": "hora de verano de Chile", "CLT": "hora estándar de Chile", "COST": "hora de verano de Colombia", "COT": "hora estándar de Colombia", "CST": "hora estándar central", "ChST": "hora estándar de Chamorro", "EAT": "hora de África oriental", "ECT": "hora de Ecuador", "EDT": "hora de verano oriental", "EST": "hora estándar oriental", "GFT": "hora de la Guayana Francesa", "GMT": "hora del meridiano de Greenwich", "GST": "hora estándar del Golfo", "GYT": "hora de Guyana", "HADT": "hora de verano de Hawái-Aleutianas", "HAST": "hora estándar de Hawái-Aleutianas", "HAT": "hora de verano de Terranova", "HECU": "hora de verano de Cuba", "HEEG": "hora de verano de Groenlandia oriental", "HENOMX": "hora de verano del noroeste de México", "HEOG": "hora de verano de Groenlandia occidental", "HEPM": "hora de verano de San Pedro y Miquelón", "HEPMX": "hora de verano del Pacífico de México", "HKST": "hora de verano de Hong Kong", "HKT": "hora estándar de Hong Kong", "HNCU": "hora estándar de Cuba", "HNEG": "hora estándar de Groenlandia oriental", "HNNOMX": "hora estándar del noroeste de México", "HNOG": "hora estándar de Groenlandia occidental", "HNPM": "hora estándar de San Pedro y Miquelón", "HNPMX": "hora estándar del Pacífico de México", "HNT": "hora estándar de Terranova", "IST": "hora estándar de la India", "JDT": "hora de verano de Japón", "JST": "hora estándar de Japón", "LHDT": "hora de verano de Lord Howe", "LHST": "hora estándar de Lord Howe", "MDT": "Hora de verano de Macao", "MESZ": "hora de verano de Europa central", "MEZ": "hora estándar de Europa central", "MST": "Hora estándar de Macao", "MYT": "hora de Malasia", "NZDT": "hora de verano de Nueva Zelanda", "NZST": "hora estándar de Nueva Zelanda", "OESZ": "hora de verano de Europa oriental", "OEZ": "hora estándar de Europa oriental", "PDT": "hora de verano del Pacífico", "PST": "hora estándar del Pacífico", "SAST": "hora de Sudáfrica", "SGT": "hora de Singapur", "SRT": "hora de Surinam", "TMST": "hora de verano de Turkmenistán", "TMT": "hora estándar de Turkmenistán", "UYST": "hora de verano de Uruguay", "UYT": "hora estándar de Uruguay", "VET": "hora de Venezuela", "WARST": "hora de verano de Argentina occidental", "WART": "hora estándar de Argentina occidental", "WAST": "hora de verano de África occidental", "WAT": "hora estándar de África occidental", "WESZ": "hora de verano de Europa occidental", "WEZ": "hora estándar de Europa occidental", "WIB": "hora de Indonesia occidental", "WIT": "hora de Indonesia oriental", "WITA": "hora de Indonesia central", "∅∅∅": "hora de verano de Perú"},
77	}
78}
79
80// Locale returns the current translators string locale
81func (es *es_ES) Locale() string {
82	return es.locale
83}
84
85// PluralsCardinal returns the list of cardinal plural rules associated with 'es_ES'
86func (es *es_ES) PluralsCardinal() []locales.PluralRule {
87	return es.pluralsCardinal
88}
89
90// PluralsOrdinal returns the list of ordinal plural rules associated with 'es_ES'
91func (es *es_ES) PluralsOrdinal() []locales.PluralRule {
92	return es.pluralsOrdinal
93}
94
95// PluralsRange returns the list of range plural rules associated with 'es_ES'
96func (es *es_ES) PluralsRange() []locales.PluralRule {
97	return es.pluralsRange
98}
99
100// CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'es_ES'
101func (es *es_ES) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
102
103	n := math.Abs(num)
104
105	if n == 1 {
106		return locales.PluralRuleOne
107	}
108
109	return locales.PluralRuleOther
110}
111
112// OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'es_ES'
113func (es *es_ES) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
114	return locales.PluralRuleOther
115}
116
117// RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'es_ES'
118func (es *es_ES) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
119	return locales.PluralRuleOther
120}
121
122// MonthAbbreviated returns the locales abbreviated month given the 'month' provided
123func (es *es_ES) MonthAbbreviated(month time.Month) string {
124	return es.monthsAbbreviated[month]
125}
126
127// MonthsAbbreviated returns the locales abbreviated months
128func (es *es_ES) MonthsAbbreviated() []string {
129	return es.monthsAbbreviated[1:]
130}
131
132// MonthNarrow returns the locales narrow month given the 'month' provided
133func (es *es_ES) MonthNarrow(month time.Month) string {
134	return es.monthsNarrow[month]
135}
136
137// MonthsNarrow returns the locales narrow months
138func (es *es_ES) MonthsNarrow() []string {
139	return es.monthsNarrow[1:]
140}
141
142// MonthWide returns the locales wide month given the 'month' provided
143func (es *es_ES) MonthWide(month time.Month) string {
144	return es.monthsWide[month]
145}
146
147// MonthsWide returns the locales wide months
148func (es *es_ES) MonthsWide() []string {
149	return es.monthsWide[1:]
150}
151
152// WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
153func (es *es_ES) WeekdayAbbreviated(weekday time.Weekday) string {
154	return es.daysAbbreviated[weekday]
155}
156
157// WeekdaysAbbreviated returns the locales abbreviated weekdays
158func (es *es_ES) WeekdaysAbbreviated() []string {
159	return es.daysAbbreviated
160}
161
162// WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
163func (es *es_ES) WeekdayNarrow(weekday time.Weekday) string {
164	return es.daysNarrow[weekday]
165}
166
167// WeekdaysNarrow returns the locales narrow weekdays
168func (es *es_ES) WeekdaysNarrow() []string {
169	return es.daysNarrow
170}
171
172// WeekdayShort returns the locales short weekday given the 'weekday' provided
173func (es *es_ES) WeekdayShort(weekday time.Weekday) string {
174	return es.daysShort[weekday]
175}
176
177// WeekdaysShort returns the locales short weekdays
178func (es *es_ES) WeekdaysShort() []string {
179	return es.daysShort
180}
181
182// WeekdayWide returns the locales wide weekday given the 'weekday' provided
183func (es *es_ES) WeekdayWide(weekday time.Weekday) string {
184	return es.daysWide[weekday]
185}
186
187// WeekdaysWide returns the locales wide weekdays
188func (es *es_ES) WeekdaysWide() []string {
189	return es.daysWide
190}
191
192// Decimal returns the decimal point of number
193func (es *es_ES) Decimal() string {
194	return es.decimal
195}
196
197// Group returns the group of number
198func (es *es_ES) Group() string {
199	return es.group
200}
201
202// Group returns the minus sign of number
203func (es *es_ES) Minus() string {
204	return es.minus
205}
206
207// FmtNumber returns 'num' with digits/precision of 'v' for 'es_ES' and handles both Whole and Real numbers based on 'v'
208func (es *es_ES) FmtNumber(num float64, v uint64) string {
209
210	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
211	l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3
212	count := 0
213	inWhole := v == 0
214	b := make([]byte, 0, l)
215
216	for i := len(s) - 1; i >= 0; i-- {
217
218		if s[i] == '.' {
219			b = append(b, es.decimal[0])
220			inWhole = true
221			continue
222		}
223
224		if inWhole {
225			if count == 3 {
226				b = append(b, es.group[0])
227				count = 1
228			} else {
229				count++
230			}
231		}
232
233		b = append(b, s[i])
234	}
235
236	if num < 0 {
237		b = append(b, es.minus[0])
238	}
239
240	// reverse
241	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
242		b[i], b[j] = b[j], b[i]
243	}
244
245	return string(b)
246}
247
248// FmtPercent returns 'num' with digits/precision of 'v' for 'es_ES' and handles both Whole and Real numbers based on 'v'
249// NOTE: 'num' passed into FmtPercent is assumed to be in percent already
250func (es *es_ES) FmtPercent(num float64, v uint64) string {
251	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
252	l := len(s) + 5
253	b := make([]byte, 0, l)
254
255	for i := len(s) - 1; i >= 0; i-- {
256
257		if s[i] == '.' {
258			b = append(b, es.decimal[0])
259			continue
260		}
261
262		b = append(b, s[i])
263	}
264
265	if num < 0 {
266		b = append(b, es.minus[0])
267	}
268
269	// reverse
270	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
271		b[i], b[j] = b[j], b[i]
272	}
273
274	b = append(b, es.percentSuffix...)
275
276	b = append(b, es.percent...)
277
278	return string(b)
279}
280
281// FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'es_ES'
282func (es *es_ES) FmtCurrency(num float64, v uint64, currency currency.Type) string {
283
284	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
285	symbol := es.currencies[currency]
286	l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
287	count := 0
288	inWhole := v == 0
289	b := make([]byte, 0, l)
290
291	for i := len(s) - 1; i >= 0; i-- {
292
293		if s[i] == '.' {
294			b = append(b, es.decimal[0])
295			inWhole = true
296			continue
297		}
298
299		if inWhole {
300			if count == 3 {
301				b = append(b, es.group[0])
302				count = 1
303			} else {
304				count++
305			}
306		}
307
308		b = append(b, s[i])
309	}
310
311	if num < 0 {
312		b = append(b, es.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, es.decimal...)
324		}
325
326		for i := 0; i < 2-int(v); i++ {
327			b = append(b, '0')
328		}
329	}
330
331	b = append(b, es.currencyPositiveSuffix...)
332
333	b = append(b, symbol...)
334
335	return string(b)
336}
337
338// FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_ES'
339// in accounting notation.
340func (es *es_ES) FmtAccounting(num float64, v uint64, currency currency.Type) string {
341
342	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
343	symbol := es.currencies[currency]
344	l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
345	count := 0
346	inWhole := v == 0
347	b := make([]byte, 0, l)
348
349	for i := len(s) - 1; i >= 0; i-- {
350
351		if s[i] == '.' {
352			b = append(b, es.decimal[0])
353			inWhole = true
354			continue
355		}
356
357		if inWhole {
358			if count == 3 {
359				b = append(b, es.group[0])
360				count = 1
361			} else {
362				count++
363			}
364		}
365
366		b = append(b, s[i])
367	}
368
369	if num < 0 {
370
371		b = append(b, es.minus[0])
372
373	}
374
375	// reverse
376	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
377		b[i], b[j] = b[j], b[i]
378	}
379
380	if int(v) < 2 {
381
382		if v == 0 {
383			b = append(b, es.decimal...)
384		}
385
386		for i := 0; i < 2-int(v); i++ {
387			b = append(b, '0')
388		}
389	}
390
391	if num < 0 {
392		b = append(b, es.currencyNegativeSuffix...)
393		b = append(b, symbol...)
394	} else {
395
396		b = append(b, es.currencyPositiveSuffix...)
397		b = append(b, symbol...)
398	}
399
400	return string(b)
401}
402
403// FmtDateShort returns the short date representation of 't' for 'es_ES'
404func (es *es_ES) FmtDateShort(t time.Time) string {
405
406	b := make([]byte, 0, 32)
407
408	b = strconv.AppendInt(b, int64(t.Day()), 10)
409	b = append(b, []byte{0x2f}...)
410	b = strconv.AppendInt(b, int64(t.Month()), 10)
411	b = append(b, []byte{0x2f}...)
412
413	if t.Year() > 9 {
414		b = append(b, strconv.Itoa(t.Year())[2:]...)
415	} else {
416		b = append(b, strconv.Itoa(t.Year())[1:]...)
417	}
418
419	return string(b)
420}
421
422// FmtDateMedium returns the medium date representation of 't' for 'es_ES'
423func (es *es_ES) FmtDateMedium(t time.Time) string {
424
425	b := make([]byte, 0, 32)
426
427	b = strconv.AppendInt(b, int64(t.Day()), 10)
428	b = append(b, []byte{0x20}...)
429	b = append(b, es.monthsAbbreviated[t.Month()]...)
430	b = append(b, []byte{0x20}...)
431
432	if t.Year() > 0 {
433		b = strconv.AppendInt(b, int64(t.Year()), 10)
434	} else {
435		b = strconv.AppendInt(b, int64(-t.Year()), 10)
436	}
437
438	return string(b)
439}
440
441// FmtDateLong returns the long date representation of 't' for 'es_ES'
442func (es *es_ES) FmtDateLong(t time.Time) string {
443
444	b := make([]byte, 0, 32)
445
446	b = strconv.AppendInt(b, int64(t.Day()), 10)
447	b = append(b, []byte{0x20, 0x64, 0x65}...)
448	b = append(b, []byte{0x20}...)
449	b = append(b, es.monthsWide[t.Month()]...)
450	b = append(b, []byte{0x20, 0x64, 0x65}...)
451	b = append(b, []byte{0x20}...)
452
453	if t.Year() > 0 {
454		b = strconv.AppendInt(b, int64(t.Year()), 10)
455	} else {
456		b = strconv.AppendInt(b, int64(-t.Year()), 10)
457	}
458
459	return string(b)
460}
461
462// FmtDateFull returns the full date representation of 't' for 'es_ES'
463func (es *es_ES) FmtDateFull(t time.Time) string {
464
465	b := make([]byte, 0, 32)
466
467	b = append(b, es.daysWide[t.Weekday()]...)
468	b = append(b, []byte{0x2c, 0x20}...)
469	b = strconv.AppendInt(b, int64(t.Day()), 10)
470	b = append(b, []byte{0x20, 0x64, 0x65}...)
471	b = append(b, []byte{0x20}...)
472	b = append(b, es.monthsWide[t.Month()]...)
473	b = append(b, []byte{0x20, 0x64, 0x65}...)
474	b = append(b, []byte{0x20}...)
475
476	if t.Year() > 0 {
477		b = strconv.AppendInt(b, int64(t.Year()), 10)
478	} else {
479		b = strconv.AppendInt(b, int64(-t.Year()), 10)
480	}
481
482	return string(b)
483}
484
485// FmtTimeShort returns the short time representation of 't' for 'es_ES'
486func (es *es_ES) FmtTimeShort(t time.Time) string {
487
488	b := make([]byte, 0, 32)
489
490	b = strconv.AppendInt(b, int64(t.Hour()), 10)
491	b = append(b, es.timeSeparator...)
492
493	if t.Minute() < 10 {
494		b = append(b, '0')
495	}
496
497	b = strconv.AppendInt(b, int64(t.Minute()), 10)
498
499	return string(b)
500}
501
502// FmtTimeMedium returns the medium time representation of 't' for 'es_ES'
503func (es *es_ES) FmtTimeMedium(t time.Time) string {
504
505	b := make([]byte, 0, 32)
506
507	b = strconv.AppendInt(b, int64(t.Hour()), 10)
508	b = append(b, es.timeSeparator...)
509
510	if t.Minute() < 10 {
511		b = append(b, '0')
512	}
513
514	b = strconv.AppendInt(b, int64(t.Minute()), 10)
515	b = append(b, es.timeSeparator...)
516
517	if t.Second() < 10 {
518		b = append(b, '0')
519	}
520
521	b = strconv.AppendInt(b, int64(t.Second()), 10)
522
523	return string(b)
524}
525
526// FmtTimeLong returns the long time representation of 't' for 'es_ES'
527func (es *es_ES) FmtTimeLong(t time.Time) string {
528
529	b := make([]byte, 0, 32)
530
531	b = strconv.AppendInt(b, int64(t.Hour()), 10)
532	b = append(b, es.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, es.timeSeparator...)
540
541	if t.Second() < 10 {
542		b = append(b, '0')
543	}
544
545	b = strconv.AppendInt(b, int64(t.Second()), 10)
546	b = append(b, []byte{0x20}...)
547
548	tz, _ := t.Zone()
549	b = append(b, tz...)
550
551	return string(b)
552}
553
554// FmtTimeFull returns the full time representation of 't' for 'es_ES'
555func (es *es_ES) FmtTimeFull(t time.Time) string {
556
557	b := make([]byte, 0, 32)
558
559	b = strconv.AppendInt(b, int64(t.Hour()), 10)
560	b = append(b, es.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, es.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
578	if btz, ok := es.timezones[tz]; ok {
579		b = append(b, btz...)
580	} else {
581		b = append(b, tz...)
582	}
583
584	b = append(b, []byte{0x29}...)
585
586	return string(b)
587}
588