1package fr_RW
2
3import (
4	"math"
5	"strconv"
6	"time"
7
8	"github.com/gohugoio/locales"
9	"github.com/gohugoio/locales/currency"
10)
11
12type fr_RW 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_RW' locale
47func New() locales.Translator {
48	return &fr_RW{
49		locale:                 "fr_RW",
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", "CNH", "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", "MRU", "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", "RF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "STN", "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", "UYW", "UZS", "VEB", "VEF", "VES", "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{"ACDT": "heure d’été du centre de l’Australie", "ACST": "heure normale du centre de l’Australie", "ACWDT": "heure d’été du centre-ouest de l’Australie", "ACWST": "heure normale du centre-ouest de l’Australie", "ADT": "heure d’été de l’Atlantique", "AEDT": "heure d’été de l’Est de l’Australie", "AEST": "heure normale de l’Est de l’Australie", "AKDT": "heure d’été de l’Alaska", "AKST": "heure normale de l’Alaska", "ARST": "heure d’été de l’Argentine", "ART": "heure normale d’Argentine", "AST": "heure normale de l’Atlantique", "AWDT": "heure d’été de l’Ouest de l’Australie", "AWST": "heure normale de l’Ouest de l’Australie", "BOT": "heure de Bolivie", "BT": "heure du Bhoutan", "CAT": "heure normale d’Afrique centrale", "CDT": "heure d’été du Centre", "CHADT": "heure d’été des îles Chatham", "CHAST": "heure normale des îles Chatham", "CLST": "heure d’été du Chili", "CLT": "heure normale du Chili", "COST": "heure d’été de Colombie", "COT": "heure normale de Colombie", "CST": "heure normale du centre nord-américain", "ChST": "heure des Chamorro", "EAT": "heure normale d’Afrique de l’Est", "ECT": "heure de l’Équateur", "EDT": "heure d’été de l’Est", "EST": "heure normale de l’Est nord-américain", "GFT": "heure de la Guyane française", "GMT": "heure moyenne de Greenwich", "GST": "heure du Golfe", "GYT": "heure du Guyana", "HADT": "heure d’été d’Hawaii - Aléoutiennes", "HAST": "heure normale d’Hawaii - Aléoutiennes", "HAT": "heure d’été de Terre-Neuve", "HECU": "heure d’été de Cuba", "HEEG": "heure d’été de l’Est du Groenland", "HENOMX": "heure d’été du Nord-Ouest du Mexique", "HEOG": "heure d’été de l’Ouest du Groenland", "HEPM": "heure d’été de Saint-Pierre-et-Miquelon", "HEPMX": "heure d’été du Pacifique mexicain", "HKST": "heure d’été de Hong Kong", "HKT": "heure normale de Hong Kong", "HNCU": "heure normale de Cuba", "HNEG": "heure normale de l’Est du Groenland", "HNNOMX": "heure normale du Nord-Ouest du Mexique", "HNOG": "heure normale de l’Ouest du Groenland", "HNPM": "heure normale de Saint-Pierre-et-Miquelon", "HNPMX": "heure normale du Pacifique mexicain", "HNT": "heure normale de Terre-Neuve", "IST": "heure de l’Inde", "JDT": "heure d’été du Japon", "JST": "heure normale du Japon", "LHDT": "heure d’été de Lord Howe", "LHST": "heure normale de Lord Howe", "MDT": "heure d’été des Rocheuses", "MESZ": "heure d’été d’Europe centrale", "MEZ": "heure normale d’Europe centrale", "MST": "heure normale des Rocheuses", "MYT": "heure de la Malaisie", "NZDT": "heure d’été de la Nouvelle-Zélande", "NZST": "heure normale de la Nouvelle-Zélande", "OESZ": "heure d’été d’Europe de l’Est", "OEZ": "heure normale d’Europe de l’Est", "PDT": "heure d’été du Pacifique", "PST": "heure normale du Pacifique nord-américain", "SAST": "heure normale d’Afrique méridionale", "SGT": "heure de Singapour", "SRT": "heure du Suriname", "TMST": "heure d’été du Turkménistan", "TMT": "heure normale du Turkménistan", "UYST": "heure d’été de l’Uruguay", "UYT": "heure normale de l’Uruguay", "VET": "heure du Venezuela", "WARST": "heure d’été de l’Ouest argentin", "WART": "heure normale de l’Ouest argentin", "WAST": "heure d’été d’Afrique de l’Ouest", "WAT": "heure normale d’Afrique de l’Ouest", "WESZ": "heure d’été d’Europe de l’Ouest", "WEZ": "heure normale d’Europe de l’Ouest", "WIB": "heure de l’Ouest indonésien", "WIT": "heure de l’Est indonésien", "WITA": "heure du Centre indonésien", "∅∅∅": "heure d’été de Brasilia"},
79	}
80}
81
82// Locale returns the current translators string locale
83func (fr *fr_RW) Locale() string {
84	return fr.locale
85}
86
87// PluralsCardinal returns the list of cardinal plural rules associated with 'fr_RW'
88func (fr *fr_RW) PluralsCardinal() []locales.PluralRule {
89	return fr.pluralsCardinal
90}
91
92// PluralsOrdinal returns the list of ordinal plural rules associated with 'fr_RW'
93func (fr *fr_RW) PluralsOrdinal() []locales.PluralRule {
94	return fr.pluralsOrdinal
95}
96
97// PluralsRange returns the list of range plural rules associated with 'fr_RW'
98func (fr *fr_RW) PluralsRange() []locales.PluralRule {
99	return fr.pluralsRange
100}
101
102// CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'fr_RW'
103func (fr *fr_RW) 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_RW'
116func (fr *fr_RW) 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_RW'
128func (fr *fr_RW) 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
144func (fr *fr_RW) MonthAbbreviated(month time.Month) string {
145	return fr.monthsAbbreviated[month]
146}
147
148// MonthsAbbreviated returns the locales abbreviated months
149func (fr *fr_RW) MonthsAbbreviated() []string {
150	return fr.monthsAbbreviated[1:]
151}
152
153// MonthNarrow returns the locales narrow month given the 'month' provided
154func (fr *fr_RW) MonthNarrow(month time.Month) string {
155	return fr.monthsNarrow[month]
156}
157
158// MonthsNarrow returns the locales narrow months
159func (fr *fr_RW) MonthsNarrow() []string {
160	return fr.monthsNarrow[1:]
161}
162
163// MonthWide returns the locales wide month given the 'month' provided
164func (fr *fr_RW) MonthWide(month time.Month) string {
165	return fr.monthsWide[month]
166}
167
168// MonthsWide returns the locales wide months
169func (fr *fr_RW) MonthsWide() []string {
170	return fr.monthsWide[1:]
171}
172
173// WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
174func (fr *fr_RW) WeekdayAbbreviated(weekday time.Weekday) string {
175	return fr.daysAbbreviated[weekday]
176}
177
178// WeekdaysAbbreviated returns the locales abbreviated weekdays
179func (fr *fr_RW) WeekdaysAbbreviated() []string {
180	return fr.daysAbbreviated
181}
182
183// WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
184func (fr *fr_RW) WeekdayNarrow(weekday time.Weekday) string {
185	return fr.daysNarrow[weekday]
186}
187
188// WeekdaysNarrow returns the locales narrow weekdays
189func (fr *fr_RW) WeekdaysNarrow() []string {
190	return fr.daysNarrow
191}
192
193// WeekdayShort returns the locales short weekday given the 'weekday' provided
194func (fr *fr_RW) WeekdayShort(weekday time.Weekday) string {
195	return fr.daysShort[weekday]
196}
197
198// WeekdaysShort returns the locales short weekdays
199func (fr *fr_RW) WeekdaysShort() []string {
200	return fr.daysShort
201}
202
203// WeekdayWide returns the locales wide weekday given the 'weekday' provided
204func (fr *fr_RW) WeekdayWide(weekday time.Weekday) string {
205	return fr.daysWide[weekday]
206}
207
208// WeekdaysWide returns the locales wide weekdays
209func (fr *fr_RW) WeekdaysWide() []string {
210	return fr.daysWide
211}
212
213// Decimal returns the decimal point of number
214func (fr *fr_RW) Decimal() string {
215	return fr.decimal
216}
217
218// Group returns the group of number
219func (fr *fr_RW) Group() string {
220	return fr.group
221}
222
223// Group returns the minus sign of number
224func (fr *fr_RW) Minus() string {
225	return fr.minus
226}
227
228// FmtNumber returns 'num' with digits/precision of 'v' for 'fr_RW' and handles both Whole and Real numbers based on 'v'
229func (fr *fr_RW) FmtNumber(num float64, v uint64) string {
230
231	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
232	l := len(s) + 2 + 3*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_RW' and handles both Whole and Real numbers based on 'v'
272// NOTE: 'num' passed into FmtPercent is assumed to be in percent already
273func (fr *fr_RW) 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_RW'
305func (fr *fr_RW) 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 + 3*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_RW'
364// in accounting notation.
365func (fr *fr_RW) 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 + 3*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_RW'
431func (fr *fr_RW) 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_RW'
460func (fr *fr_RW) 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_RW'
479func (fr *fr_RW) 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_RW'
498func (fr *fr_RW) 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_RW'
519func (fr *fr_RW) FmtTimeShort(t time.Time) string {
520
521	b := make([]byte, 0, 32)
522
523	if t.Hour() < 10 {
524		b = append(b, '0')
525	}
526
527	b = strconv.AppendInt(b, int64(t.Hour()), 10)
528	b = append(b, fr.timeSeparator...)
529
530	if t.Minute() < 10 {
531		b = append(b, '0')
532	}
533
534	b = strconv.AppendInt(b, int64(t.Minute()), 10)
535
536	return string(b)
537}
538
539// FmtTimeMedium returns the medium time representation of 't' for 'fr_RW'
540func (fr *fr_RW) FmtTimeMedium(t time.Time) string {
541
542	b := make([]byte, 0, 32)
543
544	if t.Hour() < 10 {
545		b = append(b, '0')
546	}
547
548	b = strconv.AppendInt(b, int64(t.Hour()), 10)
549	b = append(b, fr.timeSeparator...)
550
551	if t.Minute() < 10 {
552		b = append(b, '0')
553	}
554
555	b = strconv.AppendInt(b, int64(t.Minute()), 10)
556	b = append(b, fr.timeSeparator...)
557
558	if t.Second() < 10 {
559		b = append(b, '0')
560	}
561
562	b = strconv.AppendInt(b, int64(t.Second()), 10)
563
564	return string(b)
565}
566
567// FmtTimeLong returns the long time representation of 't' for 'fr_RW'
568func (fr *fr_RW) FmtTimeLong(t time.Time) string {
569
570	b := make([]byte, 0, 32)
571
572	if t.Hour() < 10 {
573		b = append(b, '0')
574	}
575
576	b = strconv.AppendInt(b, int64(t.Hour()), 10)
577	b = append(b, fr.timeSeparator...)
578
579	if t.Minute() < 10 {
580		b = append(b, '0')
581	}
582
583	b = strconv.AppendInt(b, int64(t.Minute()), 10)
584	b = append(b, fr.timeSeparator...)
585
586	if t.Second() < 10 {
587		b = append(b, '0')
588	}
589
590	b = strconv.AppendInt(b, int64(t.Second()), 10)
591	b = append(b, []byte{0x20}...)
592
593	tz, _ := t.Zone()
594	b = append(b, tz...)
595
596	return string(b)
597}
598
599// FmtTimeFull returns the full time representation of 't' for 'fr_RW'
600func (fr *fr_RW) FmtTimeFull(t time.Time) string {
601
602	b := make([]byte, 0, 32)
603
604	if t.Hour() < 10 {
605		b = append(b, '0')
606	}
607
608	b = strconv.AppendInt(b, int64(t.Hour()), 10)
609	b = append(b, fr.timeSeparator...)
610
611	if t.Minute() < 10 {
612		b = append(b, '0')
613	}
614
615	b = strconv.AppendInt(b, int64(t.Minute()), 10)
616	b = append(b, fr.timeSeparator...)
617
618	if t.Second() < 10 {
619		b = append(b, '0')
620	}
621
622	b = strconv.AppendInt(b, int64(t.Second()), 10)
623	b = append(b, []byte{0x20}...)
624
625	tz, _ := t.Zone()
626
627	if btz, ok := fr.timezones[tz]; ok {
628		b = append(b, btz...)
629	} else {
630		b = append(b, tz...)
631	}
632
633	return string(b)
634}
635