OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / go-playground / locales / es_PY / es_PY.go
1 package es_PY
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_PY 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         currencyPositivePrefix string
27         currencyNegativePrefix 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_PY' locale
46 func New() locales.Translator {
47         return &es_PY{
48                 locale:                 "es_PY",
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", "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", "Gs.", "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                 currencyPositivePrefix: " ",
62                 currencyNegativePrefix: " ",
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. 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", "después de Cristo"},
76                 timezones:              map[string]string{"HNPMX": "hora estándar del Pacífico de México", "HECU": "hora de verano de Cuba", "PST": "hora estándar del Pacífico", "LHDT": "hora de verano de Lord Howe", "AEDT": "hora de verano de Australia oriental", "ARST": "hora de verano de Argentina", "ACST": "hora estándar de Australia central", "AKDT": "hora de verano de Alaska", "MESZ": "hora de verano de Europa central", "HENOMX": "hora de verano del noroeste de México", "HEOG": "hora de verano de Groenlandia occidental", "HKT": "hora estándar de Hong Kong", "CHADT": "hora de verano de Chatham", "CST": "hora estándar central", "BOT": "hora de Bolivia", "NZDT": "hora de verano de Nueva Zelanda", "MST": "hora estándar de las Montañas", "WITA": "hora de Indonesia central", "HNOG": "hora estándar de Groenlandia occidental", "SAST": "hora de Sudáfrica", "HNT": "hora estándar de Terranova", "HEEG": "hora de verano de Groenlandia oriental", "HAT": "hora de verano de Terranova", "HAST": "hora estándar de Hawái-Aleutiano", "EAT": "hora de África oriental", "AKST": "hora estándar de Alaska", "SRT": "hora de Surinam", "UYST": "hora de verano de Uruguay", "MDT": "hora de verano de las Montañas", "OEZ": "hora estándar de Europa oriental", "WIT": "hora de Indonesia oriental", "ACWST": "hora estándar de Australia centroccidental", "WART": "hora estándar de Argentina occidental", "ADT": "hora de verano del Atlántico", "HEPMX": "hora de verano del Pacífico de México", "BT": "hora de Bután", "UYT": "hora estándar de Uruguay", "HADT": "hora de verano de Hawái-Aleutiano", "WARST": "hora de verano de Argentina occidental", "GYT": "hora de Guyana", "ACDT": "hora de verano de Australia central", "CAT": "hora de África central", "WIB": "hora de Indonesia occidental", "AST": "hora estándar del Atlántico", "∅∅∅": "hora de verano de las Azores", "AWST": "hora estándar de Australia occidental", "MEZ": "hora estándar de Europa central", "CHAST": "hora estándar de Chatham", "HEPM": "hora de verano de San Pedro y Miquelón", "NZST": "hora estándar de Nueva Zelanda", "OESZ": "hora de verano de Europa oriental", "AEST": "hora estándar de Australia oriental", "CLST": "hora de verano de Chile", "EDT": "hora de verano oriental", "ChST": "hora estándar de Chamorro", "WEZ": "hora estándar de Europa occidental", "WESZ": "hora de verano de Europa occidental", "AWDT": "hora de verano de Australia occidental", "JDT": "hora de verano de Japón", "WAT": "hora estándar de África occidental", "WAST": "hora de verano de África occidental", "GFT": "hora de la Guayana Francesa", "EST": "hora estándar oriental", "MYT": "hora de Malasia", "VET": "hora de Venezuela", "HNNOMX": "hora estándar del noroeste de México", "ART": "hora estándar de Argentina", "HNCU": "hora estándar de Cuba", "ECT": "hora de Ecuador", "CDT": "hora de verano central", "ACWDT": "hora de verano de Australia centroccidental", "HNEG": "hora estándar de Groenlandia oriental", "HKST": "hora de verano de Hong Kong", "CLT": "hora estándar de Chile", "COT": "hora estándar de Colombia", "COST": "hora de verano de Colombia", "TMST": "hora de verano de Turkmenistán", "SGT": "hora de Singapur", "TMT": "hora estándar de Turkmenistán", "PDT": "hora de verano del Pacífico", "LHST": "hora estándar de Lord Howe", "JST": "hora estándar de Japón", "IST": "hora estándar de la India", "GMT": "hora del meridiano de Greenwich", "HNPM": "hora estándar de San Pedro y Miquelón"},
77         }
78 }
79
80 // Locale returns the current translators string locale
81 func (es *es_PY) Locale() string {
82         return es.locale
83 }
84
85 // PluralsCardinal returns the list of cardinal plural rules associated with 'es_PY'
86 func (es *es_PY) PluralsCardinal() []locales.PluralRule {
87         return es.pluralsCardinal
88 }
89
90 // PluralsOrdinal returns the list of ordinal plural rules associated with 'es_PY'
91 func (es *es_PY) PluralsOrdinal() []locales.PluralRule {
92         return es.pluralsOrdinal
93 }
94
95 // PluralsRange returns the list of range plural rules associated with 'es_PY'
96 func (es *es_PY) PluralsRange() []locales.PluralRule {
97         return es.pluralsRange
98 }
99
100 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'es_PY'
101 func (es *es_PY) 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_PY'
113 func (es *es_PY) 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_PY'
118 func (es *es_PY) 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
123 func (es *es_PY) MonthAbbreviated(month time.Month) string {
124         return es.monthsAbbreviated[month]
125 }
126
127 // MonthsAbbreviated returns the locales abbreviated months
128 func (es *es_PY) MonthsAbbreviated() []string {
129         return es.monthsAbbreviated[1:]
130 }
131
132 // MonthNarrow returns the locales narrow month given the 'month' provided
133 func (es *es_PY) MonthNarrow(month time.Month) string {
134         return es.monthsNarrow[month]
135 }
136
137 // MonthsNarrow returns the locales narrow months
138 func (es *es_PY) MonthsNarrow() []string {
139         return es.monthsNarrow[1:]
140 }
141
142 // MonthWide returns the locales wide month given the 'month' provided
143 func (es *es_PY) MonthWide(month time.Month) string {
144         return es.monthsWide[month]
145 }
146
147 // MonthsWide returns the locales wide months
148 func (es *es_PY) MonthsWide() []string {
149         return es.monthsWide[1:]
150 }
151
152 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
153 func (es *es_PY) WeekdayAbbreviated(weekday time.Weekday) string {
154         return es.daysAbbreviated[weekday]
155 }
156
157 // WeekdaysAbbreviated returns the locales abbreviated weekdays
158 func (es *es_PY) WeekdaysAbbreviated() []string {
159         return es.daysAbbreviated
160 }
161
162 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
163 func (es *es_PY) WeekdayNarrow(weekday time.Weekday) string {
164         return es.daysNarrow[weekday]
165 }
166
167 // WeekdaysNarrow returns the locales narrow weekdays
168 func (es *es_PY) WeekdaysNarrow() []string {
169         return es.daysNarrow
170 }
171
172 // WeekdayShort returns the locales short weekday given the 'weekday' provided
173 func (es *es_PY) WeekdayShort(weekday time.Weekday) string {
174         return es.daysShort[weekday]
175 }
176
177 // WeekdaysShort returns the locales short weekdays
178 func (es *es_PY) WeekdaysShort() []string {
179         return es.daysShort
180 }
181
182 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
183 func (es *es_PY) WeekdayWide(weekday time.Weekday) string {
184         return es.daysWide[weekday]
185 }
186
187 // WeekdaysWide returns the locales wide weekdays
188 func (es *es_PY) WeekdaysWide() []string {
189         return es.daysWide
190 }
191
192 // Decimal returns the decimal point of number
193 func (es *es_PY) Decimal() string {
194         return es.decimal
195 }
196
197 // Group returns the group of number
198 func (es *es_PY) Group() string {
199         return es.group
200 }
201
202 // Group returns the minus sign of number
203 func (es *es_PY) Minus() string {
204         return es.minus
205 }
206
207 // FmtNumber returns 'num' with digits/precision of 'v' for 'es_PY' and handles both Whole and Real numbers based on 'v'
208 func (es *es_PY) 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_PY' and handles both Whole and Real numbers based on 'v'
249 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
250 func (es *es_PY) 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_PY'
282 func (es *es_PY) 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         for j := len(symbol) - 1; j >= 0; j-- {
312                 b = append(b, symbol[j])
313         }
314
315         for j := len(es.currencyPositivePrefix) - 1; j >= 0; j-- {
316                 b = append(b, es.currencyPositivePrefix[j])
317         }
318
319         if num < 0 {
320                 b = append(b, es.minus[0])
321         }
322
323         // reverse
324         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
325                 b[i], b[j] = b[j], b[i]
326         }
327
328         if int(v) < 2 {
329
330                 if v == 0 {
331                         b = append(b, es.decimal...)
332                 }
333
334                 for i := 0; i < 2-int(v); i++ {
335                         b = append(b, '0')
336                 }
337         }
338
339         return string(b)
340 }
341
342 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'es_PY'
343 // in accounting notation.
344 func (es *es_PY) FmtAccounting(num float64, v uint64, currency currency.Type) string {
345
346         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
347         symbol := es.currencies[currency]
348         l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
349         count := 0
350         inWhole := v == 0
351         b := make([]byte, 0, l)
352
353         for i := len(s) - 1; i >= 0; i-- {
354
355                 if s[i] == '.' {
356                         b = append(b, es.decimal[0])
357                         inWhole = true
358                         continue
359                 }
360
361                 if inWhole {
362                         if count == 3 {
363                                 b = append(b, es.group[0])
364                                 count = 1
365                         } else {
366                                 count++
367                         }
368                 }
369
370                 b = append(b, s[i])
371         }
372
373         if num < 0 {
374
375                 for j := len(symbol) - 1; j >= 0; j-- {
376                         b = append(b, symbol[j])
377                 }
378
379                 for j := len(es.currencyNegativePrefix) - 1; j >= 0; j-- {
380                         b = append(b, es.currencyNegativePrefix[j])
381                 }
382
383                 b = append(b, es.minus[0])
384
385         } else {
386
387                 for j := len(symbol) - 1; j >= 0; j-- {
388                         b = append(b, symbol[j])
389                 }
390
391                 for j := len(es.currencyPositivePrefix) - 1; j >= 0; j-- {
392                         b = append(b, es.currencyPositivePrefix[j])
393                 }
394
395         }
396
397         // reverse
398         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
399                 b[i], b[j] = b[j], b[i]
400         }
401
402         if int(v) < 2 {
403
404                 if v == 0 {
405                         b = append(b, es.decimal...)
406                 }
407
408                 for i := 0; i < 2-int(v); i++ {
409                         b = append(b, '0')
410                 }
411         }
412
413         return string(b)
414 }
415
416 // FmtDateShort returns the short date representation of 't' for 'es_PY'
417 func (es *es_PY) FmtDateShort(t time.Time) string {
418
419         b := make([]byte, 0, 32)
420
421         b = strconv.AppendInt(b, int64(t.Day()), 10)
422         b = append(b, []byte{0x2f}...)
423         b = strconv.AppendInt(b, int64(t.Month()), 10)
424         b = append(b, []byte{0x2f}...)
425
426         if t.Year() > 9 {
427                 b = append(b, strconv.Itoa(t.Year())[2:]...)
428         } else {
429                 b = append(b, strconv.Itoa(t.Year())[1:]...)
430         }
431
432         return string(b)
433 }
434
435 // FmtDateMedium returns the medium date representation of 't' for 'es_PY'
436 func (es *es_PY) FmtDateMedium(t time.Time) string {
437
438         b := make([]byte, 0, 32)
439
440         b = strconv.AppendInt(b, int64(t.Day()), 10)
441         b = append(b, []byte{0x20}...)
442         b = append(b, es.monthsAbbreviated[t.Month()]...)
443         b = append(b, []byte{0x20}...)
444
445         if t.Year() > 0 {
446                 b = strconv.AppendInt(b, int64(t.Year()), 10)
447         } else {
448                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
449         }
450
451         return string(b)
452 }
453
454 // FmtDateLong returns the long date representation of 't' for 'es_PY'
455 func (es *es_PY) FmtDateLong(t time.Time) string {
456
457         b := make([]byte, 0, 32)
458
459         b = strconv.AppendInt(b, int64(t.Day()), 10)
460         b = append(b, []byte{0x20, 0x64, 0x65}...)
461         b = append(b, []byte{0x20}...)
462         b = append(b, es.monthsWide[t.Month()]...)
463         b = append(b, []byte{0x20, 0x64, 0x65}...)
464         b = append(b, []byte{0x20}...)
465
466         if t.Year() > 0 {
467                 b = strconv.AppendInt(b, int64(t.Year()), 10)
468         } else {
469                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
470         }
471
472         return string(b)
473 }
474
475 // FmtDateFull returns the full date representation of 't' for 'es_PY'
476 func (es *es_PY) FmtDateFull(t time.Time) string {
477
478         b := make([]byte, 0, 32)
479
480         b = append(b, es.daysWide[t.Weekday()]...)
481         b = append(b, []byte{0x2c, 0x20}...)
482         b = strconv.AppendInt(b, int64(t.Day()), 10)
483         b = append(b, []byte{0x20, 0x64, 0x65}...)
484         b = append(b, []byte{0x20}...)
485         b = append(b, es.monthsWide[t.Month()]...)
486         b = append(b, []byte{0x20, 0x64, 0x65}...)
487         b = append(b, []byte{0x20}...)
488
489         if t.Year() > 0 {
490                 b = strconv.AppendInt(b, int64(t.Year()), 10)
491         } else {
492                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
493         }
494
495         return string(b)
496 }
497
498 // FmtTimeShort returns the short time representation of 't' for 'es_PY'
499 func (es *es_PY) FmtTimeShort(t time.Time) string {
500
501         b := make([]byte, 0, 32)
502
503         b = strconv.AppendInt(b, int64(t.Hour()), 10)
504         b = append(b, es.timeSeparator...)
505
506         if t.Minute() < 10 {
507                 b = append(b, '0')
508         }
509
510         b = strconv.AppendInt(b, int64(t.Minute()), 10)
511
512         return string(b)
513 }
514
515 // FmtTimeMedium returns the medium time representation of 't' for 'es_PY'
516 func (es *es_PY) FmtTimeMedium(t time.Time) string {
517
518         b := make([]byte, 0, 32)
519
520         b = strconv.AppendInt(b, int64(t.Hour()), 10)
521         b = append(b, es.timeSeparator...)
522
523         if t.Minute() < 10 {
524                 b = append(b, '0')
525         }
526
527         b = strconv.AppendInt(b, int64(t.Minute()), 10)
528         b = append(b, es.timeSeparator...)
529
530         if t.Second() < 10 {
531                 b = append(b, '0')
532         }
533
534         b = strconv.AppendInt(b, int64(t.Second()), 10)
535
536         return string(b)
537 }
538
539 // FmtTimeLong returns the long time representation of 't' for 'es_PY'
540 func (es *es_PY) FmtTimeLong(t time.Time) string {
541
542         b := make([]byte, 0, 32)
543
544         b = strconv.AppendInt(b, int64(t.Hour()), 10)
545         b = append(b, es.timeSeparator...)
546
547         if t.Minute() < 10 {
548                 b = append(b, '0')
549         }
550
551         b = strconv.AppendInt(b, int64(t.Minute()), 10)
552         b = append(b, es.timeSeparator...)
553
554         if t.Second() < 10 {
555                 b = append(b, '0')
556         }
557
558         b = strconv.AppendInt(b, int64(t.Second()), 10)
559         b = append(b, []byte{0x20}...)
560
561         tz, _ := t.Zone()
562         b = append(b, tz...)
563
564         return string(b)
565 }
566
567 // FmtTimeFull returns the full time representation of 't' for 'es_PY'
568 func (es *es_PY) FmtTimeFull(t time.Time) string {
569
570         b := make([]byte, 0, 32)
571
572         b = strconv.AppendInt(b, int64(t.Hour()), 10)
573         b = append(b, es.timeSeparator...)
574
575         if t.Minute() < 10 {
576                 b = append(b, '0')
577         }
578
579         b = strconv.AppendInt(b, int64(t.Minute()), 10)
580         b = append(b, es.timeSeparator...)
581
582         if t.Second() < 10 {
583                 b = append(b, '0')
584         }
585
586         b = strconv.AppendInt(b, int64(t.Second()), 10)
587         b = append(b, []byte{0x20, 0x28}...)
588
589         tz, _ := t.Zone()
590
591         if btz, ok := es.timezones[tz]; ok {
592                 b = append(b, btz...)
593         } else {
594                 b = append(b, tz...)
595         }
596
597         b = append(b, []byte{0x29}...)
598
599         return string(b)
600 }