OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / go-playground / locales / cs_CZ / cs_CZ.go
1 package cs_CZ
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 cs_CZ 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 'cs_CZ' locale
46 func New() locales.Translator {
47         return &cs_CZ{
48                 locale:                 "cs_CZ",
49                 pluralsCardinal:        []locales.PluralRule{2, 4, 5, 6},
50                 pluralsOrdinal:         []locales.PluralRule{6},
51                 pluralsRange:           []locales.PluralRule{2, 4, 5, 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{"", "led", "úno", "bře", "dub", "kvě", "čvn", "čvc", "srp", "zář", "říj", "lis", "pro"},
64                 monthsNarrow:           []string{"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"},
65                 monthsWide:             []string{"", "ledna", "února", "března", "dubna", "května", "června", "července", "srpna", "září", "října", "listopadu", "prosince"},
66                 daysAbbreviated:        []string{"ne", "po", "út", "st", "čt", "pá", "so"},
67                 daysNarrow:             []string{"N", "P", "Ú", "S", "Č", "P", "S"},
68                 daysShort:              []string{"ne", "po", "út", "st", "čt", "pá", "so"},
69                 daysWide:               []string{"neděle", "pondělí", "úterý", "středa", "čtvrtek", "pátek", "sobota"},
70                 periodsAbbreviated:     []string{"dop.", "odp."},
71                 periodsNarrow:          []string{"dop.", "odp."},
72                 periodsWide:            []string{"dop.", "odp."},
73                 erasAbbreviated:        []string{"př. n. l.", "n. l."},
74                 erasNarrow:             []string{"př.n.l.", "n.l."},
75                 erasWide:               []string{"př. n. l.", "n. l."},
76                 timezones:              map[string]string{"WEZ": "Západoevropský standardní čas", "HEPM": "Pierre-miquelonský letní čas", "ACWDT": "Středozápadní australský letní čas", "NZDT": "Novozélandský letní čas", "ART": "Argentinský standardní čas", "HKST": "Hongkongský letní čas", "GYT": "Guyanský čas", "HEEG": "Východogrónský letní čas", "CAT": "Středoafrický čas", "HNPM": "Pierre-miquelonský standardní čas", "MESZ": "Středoevropský letní čas", "OESZ": "Východoevropský letní čas", "MST": "Severoamerický horský standardní čas", "WARST": "Západoargentinský letní čas", "VET": "Venezuelský čas", "AWDT": "Západoaustralský letní čas", "MYT": "Malajský čas", "JDT": "Japonský letní čas", "IST": "Indický čas", "ChST": "Chamorrský čas", "AWST": "Západoaustralský standardní čas", "WIB": "Západoindonéský čas", "ACWST": "Středozápadní australský standardní čas", "HAST": "Havajsko-aleutský standardní čas", "HKT": "Hongkongský standardní čas", "ECT": "Ekvádorský čas", "SGT": "Singapurský čas", "HNCU": "Kubánský standardní čas", "LHST": "Standardní čas ostrova lorda Howa", "LHDT": "Letní čas ostrova lorda Howa", "ARST": "Argentinský letní čas", "EDT": "Severoamerický východní letní čas", "GMT": "Greenwichský střední čas", "HENOMX": "Severozápadní mexický letní čas", "AEST": "Východoaustralský standardní čas", "HADT": "Havajsko-aleutský letní čas", "HAT": "Newfoundlandský letní čas", "CLST": "Chilský letní čas", "AKDT": "Aljašský letní čas", "HECU": "Kubánský letní čas", "CST": "Severoamerický centrální standardní čas", "CDT": "Severoamerický centrální letní čas", "SRT": "Surinamský čas", "WIT": "Východoindonéský čas", "ADT": "Atlantický letní čas", "HNEG": "Východogrónský standardní čas", "ACST": "Středoaustralský standardní čas", "BT": "Bhútánský čas", "AST": "Atlantický standardní čas", "SAST": "Jihoafrický čas", "COT": "Kolumbijský standardní čas", "COST": "Kolumbijský letní čas", "ACDT": "Středoaustralský letní čas", "UYST": "Uruguayský letní čas", "PDT": "Severoamerický pacifický letní čas", "UYT": "Uruguayský standardní čas", "MEZ": "Středoevropský standardní čas", "HNOG": "Západogrónský standardní čas", "HNT": "Newfoundlandský standardní čas", "EST": "Severoamerický východní standardní čas", "NZST": "Novozélandský standardní čas", "AEDT": "Východoaustralský letní čas", "CLT": "Chilský standardní čas", "CHADT": "Chathamský letní čas", "BOT": "Bolivijský čas", "CHAST": "Chathamský standardní čas", "WESZ": "Západoevropský letní čas", "HNPMX": "Mexický pacifický standardní čas", "HEPMX": "Mexický pacifický letní čas", "TMST": "Turkmenský letní čas", "WITA": "Středoindonéský čas", "JST": "Japonský standardní čas", "WAST": "Západoafrický letní čas", "GFT": "Francouzskoguyanský čas", "TMT": "Turkmenský standardní čas", "MDT": "Severoamerický horský letní čas", "WART": "Západoargentinský standardní čas", "HEOG": "Západogrónský letní čas", "WAT": "Západoafrický standardní čas", "PST": "Severoamerický pacifický standardní čas", "OEZ": "Východoevropský standardní čas", "HNNOMX": "Severozápadní mexický standardní čas", "∅∅∅": "Azorský letní čas", "EAT": "Východoafrický čas", "AKST": "Aljašský standardní čas"},
77         }
78 }
79
80 // Locale returns the current translators string locale
81 func (cs *cs_CZ) Locale() string {
82         return cs.locale
83 }
84
85 // PluralsCardinal returns the list of cardinal plural rules associated with 'cs_CZ'
86 func (cs *cs_CZ) PluralsCardinal() []locales.PluralRule {
87         return cs.pluralsCardinal
88 }
89
90 // PluralsOrdinal returns the list of ordinal plural rules associated with 'cs_CZ'
91 func (cs *cs_CZ) PluralsOrdinal() []locales.PluralRule {
92         return cs.pluralsOrdinal
93 }
94
95 // PluralsRange returns the list of range plural rules associated with 'cs_CZ'
96 func (cs *cs_CZ) PluralsRange() []locales.PluralRule {
97         return cs.pluralsRange
98 }
99
100 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'cs_CZ'
101 func (cs *cs_CZ) 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         } else if i >= 2 && i <= 4 && v == 0 {
109                 return locales.PluralRuleFew
110         } else if v != 0 {
111                 return locales.PluralRuleMany
112         }
113
114         return locales.PluralRuleOther
115 }
116
117 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'cs_CZ'
118 func (cs *cs_CZ) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
119         return locales.PluralRuleOther
120 }
121
122 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'cs_CZ'
123 func (cs *cs_CZ) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
124
125         start := cs.CardinalPluralRule(num1, v1)
126         end := cs.CardinalPluralRule(num2, v2)
127
128         if start == locales.PluralRuleOne && end == locales.PluralRuleFew {
129                 return locales.PluralRuleFew
130         } else if start == locales.PluralRuleOne && end == locales.PluralRuleMany {
131                 return locales.PluralRuleMany
132         } else if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
133                 return locales.PluralRuleOther
134         } else if start == locales.PluralRuleFew && end == locales.PluralRuleFew {
135                 return locales.PluralRuleFew
136         } else if start == locales.PluralRuleFew && end == locales.PluralRuleMany {
137                 return locales.PluralRuleMany
138         } else if start == locales.PluralRuleFew && end == locales.PluralRuleOther {
139                 return locales.PluralRuleOther
140         } else if start == locales.PluralRuleMany && end == locales.PluralRuleOne {
141                 return locales.PluralRuleOne
142         } else if start == locales.PluralRuleMany && end == locales.PluralRuleFew {
143                 return locales.PluralRuleFew
144         } else if start == locales.PluralRuleMany && end == locales.PluralRuleMany {
145                 return locales.PluralRuleMany
146         } else if start == locales.PluralRuleMany && end == locales.PluralRuleOther {
147                 return locales.PluralRuleOther
148         } else if start == locales.PluralRuleOther && end == locales.PluralRuleOne {
149                 return locales.PluralRuleOne
150         } else if start == locales.PluralRuleOther && end == locales.PluralRuleFew {
151                 return locales.PluralRuleFew
152         } else if start == locales.PluralRuleOther && end == locales.PluralRuleMany {
153                 return locales.PluralRuleMany
154         }
155
156         return locales.PluralRuleOther
157
158 }
159
160 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
161 func (cs *cs_CZ) MonthAbbreviated(month time.Month) string {
162         return cs.monthsAbbreviated[month]
163 }
164
165 // MonthsAbbreviated returns the locales abbreviated months
166 func (cs *cs_CZ) MonthsAbbreviated() []string {
167         return cs.monthsAbbreviated[1:]
168 }
169
170 // MonthNarrow returns the locales narrow month given the 'month' provided
171 func (cs *cs_CZ) MonthNarrow(month time.Month) string {
172         return cs.monthsNarrow[month]
173 }
174
175 // MonthsNarrow returns the locales narrow months
176 func (cs *cs_CZ) MonthsNarrow() []string {
177         return cs.monthsNarrow[1:]
178 }
179
180 // MonthWide returns the locales wide month given the 'month' provided
181 func (cs *cs_CZ) MonthWide(month time.Month) string {
182         return cs.monthsWide[month]
183 }
184
185 // MonthsWide returns the locales wide months
186 func (cs *cs_CZ) MonthsWide() []string {
187         return cs.monthsWide[1:]
188 }
189
190 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
191 func (cs *cs_CZ) WeekdayAbbreviated(weekday time.Weekday) string {
192         return cs.daysAbbreviated[weekday]
193 }
194
195 // WeekdaysAbbreviated returns the locales abbreviated weekdays
196 func (cs *cs_CZ) WeekdaysAbbreviated() []string {
197         return cs.daysAbbreviated
198 }
199
200 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
201 func (cs *cs_CZ) WeekdayNarrow(weekday time.Weekday) string {
202         return cs.daysNarrow[weekday]
203 }
204
205 // WeekdaysNarrow returns the locales narrow weekdays
206 func (cs *cs_CZ) WeekdaysNarrow() []string {
207         return cs.daysNarrow
208 }
209
210 // WeekdayShort returns the locales short weekday given the 'weekday' provided
211 func (cs *cs_CZ) WeekdayShort(weekday time.Weekday) string {
212         return cs.daysShort[weekday]
213 }
214
215 // WeekdaysShort returns the locales short weekdays
216 func (cs *cs_CZ) WeekdaysShort() []string {
217         return cs.daysShort
218 }
219
220 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
221 func (cs *cs_CZ) WeekdayWide(weekday time.Weekday) string {
222         return cs.daysWide[weekday]
223 }
224
225 // WeekdaysWide returns the locales wide weekdays
226 func (cs *cs_CZ) WeekdaysWide() []string {
227         return cs.daysWide
228 }
229
230 // Decimal returns the decimal point of number
231 func (cs *cs_CZ) Decimal() string {
232         return cs.decimal
233 }
234
235 // Group returns the group of number
236 func (cs *cs_CZ) Group() string {
237         return cs.group
238 }
239
240 // Group returns the minus sign of number
241 func (cs *cs_CZ) Minus() string {
242         return cs.minus
243 }
244
245 // FmtNumber returns 'num' with digits/precision of 'v' for 'cs_CZ' and handles both Whole and Real numbers based on 'v'
246 func (cs *cs_CZ) FmtNumber(num float64, v uint64) string {
247
248         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
249         l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3
250         count := 0
251         inWhole := v == 0
252         b := make([]byte, 0, l)
253
254         for i := len(s) - 1; i >= 0; i-- {
255
256                 if s[i] == '.' {
257                         b = append(b, cs.decimal[0])
258                         inWhole = true
259                         continue
260                 }
261
262                 if inWhole {
263                         if count == 3 {
264                                 for j := len(cs.group) - 1; j >= 0; j-- {
265                                         b = append(b, cs.group[j])
266                                 }
267                                 count = 1
268                         } else {
269                                 count++
270                         }
271                 }
272
273                 b = append(b, s[i])
274         }
275
276         if num < 0 {
277                 b = append(b, cs.minus[0])
278         }
279
280         // reverse
281         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
282                 b[i], b[j] = b[j], b[i]
283         }
284
285         return string(b)
286 }
287
288 // FmtPercent returns 'num' with digits/precision of 'v' for 'cs_CZ' and handles both Whole and Real numbers based on 'v'
289 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
290 func (cs *cs_CZ) FmtPercent(num float64, v uint64) string {
291         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
292         l := len(s) + 5
293         b := make([]byte, 0, l)
294
295         for i := len(s) - 1; i >= 0; i-- {
296
297                 if s[i] == '.' {
298                         b = append(b, cs.decimal[0])
299                         continue
300                 }
301
302                 b = append(b, s[i])
303         }
304
305         if num < 0 {
306                 b = append(b, cs.minus[0])
307         }
308
309         // reverse
310         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
311                 b[i], b[j] = b[j], b[i]
312         }
313
314         b = append(b, cs.percentSuffix...)
315
316         b = append(b, cs.percent...)
317
318         return string(b)
319 }
320
321 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'cs_CZ'
322 func (cs *cs_CZ) FmtCurrency(num float64, v uint64, currency currency.Type) string {
323
324         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
325         symbol := cs.currencies[currency]
326         l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3
327         count := 0
328         inWhole := v == 0
329         b := make([]byte, 0, l)
330
331         for i := len(s) - 1; i >= 0; i-- {
332
333                 if s[i] == '.' {
334                         b = append(b, cs.decimal[0])
335                         inWhole = true
336                         continue
337                 }
338
339                 if inWhole {
340                         if count == 3 {
341                                 for j := len(cs.group) - 1; j >= 0; j-- {
342                                         b = append(b, cs.group[j])
343                                 }
344                                 count = 1
345                         } else {
346                                 count++
347                         }
348                 }
349
350                 b = append(b, s[i])
351         }
352
353         if num < 0 {
354                 b = append(b, cs.minus[0])
355         }
356
357         // reverse
358         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
359                 b[i], b[j] = b[j], b[i]
360         }
361
362         if int(v) < 2 {
363
364                 if v == 0 {
365                         b = append(b, cs.decimal...)
366                 }
367
368                 for i := 0; i < 2-int(v); i++ {
369                         b = append(b, '0')
370                 }
371         }
372
373         b = append(b, cs.currencyPositiveSuffix...)
374
375         b = append(b, symbol...)
376
377         return string(b)
378 }
379
380 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'cs_CZ'
381 // in accounting notation.
382 func (cs *cs_CZ) FmtAccounting(num float64, v uint64, currency currency.Type) string {
383
384         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
385         symbol := cs.currencies[currency]
386         l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3
387         count := 0
388         inWhole := v == 0
389         b := make([]byte, 0, l)
390
391         for i := len(s) - 1; i >= 0; i-- {
392
393                 if s[i] == '.' {
394                         b = append(b, cs.decimal[0])
395                         inWhole = true
396                         continue
397                 }
398
399                 if inWhole {
400                         if count == 3 {
401                                 for j := len(cs.group) - 1; j >= 0; j-- {
402                                         b = append(b, cs.group[j])
403                                 }
404                                 count = 1
405                         } else {
406                                 count++
407                         }
408                 }
409
410                 b = append(b, s[i])
411         }
412
413         if num < 0 {
414
415                 b = append(b, cs.minus[0])
416
417         }
418
419         // reverse
420         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
421                 b[i], b[j] = b[j], b[i]
422         }
423
424         if int(v) < 2 {
425
426                 if v == 0 {
427                         b = append(b, cs.decimal...)
428                 }
429
430                 for i := 0; i < 2-int(v); i++ {
431                         b = append(b, '0')
432                 }
433         }
434
435         if num < 0 {
436                 b = append(b, cs.currencyNegativeSuffix...)
437                 b = append(b, symbol...)
438         } else {
439
440                 b = append(b, cs.currencyPositiveSuffix...)
441                 b = append(b, symbol...)
442         }
443
444         return string(b)
445 }
446
447 // FmtDateShort returns the short date representation of 't' for 'cs_CZ'
448 func (cs *cs_CZ) FmtDateShort(t time.Time) string {
449
450         b := make([]byte, 0, 32)
451
452         if t.Day() < 10 {
453                 b = append(b, '0')
454         }
455
456         b = strconv.AppendInt(b, int64(t.Day()), 10)
457         b = append(b, []byte{0x2e}...)
458
459         if t.Month() < 10 {
460                 b = append(b, '0')
461         }
462
463         b = strconv.AppendInt(b, int64(t.Month()), 10)
464
465         b = append(b, []byte{0x2e}...)
466
467         if t.Year() > 9 {
468                 b = append(b, strconv.Itoa(t.Year())[2:]...)
469         } else {
470                 b = append(b, strconv.Itoa(t.Year())[1:]...)
471         }
472
473         return string(b)
474 }
475
476 // FmtDateMedium returns the medium date representation of 't' for 'cs_CZ'
477 func (cs *cs_CZ) FmtDateMedium(t time.Time) string {
478
479         b := make([]byte, 0, 32)
480
481         b = strconv.AppendInt(b, int64(t.Day()), 10)
482         b = append(b, []byte{0x2e, 0x20}...)
483         b = strconv.AppendInt(b, int64(t.Month()), 10)
484         b = append(b, []byte{0x2e, 0x20}...)
485
486         if t.Year() > 0 {
487                 b = strconv.AppendInt(b, int64(t.Year()), 10)
488         } else {
489                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
490         }
491
492         return string(b)
493 }
494
495 // FmtDateLong returns the long date representation of 't' for 'cs_CZ'
496 func (cs *cs_CZ) FmtDateLong(t time.Time) string {
497
498         b := make([]byte, 0, 32)
499
500         b = strconv.AppendInt(b, int64(t.Day()), 10)
501         b = append(b, []byte{0x2e, 0x20}...)
502         b = append(b, cs.monthsWide[t.Month()]...)
503         b = append(b, []byte{0x20}...)
504
505         if t.Year() > 0 {
506                 b = strconv.AppendInt(b, int64(t.Year()), 10)
507         } else {
508                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
509         }
510
511         return string(b)
512 }
513
514 // FmtDateFull returns the full date representation of 't' for 'cs_CZ'
515 func (cs *cs_CZ) FmtDateFull(t time.Time) string {
516
517         b := make([]byte, 0, 32)
518
519         b = append(b, cs.daysWide[t.Weekday()]...)
520         b = append(b, []byte{0x20}...)
521         b = strconv.AppendInt(b, int64(t.Day()), 10)
522         b = append(b, []byte{0x2e, 0x20}...)
523         b = append(b, cs.monthsWide[t.Month()]...)
524         b = append(b, []byte{0x20}...)
525
526         if t.Year() > 0 {
527                 b = strconv.AppendInt(b, int64(t.Year()), 10)
528         } else {
529                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
530         }
531
532         return string(b)
533 }
534
535 // FmtTimeShort returns the short time representation of 't' for 'cs_CZ'
536 func (cs *cs_CZ) FmtTimeShort(t time.Time) string {
537
538         b := make([]byte, 0, 32)
539
540         b = strconv.AppendInt(b, int64(t.Hour()), 10)
541         b = append(b, cs.timeSeparator...)
542
543         if t.Minute() < 10 {
544                 b = append(b, '0')
545         }
546
547         b = strconv.AppendInt(b, int64(t.Minute()), 10)
548
549         return string(b)
550 }
551
552 // FmtTimeMedium returns the medium time representation of 't' for 'cs_CZ'
553 func (cs *cs_CZ) FmtTimeMedium(t time.Time) string {
554
555         b := make([]byte, 0, 32)
556
557         b = strconv.AppendInt(b, int64(t.Hour()), 10)
558         b = append(b, cs.timeSeparator...)
559
560         if t.Minute() < 10 {
561                 b = append(b, '0')
562         }
563
564         b = strconv.AppendInt(b, int64(t.Minute()), 10)
565         b = append(b, cs.timeSeparator...)
566
567         if t.Second() < 10 {
568                 b = append(b, '0')
569         }
570
571         b = strconv.AppendInt(b, int64(t.Second()), 10)
572
573         return string(b)
574 }
575
576 // FmtTimeLong returns the long time representation of 't' for 'cs_CZ'
577 func (cs *cs_CZ) FmtTimeLong(t time.Time) string {
578
579         b := make([]byte, 0, 32)
580
581         b = strconv.AppendInt(b, int64(t.Hour()), 10)
582         b = append(b, cs.timeSeparator...)
583
584         if t.Minute() < 10 {
585                 b = append(b, '0')
586         }
587
588         b = strconv.AppendInt(b, int64(t.Minute()), 10)
589         b = append(b, cs.timeSeparator...)
590
591         if t.Second() < 10 {
592                 b = append(b, '0')
593         }
594
595         b = strconv.AppendInt(b, int64(t.Second()), 10)
596         b = append(b, []byte{0x20}...)
597
598         tz, _ := t.Zone()
599         b = append(b, tz...)
600
601         return string(b)
602 }
603
604 // FmtTimeFull returns the full time representation of 't' for 'cs_CZ'
605 func (cs *cs_CZ) FmtTimeFull(t time.Time) string {
606
607         b := make([]byte, 0, 32)
608
609         b = strconv.AppendInt(b, int64(t.Hour()), 10)
610         b = append(b, cs.timeSeparator...)
611
612         if t.Minute() < 10 {
613                 b = append(b, '0')
614         }
615
616         b = strconv.AppendInt(b, int64(t.Minute()), 10)
617         b = append(b, cs.timeSeparator...)
618
619         if t.Second() < 10 {
620                 b = append(b, '0')
621         }
622
623         b = strconv.AppendInt(b, int64(t.Second()), 10)
624         b = append(b, []byte{0x20}...)
625
626         tz, _ := t.Zone()
627
628         if btz, ok := cs.timezones[tz]; ok {
629                 b = append(b, btz...)
630         } else {
631                 b = append(b, tz...)
632         }
633
634         return string(b)
635 }