OSDN Git Service

delete miner
[bytom/vapor.git] / vendor / github.com / go-playground / locales / fr_TN / fr_TN.go
1 package fr_TN
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_TN 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         currencyNegativePrefix string
28         currencyNegativeSuffix string
29         monthsAbbreviated      []string
30         monthsNarrow           []string
31         monthsWide             []string
32         daysAbbreviated        []string
33         daysNarrow             []string
34         daysShort              []string
35         daysWide               []string
36         periodsAbbreviated     []string
37         periodsNarrow          []string
38         periodsShort           []string
39         periodsWide            []string
40         erasAbbreviated        []string
41         erasNarrow             []string
42         erasWide               []string
43         timezones              map[string]string
44 }
45
46 // New returns a new instance of translator for the 'fr_TN' locale
47 func New() locales.Translator {
48         return &fr_TN{
49                 locale:                 "fr_TN",
50                 pluralsCardinal:        []locales.PluralRule{2, 6},
51                 pluralsOrdinal:         []locales.PluralRule{2, 6},
52                 pluralsRange:           []locales.PluralRule{2, 6},
53                 decimal:                ",",
54                 group:                  " ",
55                 minus:                  "-",
56                 percent:                "%",
57                 perMille:               "‰",
58                 timeSeparator:          ":",
59                 inifinity:              "∞",
60                 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", "DT", "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"},
61                 percentSuffix:          " ",
62                 currencyPositiveSuffix: " ",
63                 currencyNegativePrefix: "(",
64                 currencyNegativeSuffix: " )",
65                 monthsAbbreviated:      []string{"", "janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."},
66                 monthsNarrow:           []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"},
67                 monthsWide:             []string{"", "janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"},
68                 daysAbbreviated:        []string{"dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."},
69                 daysNarrow:             []string{"D", "L", "M", "M", "J", "V", "S"},
70                 daysShort:              []string{"di", "lu", "ma", "me", "je", "ve", "sa"},
71                 daysWide:               []string{"dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"},
72                 periodsAbbreviated:     []string{"AM", "PM"},
73                 periodsNarrow:          []string{"AM", "PM"},
74                 periodsWide:            []string{"AM", "PM"},
75                 erasAbbreviated:        []string{"av. J.-C.", "ap. J.-C."},
76                 erasNarrow:             []string{"av. J.-C.", "ap. J.-C."},
77                 erasWide:               []string{"avant Jésus-Christ", "après Jésus-Christ"},
78                 timezones:              map[string]string{"HKST": "heure d’été de Hong Kong", "COT": "heure normale de Colombie", "WIB": "heure de l’Ouest indonésien", "NZST": "heure normale de la Nouvelle-Zélande", "AEDT": "heure d’été de l’Est de l’Australie", "GFT": "heure de la Guyane française", "SGT": "heure de Singapour", "OESZ": "heure d’été d’Europe de l’Est", "WART": "heure normale de l’Ouest argentin", "VET": "heure du Venezuela", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "CST": "heure normale du centre nord-américain", "AWST": "heure normale de l’Ouest de l’Australie", "ACWDT": "heure d’été du centre-ouest de l’Australie", "HKT": "heure normale de Hong Kong", "ACDT": "heure d’été du centre de l’Australie", "CHAST": "heure normale des îles Chatham", "UYT": "heure normale de l’Uruguay", "ART": "heure normale d’Argentine", "HAST": "heure normale d’Hawaii - Aléoutiennes", "JDT": "heure d’été du Japon", "LHST": "heure normale de Lord Howe", "HECU": "heure d’été de Cuba", "NZDT": "heure d’été de la Nouvelle-Zélande", "JST": "heure normale du Japon", "∅∅∅": "heure d’été des Açores", "HNEG": "heure normale de l’Est du Groenland", "CDT": "heure d’été du Centre", "ACWST": "heure normale du centre-ouest de l’Australie", "WITA": "heure du Centre indonésien", "HEOG": "heure d’été de l’Ouest du Groenland", "HEPMX": "heure d’été du Pacifique mexicain", "PDT": "heure d’été du Pacifique", "ADT": "heure d’été de l’Atlantique", "CLST": "heure d’été du Chili", "COST": "heure d’été de Colombie", "AKDT": "heure d’été de l’Alaska", "WIT": "heure de l’Est indonésien", "WARST": "heure d’été de l’Ouest argentin", "WAT": "heure normale d’Afrique de l’Ouest", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "UYST": "heure d’été de l’Uruguay", "BT": "heure du Bhoutan", "SRT": "heure du Suriname", "OEZ": "heure normale d’Europe de l’Est", "EAT": "heure normale d’Afrique de l’Est", "GYT": "heure du Guyana", "AKST": "heure normale de l’Alaska", "PST": "heure normale du Pacifique nord-américain", "HNPMX": "heure normale du Pacifique mexicain", "MESZ": "heure d’été d’Europe centrale", "MST": "heure normale des Rocheuses", "HAT": "heure d’été de Terre-Neuve", "ACST": "heure normale du centre de l’Australie", "WEZ": "heure normale d’Europe de l’Ouest", "ChST": "heure des Chamorro", "WESZ": "heure d’été d’Europe de l’Ouest", "HNCU": "heure normale de Cuba", "MYT": "heure de la Malaisie", "AST": "heure normale de l’Atlantique", "HEEG": "heure d’été de l’Est du Groenland", "EST": "heure normale de l’Est nord-américain", "ECT": "heure de l’Équateur", "CAT": "heure normale d’Afrique centrale", "TMST": "heure d’été du Turkménistan", "LHDT": "heure d’été de Lord Howe", "WAST": "heure d’été d’Afrique de l’Ouest", "CLT": "heure normale du Chili", "CHADT": "heure d’été des îles Chatham", "TMT": "heure normale du Turkménistan", "ARST": "heure d’été de l’Argentine", "HNT": "heure normale de Terre-Neuve", "AWDT": "heure d’été de l’Ouest de l’Australie", "EDT": "heure d’été de l’Est", "GMT": "heure moyenne de Greenwich", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "MDT": "heure d’été des Rocheuses", "IST": "heure de l’Inde", "AEST": "heure normale de l’Est de l’Australie", "HNOG": "heure normale de l’Ouest du Groenland", "SAST": "heure normale d’Afrique méridionale", "BOT": "heure de Bolivie", "MEZ": "heure normale d’Europe centrale", "HADT": "heure d’été d’Hawaii - Aléoutiennes"},
79         }
80 }
81
82 // Locale returns the current translators string locale
83 func (fr *fr_TN) Locale() string {
84         return fr.locale
85 }
86
87 // PluralsCardinal returns the list of cardinal plural rules associated with 'fr_TN'
88 func (fr *fr_TN) PluralsCardinal() []locales.PluralRule {
89         return fr.pluralsCardinal
90 }
91
92 // PluralsOrdinal returns the list of ordinal plural rules associated with 'fr_TN'
93 func (fr *fr_TN) PluralsOrdinal() []locales.PluralRule {
94         return fr.pluralsOrdinal
95 }
96
97 // PluralsRange returns the list of range plural rules associated with 'fr_TN'
98 func (fr *fr_TN) PluralsRange() []locales.PluralRule {
99         return fr.pluralsRange
100 }
101
102 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'fr_TN'
103 func (fr *fr_TN) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
104
105         n := math.Abs(num)
106         i := int64(n)
107
108         if i == 0 || i == 1 {
109                 return locales.PluralRuleOne
110         }
111
112         return locales.PluralRuleOther
113 }
114
115 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'fr_TN'
116 func (fr *fr_TN) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
117
118         n := math.Abs(num)
119
120         if n == 1 {
121                 return locales.PluralRuleOne
122         }
123
124         return locales.PluralRuleOther
125 }
126
127 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'fr_TN'
128 func (fr *fr_TN) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
129
130         start := fr.CardinalPluralRule(num1, v1)
131         end := fr.CardinalPluralRule(num2, v2)
132
133         if start == locales.PluralRuleOne && end == locales.PluralRuleOne {
134                 return locales.PluralRuleOne
135         } else if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
136                 return locales.PluralRuleOther
137         }
138
139         return locales.PluralRuleOther
140
141 }
142
143 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
144 func (fr *fr_TN) MonthAbbreviated(month time.Month) string {
145         return fr.monthsAbbreviated[month]
146 }
147
148 // MonthsAbbreviated returns the locales abbreviated months
149 func (fr *fr_TN) MonthsAbbreviated() []string {
150         return fr.monthsAbbreviated[1:]
151 }
152
153 // MonthNarrow returns the locales narrow month given the 'month' provided
154 func (fr *fr_TN) MonthNarrow(month time.Month) string {
155         return fr.monthsNarrow[month]
156 }
157
158 // MonthsNarrow returns the locales narrow months
159 func (fr *fr_TN) MonthsNarrow() []string {
160         return fr.monthsNarrow[1:]
161 }
162
163 // MonthWide returns the locales wide month given the 'month' provided
164 func (fr *fr_TN) MonthWide(month time.Month) string {
165         return fr.monthsWide[month]
166 }
167
168 // MonthsWide returns the locales wide months
169 func (fr *fr_TN) MonthsWide() []string {
170         return fr.monthsWide[1:]
171 }
172
173 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
174 func (fr *fr_TN) WeekdayAbbreviated(weekday time.Weekday) string {
175         return fr.daysAbbreviated[weekday]
176 }
177
178 // WeekdaysAbbreviated returns the locales abbreviated weekdays
179 func (fr *fr_TN) WeekdaysAbbreviated() []string {
180         return fr.daysAbbreviated
181 }
182
183 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
184 func (fr *fr_TN) WeekdayNarrow(weekday time.Weekday) string {
185         return fr.daysNarrow[weekday]
186 }
187
188 // WeekdaysNarrow returns the locales narrow weekdays
189 func (fr *fr_TN) WeekdaysNarrow() []string {
190         return fr.daysNarrow
191 }
192
193 // WeekdayShort returns the locales short weekday given the 'weekday' provided
194 func (fr *fr_TN) WeekdayShort(weekday time.Weekday) string {
195         return fr.daysShort[weekday]
196 }
197
198 // WeekdaysShort returns the locales short weekdays
199 func (fr *fr_TN) WeekdaysShort() []string {
200         return fr.daysShort
201 }
202
203 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
204 func (fr *fr_TN) WeekdayWide(weekday time.Weekday) string {
205         return fr.daysWide[weekday]
206 }
207
208 // WeekdaysWide returns the locales wide weekdays
209 func (fr *fr_TN) WeekdaysWide() []string {
210         return fr.daysWide
211 }
212
213 // Decimal returns the decimal point of number
214 func (fr *fr_TN) Decimal() string {
215         return fr.decimal
216 }
217
218 // Group returns the group of number
219 func (fr *fr_TN) Group() string {
220         return fr.group
221 }
222
223 // Group returns the minus sign of number
224 func (fr *fr_TN) Minus() string {
225         return fr.minus
226 }
227
228 // FmtNumber returns 'num' with digits/precision of 'v' for 'fr_TN' and handles both Whole and Real numbers based on 'v'
229 func (fr *fr_TN) FmtNumber(num float64, v uint64) string {
230
231         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
232         l := len(s) + 2 + 2*len(s[:len(s)-int(v)-1])/3
233         count := 0
234         inWhole := v == 0
235         b := make([]byte, 0, l)
236
237         for i := len(s) - 1; i >= 0; i-- {
238
239                 if s[i] == '.' {
240                         b = append(b, fr.decimal[0])
241                         inWhole = true
242                         continue
243                 }
244
245                 if inWhole {
246                         if count == 3 {
247                                 for j := len(fr.group) - 1; j >= 0; j-- {
248                                         b = append(b, fr.group[j])
249                                 }
250                                 count = 1
251                         } else {
252                                 count++
253                         }
254                 }
255
256                 b = append(b, s[i])
257         }
258
259         if num < 0 {
260                 b = append(b, fr.minus[0])
261         }
262
263         // reverse
264         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
265                 b[i], b[j] = b[j], b[i]
266         }
267
268         return string(b)
269 }
270
271 // FmtPercent returns 'num' with digits/precision of 'v' for 'fr_TN' and handles both Whole and Real numbers based on 'v'
272 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
273 func (fr *fr_TN) FmtPercent(num float64, v uint64) string {
274         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
275         l := len(s) + 5
276         b := make([]byte, 0, l)
277
278         for i := len(s) - 1; i >= 0; i-- {
279
280                 if s[i] == '.' {
281                         b = append(b, fr.decimal[0])
282                         continue
283                 }
284
285                 b = append(b, s[i])
286         }
287
288         if num < 0 {
289                 b = append(b, fr.minus[0])
290         }
291
292         // reverse
293         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
294                 b[i], b[j] = b[j], b[i]
295         }
296
297         b = append(b, fr.percentSuffix...)
298
299         b = append(b, fr.percent...)
300
301         return string(b)
302 }
303
304 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'fr_TN'
305 func (fr *fr_TN) FmtCurrency(num float64, v uint64, currency currency.Type) string {
306
307         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
308         symbol := fr.currencies[currency]
309         l := len(s) + len(symbol) + 4 + 2*len(s[:len(s)-int(v)-1])/3
310         count := 0
311         inWhole := v == 0
312         b := make([]byte, 0, l)
313
314         for i := len(s) - 1; i >= 0; i-- {
315
316                 if s[i] == '.' {
317                         b = append(b, fr.decimal[0])
318                         inWhole = true
319                         continue
320                 }
321
322                 if inWhole {
323                         if count == 3 {
324                                 for j := len(fr.group) - 1; j >= 0; j-- {
325                                         b = append(b, fr.group[j])
326                                 }
327                                 count = 1
328                         } else {
329                                 count++
330                         }
331                 }
332
333                 b = append(b, s[i])
334         }
335
336         if num < 0 {
337                 b = append(b, fr.minus[0])
338         }
339
340         // reverse
341         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
342                 b[i], b[j] = b[j], b[i]
343         }
344
345         if int(v) < 2 {
346
347                 if v == 0 {
348                         b = append(b, fr.decimal...)
349                 }
350
351                 for i := 0; i < 2-int(v); i++ {
352                         b = append(b, '0')
353                 }
354         }
355
356         b = append(b, fr.currencyPositiveSuffix...)
357
358         b = append(b, symbol...)
359
360         return string(b)
361 }
362
363 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'fr_TN'
364 // in accounting notation.
365 func (fr *fr_TN) FmtAccounting(num float64, v uint64, currency currency.Type) string {
366
367         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
368         symbol := fr.currencies[currency]
369         l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3
370         count := 0
371         inWhole := v == 0
372         b := make([]byte, 0, l)
373
374         for i := len(s) - 1; i >= 0; i-- {
375
376                 if s[i] == '.' {
377                         b = append(b, fr.decimal[0])
378                         inWhole = true
379                         continue
380                 }
381
382                 if inWhole {
383                         if count == 3 {
384                                 for j := len(fr.group) - 1; j >= 0; j-- {
385                                         b = append(b, fr.group[j])
386                                 }
387                                 count = 1
388                         } else {
389                                 count++
390                         }
391                 }
392
393                 b = append(b, s[i])
394         }
395
396         if num < 0 {
397
398                 b = append(b, fr.currencyNegativePrefix[0])
399
400         }
401
402         // reverse
403         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
404                 b[i], b[j] = b[j], b[i]
405         }
406
407         if int(v) < 2 {
408
409                 if v == 0 {
410                         b = append(b, fr.decimal...)
411                 }
412
413                 for i := 0; i < 2-int(v); i++ {
414                         b = append(b, '0')
415                 }
416         }
417
418         if num < 0 {
419                 b = append(b, fr.currencyNegativeSuffix...)
420                 b = append(b, symbol...)
421         } else {
422
423                 b = append(b, fr.currencyPositiveSuffix...)
424                 b = append(b, symbol...)
425         }
426
427         return string(b)
428 }
429
430 // FmtDateShort returns the short date representation of 't' for 'fr_TN'
431 func (fr *fr_TN) FmtDateShort(t time.Time) string {
432
433         b := make([]byte, 0, 32)
434
435         if t.Day() < 10 {
436                 b = append(b, '0')
437         }
438
439         b = strconv.AppendInt(b, int64(t.Day()), 10)
440         b = append(b, []byte{0x2f}...)
441
442         if t.Month() < 10 {
443                 b = append(b, '0')
444         }
445
446         b = strconv.AppendInt(b, int64(t.Month()), 10)
447
448         b = append(b, []byte{0x2f}...)
449
450         if t.Year() > 0 {
451                 b = strconv.AppendInt(b, int64(t.Year()), 10)
452         } else {
453                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
454         }
455
456         return string(b)
457 }
458
459 // FmtDateMedium returns the medium date representation of 't' for 'fr_TN'
460 func (fr *fr_TN) FmtDateMedium(t time.Time) string {
461
462         b := make([]byte, 0, 32)
463
464         b = strconv.AppendInt(b, int64(t.Day()), 10)
465         b = append(b, []byte{0x20}...)
466         b = append(b, fr.monthsAbbreviated[t.Month()]...)
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 // FmtDateLong returns the long date representation of 't' for 'fr_TN'
479 func (fr *fr_TN) FmtDateLong(t time.Time) string {
480
481         b := make([]byte, 0, 32)
482
483         b = strconv.AppendInt(b, int64(t.Day()), 10)
484         b = append(b, []byte{0x20}...)
485         b = append(b, fr.monthsWide[t.Month()]...)
486         b = append(b, []byte{0x20}...)
487
488         if t.Year() > 0 {
489                 b = strconv.AppendInt(b, int64(t.Year()), 10)
490         } else {
491                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
492         }
493
494         return string(b)
495 }
496
497 // FmtDateFull returns the full date representation of 't' for 'fr_TN'
498 func (fr *fr_TN) FmtDateFull(t time.Time) string {
499
500         b := make([]byte, 0, 32)
501
502         b = append(b, fr.daysWide[t.Weekday()]...)
503         b = append(b, []byte{0x20}...)
504         b = strconv.AppendInt(b, int64(t.Day()), 10)
505         b = append(b, []byte{0x20}...)
506         b = append(b, fr.monthsWide[t.Month()]...)
507         b = append(b, []byte{0x20}...)
508
509         if t.Year() > 0 {
510                 b = strconv.AppendInt(b, int64(t.Year()), 10)
511         } else {
512                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
513         }
514
515         return string(b)
516 }
517
518 // FmtTimeShort returns the short time representation of 't' for 'fr_TN'
519 func (fr *fr_TN) FmtTimeShort(t time.Time) string {
520
521         b := make([]byte, 0, 32)
522
523         h := t.Hour()
524
525         if h > 12 {
526                 h -= 12
527         }
528
529         b = strconv.AppendInt(b, int64(h), 10)
530         b = append(b, fr.timeSeparator...)
531
532         if t.Minute() < 10 {
533                 b = append(b, '0')
534         }
535
536         b = strconv.AppendInt(b, int64(t.Minute()), 10)
537         b = append(b, []byte{0x20}...)
538
539         if t.Hour() < 12 {
540                 b = append(b, fr.periodsAbbreviated[0]...)
541         } else {
542                 b = append(b, fr.periodsAbbreviated[1]...)
543         }
544
545         return string(b)
546 }
547
548 // FmtTimeMedium returns the medium time representation of 't' for 'fr_TN'
549 func (fr *fr_TN) FmtTimeMedium(t time.Time) string {
550
551         b := make([]byte, 0, 32)
552
553         h := t.Hour()
554
555         if h > 12 {
556                 h -= 12
557         }
558
559         b = strconv.AppendInt(b, int64(h), 10)
560         b = append(b, fr.timeSeparator...)
561
562         if t.Minute() < 10 {
563                 b = append(b, '0')
564         }
565
566         b = strconv.AppendInt(b, int64(t.Minute()), 10)
567         b = append(b, fr.timeSeparator...)
568
569         if t.Second() < 10 {
570                 b = append(b, '0')
571         }
572
573         b = strconv.AppendInt(b, int64(t.Second()), 10)
574         b = append(b, []byte{0x20}...)
575
576         if t.Hour() < 12 {
577                 b = append(b, fr.periodsAbbreviated[0]...)
578         } else {
579                 b = append(b, fr.periodsAbbreviated[1]...)
580         }
581
582         return string(b)
583 }
584
585 // FmtTimeLong returns the long time representation of 't' for 'fr_TN'
586 func (fr *fr_TN) FmtTimeLong(t time.Time) string {
587
588         b := make([]byte, 0, 32)
589
590         h := t.Hour()
591
592         if h > 12 {
593                 h -= 12
594         }
595
596         b = strconv.AppendInt(b, int64(h), 10)
597         b = append(b, fr.timeSeparator...)
598
599         if t.Minute() < 10 {
600                 b = append(b, '0')
601         }
602
603         b = strconv.AppendInt(b, int64(t.Minute()), 10)
604         b = append(b, fr.timeSeparator...)
605
606         if t.Second() < 10 {
607                 b = append(b, '0')
608         }
609
610         b = strconv.AppendInt(b, int64(t.Second()), 10)
611         b = append(b, []byte{0x20}...)
612
613         if t.Hour() < 12 {
614                 b = append(b, fr.periodsAbbreviated[0]...)
615         } else {
616                 b = append(b, fr.periodsAbbreviated[1]...)
617         }
618
619         b = append(b, []byte{0x20}...)
620
621         tz, _ := t.Zone()
622         b = append(b, tz...)
623
624         return string(b)
625 }
626
627 // FmtTimeFull returns the full time representation of 't' for 'fr_TN'
628 func (fr *fr_TN) FmtTimeFull(t time.Time) string {
629
630         b := make([]byte, 0, 32)
631
632         h := t.Hour()
633
634         if h > 12 {
635                 h -= 12
636         }
637
638         b = strconv.AppendInt(b, int64(h), 10)
639         b = append(b, fr.timeSeparator...)
640
641         if t.Minute() < 10 {
642                 b = append(b, '0')
643         }
644
645         b = strconv.AppendInt(b, int64(t.Minute()), 10)
646         b = append(b, fr.timeSeparator...)
647
648         if t.Second() < 10 {
649                 b = append(b, '0')
650         }
651
652         b = strconv.AppendInt(b, int64(t.Second()), 10)
653         b = append(b, []byte{0x20}...)
654
655         if t.Hour() < 12 {
656                 b = append(b, fr.periodsAbbreviated[0]...)
657         } else {
658                 b = append(b, fr.periodsAbbreviated[1]...)
659         }
660
661         b = append(b, []byte{0x20}...)
662
663         tz, _ := t.Zone()
664
665         if btz, ok := fr.timezones[tz]; ok {
666                 b = append(b, btz...)
667         } else {
668                 b = append(b, tz...)
669         }
670
671         return string(b)
672 }