OSDN Git Service

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