OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / go-playground / locales / fr_CA / fr_CA.go
1 package fr_CA
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 fr_CA 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 'fr_CA' locale
46 func New() locales.Translator {
47         return &fr_CA{
48                 locale:                 "fr_CA",
49                 pluralsCardinal:        []locales.PluralRule{2, 6},
50                 pluralsOrdinal:         []locales.PluralRule{2, 6},
51                 pluralsRange:           []locales.PluralRule{2, 6},
52                 decimal:                ",",
53                 group:                  " ",
54                 minus:                  "-",
55                 percent:                "%",
56                 perMille:               "‰",
57                 timeSeparator:          ":",
58                 inifinity:              "∞",
59                 currencies:             []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "$\u00a0AU", "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", "$", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "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", "£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "$\u00a0HK", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "¥", "KES", "KGS", "KHR", "CF", "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", "C$", "NLG", "NOK", "NPR", "$\u00a0NZ", "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", "$\u00a0SG", "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", "$\u00a0US", "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", "ZK", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"},
60                 percentSuffix:          " ",
61                 currencyPositiveSuffix: " mn ",
62                 currencyNegativeSuffix: " mn ",
63                 monthsAbbreviated:      []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juill.", "août", "sept.", "oct.", "nov.", "déc."},
64                 monthsNarrow:           []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"},
65                 monthsWide:             []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"},
66                 daysAbbreviated:        []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."},
67                 daysNarrow:             []string{"D", "L", "M", "M", "J", "V", "S"},
68                 daysShort:              []string{"di", "lu", "ma", "me", "je", "ve", "sa"},
69                 daysWide:               []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"},
70                 periodsAbbreviated:     []string{"a.m.", "p.m."},
71                 periodsNarrow:          []string{"a", "p"},
72                 periodsWide:            []string{"a.m.", "p.m."},
73                 erasAbbreviated:        []string{"", ""},
74                 erasNarrow:             []string{"", ""},
75                 erasWide:               []string{"avant l’ère chrétienne", "de l’ère chrétienne"},
76                 timezones:              map[string]string{"SAST": "heure normale d’Afrique du Sud", "COST": "heure avancée de Colombie", "HNOG": "heure normale de l’Ouest du Groenland", "AWDT": "heure avancée de l’Ouest de l’Australie", "VET": "heure du Venezuela", "HNEG": "heure normale de l’Est du Groenland", "EAT": "Heure d’Afrique orientale", "WEZ": "heure normale d’Europe de l’Ouest", "HECU": "heure avancée de Cuba", "MESZ": "heure avancée d’Europe centrale", "HAST": "heure normale d’Hawaï-Aléoutiennes", "JDT": "heure avancée du Japon", "ADT": "heure avancée de l’Atlantique", "CLT": "heure normale du Chili", "AKDT": "heure avancée de l’Alaska", "SRT": "heure du Suriname", "JST": "heure normale du Japon", "COT": "heure normale de Colombie", "WIB": "heure de l’Ouest indonésien", "MDT": "heure avancée de Macao", "CST": "heure normale du Centre", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "HENOMX": "heure avancée du Nord-Ouest du Mexique", "LHDT": "heure avancée de Lord Howe", "HKST": "heure avancée de Hong Kong", "EST": "heure normale de l’Est", "PDT": "heure avancée du Pacifique", "AEST": "heure normale de l’Est de l’Australie", "∅∅∅": "heure avancée de Brasilia", "ECT": "heure de l’Équateur", "AWST": "heure normale de l’Ouest de l’Australie", "ACWDT": "heure avancée du centre-ouest de l’Australie", "MEZ": "heure normale d’Europe centrale", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "TMT": "heure normale du Turkménistan", "OEZ": "heure normale d’Europe de l’Est", "HEOG": "heure avancée de l’Ouest du Groenland", "HEEG": "heure avancée de l’Est du Groenland", "HNT": "heure normale de Terre-Neuve", "ACST": "heure normale du centre de l’Australie", "CAT": "heure d’Afrique centrale", "BOT": "heure de Bolivie", "WIT": "heure de l’Est indonésien", "MYT": "heure de la Malaisie", "CLST": "heure avancée du Chili", "PST": "heure normale du Pacifique", "UYT": "heure normale de l’Uruguay", "GFT": "heure de Guyane française", "HKT": "heure normale de Hong Kong", "HEPMX": "heure avancée du Pacifique mexicain", "HNCU": "heure normale de Cuba", "ACWST": "heure normale du centre-ouest de l’Australie", "LHST": "heure normale de Lord Howe", "ART": "heure normale d’Argentine", "ARST": "heure avancée de l’Argentine", "WAST": "heure avancée d’Afrique de l’Ouest", "ACDT": "heure avancée du centre de l’Australie", "BT": "heure du Bhoutan", "TMST": "heure avancée du Turkménistan", "HADT": "heure avancée d’Hawaï-Aléoutiennes", "HAT": "heure avancée de Terre-Neuve", "EDT": "heure avancée de l’Est", "GYT": "heure du Guyana", "AKST": "heure normale de l’Alaska", "HNPMX": "heure normale du Pacifique mexicain", "CHADT": "heure avancée des Îles Chatham", "AST": "heure normale de l’Atlantique", "WAT": "heure normale d’Afrique de l’Ouest", "CDT": "heure avancée du Centre", "CHAST": "heure normale des Îles Chatham", "NZST": "heure normale de la Nouvelle-Zélande", "NZDT": "heure avancée de la Nouvelle-Zélande", "WART": "heure normale de l’Ouest argentin", "OESZ": "heure avancée d’Europe de l’Est", "SGT": "heure de Singapour", "ChST": "heure des Chamorro", "HEPM": "heure avancée de Saint-Pierre-et-Miquelon", "UYST": "heure avancée de l’Uruguay", "WARST": "heure avancée de l’Ouest argentin", "WITA": "heure du Centre indonésien", "IST": "heure de l’Inde", "AEDT": "heure avancée de l’Est de l’Australie", "WESZ": "heure avancée d’Europe de l’Ouest", "GMT": "heure moyenne de Greenwich", "MST": "heure normale de Macao"},
77         }
78 }
79
80 // Locale returns the current translators string locale
81 func (fr *fr_CA) Locale() string {
82         return fr.locale
83 }
84
85 // PluralsCardinal returns the list of cardinal plural rules associated with 'fr_CA'
86 func (fr *fr_CA) PluralsCardinal() []locales.PluralRule {
87         return fr.pluralsCardinal
88 }
89
90 // PluralsOrdinal returns the list of ordinal plural rules associated with 'fr_CA'
91 func (fr *fr_CA) PluralsOrdinal() []locales.PluralRule {
92         return fr.pluralsOrdinal
93 }
94
95 // PluralsRange returns the list of range plural rules associated with 'fr_CA'
96 func (fr *fr_CA) PluralsRange() []locales.PluralRule {
97         return fr.pluralsRange
98 }
99
100 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'fr_CA'
101 func (fr *fr_CA) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
102
103         n := math.Abs(num)
104         i := int64(n)
105
106         if i == 0 || i == 1 {
107                 return locales.PluralRuleOne
108         }
109
110         return locales.PluralRuleOther
111 }
112
113 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'fr_CA'
114 func (fr *fr_CA) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
115
116         n := math.Abs(num)
117
118         if n == 1 {
119                 return locales.PluralRuleOne
120         }
121
122         return locales.PluralRuleOther
123 }
124
125 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'fr_CA'
126 func (fr *fr_CA) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
127
128         start := fr.CardinalPluralRule(num1, v1)
129         end := fr.CardinalPluralRule(num2, v2)
130
131         if start == locales.PluralRuleOne && end == locales.PluralRuleOne {
132                 return locales.PluralRuleOne
133         } else if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
134                 return locales.PluralRuleOther
135         }
136
137         return locales.PluralRuleOther
138
139 }
140
141 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
142 func (fr *fr_CA) MonthAbbreviated(month time.Month) string {
143         return fr.monthsAbbreviated[month]
144 }
145
146 // MonthsAbbreviated returns the locales abbreviated months
147 func (fr *fr_CA) MonthsAbbreviated() []string {
148         return fr.monthsAbbreviated[1:]
149 }
150
151 // MonthNarrow returns the locales narrow month given the 'month' provided
152 func (fr *fr_CA) MonthNarrow(month time.Month) string {
153         return fr.monthsNarrow[month]
154 }
155
156 // MonthsNarrow returns the locales narrow months
157 func (fr *fr_CA) MonthsNarrow() []string {
158         return fr.monthsNarrow[1:]
159 }
160
161 // MonthWide returns the locales wide month given the 'month' provided
162 func (fr *fr_CA) MonthWide(month time.Month) string {
163         return fr.monthsWide[month]
164 }
165
166 // MonthsWide returns the locales wide months
167 func (fr *fr_CA) MonthsWide() []string {
168         return fr.monthsWide[1:]
169 }
170
171 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
172 func (fr *fr_CA) WeekdayAbbreviated(weekday time.Weekday) string {
173         return fr.daysAbbreviated[weekday]
174 }
175
176 // WeekdaysAbbreviated returns the locales abbreviated weekdays
177 func (fr *fr_CA) WeekdaysAbbreviated() []string {
178         return fr.daysAbbreviated
179 }
180
181 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
182 func (fr *fr_CA) WeekdayNarrow(weekday time.Weekday) string {
183         return fr.daysNarrow[weekday]
184 }
185
186 // WeekdaysNarrow returns the locales narrow weekdays
187 func (fr *fr_CA) WeekdaysNarrow() []string {
188         return fr.daysNarrow
189 }
190
191 // WeekdayShort returns the locales short weekday given the 'weekday' provided
192 func (fr *fr_CA) WeekdayShort(weekday time.Weekday) string {
193         return fr.daysShort[weekday]
194 }
195
196 // WeekdaysShort returns the locales short weekdays
197 func (fr *fr_CA) WeekdaysShort() []string {
198         return fr.daysShort
199 }
200
201 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
202 func (fr *fr_CA) WeekdayWide(weekday time.Weekday) string {
203         return fr.daysWide[weekday]
204 }
205
206 // WeekdaysWide returns the locales wide weekdays
207 func (fr *fr_CA) WeekdaysWide() []string {
208         return fr.daysWide
209 }
210
211 // Decimal returns the decimal point of number
212 func (fr *fr_CA) Decimal() string {
213         return fr.decimal
214 }
215
216 // Group returns the group of number
217 func (fr *fr_CA) Group() string {
218         return fr.group
219 }
220
221 // Group returns the minus sign of number
222 func (fr *fr_CA) Minus() string {
223         return fr.minus
224 }
225
226 // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_CA' and handles both Whole and Real numbers based on 'v'
227 func (fr *fr_CA) FmtNumber(num float64, v uint64) string {
228
229         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
230         l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3
231         count := 0
232         inWhole := v == 0
233         b := make([]byte, 0, l)
234
235         for i := len(s) - 1; i >= 0; i-- {
236
237                 if s[i] == '.' {
238                         b = append(b, fr.decimal[0])
239                         inWhole = true
240                         continue
241                 }
242
243                 if inWhole {
244                         if count == 3 {
245                                 for j := len(fr.group) - 1; j >= 0; j-- {
246                                         b = append(b, fr.group[j])
247                                 }
248                                 count = 1
249                         } else {
250                                 count++
251                         }
252                 }
253
254                 b = append(b, s[i])
255         }
256
257         if num < 0 {
258                 b = append(b, fr.minus[0])
259         }
260
261         // reverse
262         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
263                 b[i], b[j] = b[j], b[i]
264         }
265
266         return string(b)
267 }
268
269 // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_CA' and handles both Whole and Real numbers based on 'v'
270 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
271 func (fr *fr_CA) FmtPercent(num float64, v uint64) string {
272         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
273         l := len(s) + 5
274         b := make([]byte, 0, l)
275
276         for i := len(s) - 1; i >= 0; i-- {
277
278                 if s[i] == '.' {
279                         b = append(b, fr.decimal[0])
280                         continue
281                 }
282
283                 b = append(b, s[i])
284         }
285
286         if num < 0 {
287                 b = append(b, fr.minus[0])
288         }
289
290         // reverse
291         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
292                 b[i], b[j] = b[j], b[i]
293         }
294
295         b = append(b, fr.percentSuffix...)
296
297         b = append(b, fr.percent...)
298
299         return string(b)
300 }
301
302 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_CA'
303 func (fr *fr_CA) FmtCurrency(num float64, v uint64, currency currency.Type) string {
304
305         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
306         symbol := fr.currencies[currency]
307         l := len(s) + len(symbol) + 8
308
309         b := make([]byte, 0, l)
310
311         for i := len(s) - 1; i >= 0; i-- {
312
313                 if s[i] == '.' {
314                         b = append(b, fr.decimal[0])
315                         continue
316                 }
317
318                 b = append(b, s[i])
319         }
320
321         if num < 0 {
322                 b = append(b, fr.minus[0])
323         }
324
325         // reverse
326         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
327                 b[i], b[j] = b[j], b[i]
328         }
329
330         b = append(b, fr.currencyPositiveSuffix...)
331
332         b = append(b, symbol...)
333
334         return string(b)
335 }
336
337 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_CA'
338 // in accounting notation.
339 func (fr *fr_CA) FmtAccounting(num float64, v uint64, currency currency.Type) string {
340
341         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
342         symbol := fr.currencies[currency]
343         l := len(s) + len(symbol) + 8
344
345         b := make([]byte, 0, l)
346
347         for i := len(s) - 1; i >= 0; i-- {
348
349                 if s[i] == '.' {
350                         b = append(b, fr.decimal[0])
351                         continue
352                 }
353
354                 b = append(b, s[i])
355         }
356
357         if num < 0 {
358
359                 b = append(b, fr.minus[0])
360
361         }
362
363         // reverse
364         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
365                 b[i], b[j] = b[j], b[i]
366         }
367
368         if num < 0 {
369                 b = append(b, fr.currencyNegativeSuffix...)
370                 b = append(b, symbol...)
371         } else {
372
373                 b = append(b, fr.currencyPositiveSuffix...)
374                 b = append(b, symbol...)
375         }
376
377         return string(b)
378 }
379
380 // FmtDateShort returns the short date representation of 't' for 'fr_CA'
381 func (fr *fr_CA) FmtDateShort(t time.Time) string {
382
383         b := make([]byte, 0, 32)
384
385         if t.Year() > 9 {
386                 b = append(b, strconv.Itoa(t.Year())[2:]...)
387         } else {
388                 b = append(b, strconv.Itoa(t.Year())[1:]...)
389         }
390
391         b = append(b, []byte{0x2d}...)
392
393         if t.Month() < 10 {
394                 b = append(b, '0')
395         }
396
397         b = strconv.AppendInt(b, int64(t.Month()), 10)
398
399         b = append(b, []byte{0x2d}...)
400
401         if t.Day() < 10 {
402                 b = append(b, '0')
403         }
404
405         b = strconv.AppendInt(b, int64(t.Day()), 10)
406
407         return string(b)
408 }
409
410 // FmtDateMedium returns the medium date representation of 't' for 'fr_CA'
411 func (fr *fr_CA) FmtDateMedium(t time.Time) string {
412
413         b := make([]byte, 0, 32)
414
415         b = strconv.AppendInt(b, int64(t.Day()), 10)
416         b = append(b, []byte{0x20}...)
417         b = append(b, fr.monthsAbbreviated[t.Month()]...)
418         b = append(b, []byte{0x20}...)
419
420         if t.Year() > 0 {
421                 b = strconv.AppendInt(b, int64(t.Year()), 10)
422         } else {
423                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
424         }
425
426         return string(b)
427 }
428
429 // FmtDateLong returns the long date representation of 't' for 'fr_CA'
430 func (fr *fr_CA) FmtDateLong(t time.Time) string {
431
432         b := make([]byte, 0, 32)
433
434         b = strconv.AppendInt(b, int64(t.Day()), 10)
435         b = append(b, []byte{0x20}...)
436         b = append(b, fr.monthsWide[t.Month()]...)
437         b = append(b, []byte{0x20}...)
438
439         if t.Year() > 0 {
440                 b = strconv.AppendInt(b, int64(t.Year()), 10)
441         } else {
442                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
443         }
444
445         return string(b)
446 }
447
448 // FmtDateFull returns the full date representation of 't' for 'fr_CA'
449 func (fr *fr_CA) FmtDateFull(t time.Time) string {
450
451         b := make([]byte, 0, 32)
452
453         b = append(b, fr.daysWide[t.Weekday()]...)
454         b = append(b, []byte{0x20}...)
455         b = strconv.AppendInt(b, int64(t.Day()), 10)
456         b = append(b, []byte{0x20}...)
457         b = append(b, fr.monthsWide[t.Month()]...)
458         b = append(b, []byte{0x20}...)
459
460         if t.Year() > 0 {
461                 b = strconv.AppendInt(b, int64(t.Year()), 10)
462         } else {
463                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
464         }
465
466         return string(b)
467 }
468
469 // FmtTimeShort returns the short time representation of 't' for 'fr_CA'
470 func (fr *fr_CA) FmtTimeShort(t time.Time) string {
471
472         b := make([]byte, 0, 32)
473
474         if t.Hour() < 10 {
475                 b = append(b, '0')
476         }
477
478         b = strconv.AppendInt(b, int64(t.Hour()), 10)
479         b = append(b, []byte{0x20, 0x68}...)
480         b = append(b, []byte{0x20}...)
481
482         if t.Minute() < 10 {
483                 b = append(b, '0')
484         }
485
486         b = strconv.AppendInt(b, int64(t.Minute()), 10)
487
488         return string(b)
489 }
490
491 // FmtTimeMedium returns the medium time representation of 't' for 'fr_CA'
492 func (fr *fr_CA) FmtTimeMedium(t time.Time) string {
493
494         b := make([]byte, 0, 32)
495
496         if t.Hour() < 10 {
497                 b = append(b, '0')
498         }
499
500         b = strconv.AppendInt(b, int64(t.Hour()), 10)
501         b = append(b, fr.timeSeparator...)
502
503         if t.Minute() < 10 {
504                 b = append(b, '0')
505         }
506
507         b = strconv.AppendInt(b, int64(t.Minute()), 10)
508         b = append(b, fr.timeSeparator...)
509
510         if t.Second() < 10 {
511                 b = append(b, '0')
512         }
513
514         b = strconv.AppendInt(b, int64(t.Second()), 10)
515
516         return string(b)
517 }
518
519 // FmtTimeLong returns the long time representation of 't' for 'fr_CA'
520 func (fr *fr_CA) FmtTimeLong(t time.Time) string {
521
522         b := make([]byte, 0, 32)
523
524         if t.Hour() < 10 {
525                 b = append(b, '0')
526         }
527
528         b = strconv.AppendInt(b, int64(t.Hour()), 10)
529         b = append(b, fr.timeSeparator...)
530
531         if t.Minute() < 10 {
532                 b = append(b, '0')
533         }
534
535         b = strconv.AppendInt(b, int64(t.Minute()), 10)
536         b = append(b, fr.timeSeparator...)
537
538         if t.Second() < 10 {
539                 b = append(b, '0')
540         }
541
542         b = strconv.AppendInt(b, int64(t.Second()), 10)
543         b = append(b, []byte{0x20}...)
544
545         tz, _ := t.Zone()
546         b = append(b, tz...)
547
548         return string(b)
549 }
550
551 // FmtTimeFull returns the full time representation of 't' for 'fr_CA'
552 func (fr *fr_CA) FmtTimeFull(t time.Time) string {
553
554         b := make([]byte, 0, 32)
555
556         if t.Hour() < 10 {
557                 b = append(b, '0')
558         }
559
560         b = strconv.AppendInt(b, int64(t.Hour()), 10)
561         b = append(b, fr.timeSeparator...)
562
563         if t.Minute() < 10 {
564                 b = append(b, '0')
565         }
566
567         b = strconv.AppendInt(b, int64(t.Minute()), 10)
568         b = append(b, fr.timeSeparator...)
569
570         if t.Second() < 10 {
571                 b = append(b, '0')
572         }
573
574         b = strconv.AppendInt(b, int64(t.Second()), 10)
575         b = append(b, []byte{0x20}...)
576
577         tz, _ := t.Zone()
578
579         if btz, ok := fr.timezones[tz]; ok {
580                 b = append(b, btz...)
581         } else {
582                 b = append(b, tz...)
583         }
584
585         return string(b)
586 }