OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / go-playground / locales / sv_FI / sv_FI.go
1 package sv_FI
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 sv_FI 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 'sv_FI' locale
46 func New() locales.Translator {
47         return &sv_FI{
48                 locale:                 "sv_FI",
49                 pluralsCardinal:        []locales.PluralRule{2, 6},
50                 pluralsOrdinal:         []locales.PluralRule{2, 6},
51                 pluralsRange:           []locales.PluralRule{6},
52                 decimal:                ",",
53                 group:                  " ",
54                 minus:                  "−",
55                 percent:                "%",
56                 perMille:               "‰",
57                 timeSeparator:          ":",
58                 inifinity:              "∞",
59                 currencies:             []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "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{"", "jan.", "feb.", "mars", "apr.", "maj", "juni", "juli", "aug.", "sep.", "okt.", "nov.", "dec."},
64                 monthsNarrow:           []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"},
65                 monthsWide:             []string{"", "januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"},
66                 daysAbbreviated:        []string{"sön", "mån", "tis", "ons", "tors", "fre", "lör"},
67                 daysNarrow:             []string{"S", "M", "T", "O", "T", "F", "L"},
68                 daysShort:              []string{"sö", "må", "ti", "on", "to", "fr", "lö"},
69                 daysWide:               []string{"söndag", "måndag", "tisdag", "onsdag", "torsdag", "fredag", "lördag"},
70                 periodsAbbreviated:     []string{"fm", "em"},
71                 periodsNarrow:          []string{"fm", "em"},
72                 periodsWide:            []string{"fm", "em"},
73                 erasAbbreviated:        []string{"f.Kr.", "e.Kr."},
74                 erasNarrow:             []string{"f.Kr.", "e.Kr."},
75                 erasWide:               []string{"före Kristus", "efter Kristus"},
76                 timezones:              map[string]string{"HNCU": "kubansk normaltid", "HEPM": "S:t Pierre och Miquelon, sommartid", "UYST": "uruguayansk sommartid", "HAST": "Honolulu, normaltid", "EAT": "östafrikansk tid", "HNT": "Newfoundland, normaltid", "EST": "östnordamerikansk normaltid", "GMT": "Greenwichtid", "ChST": "Chamorrotid", "AWST": "västaustralisk normaltid", "ACWST": "västcentralaustralisk normaltid", "MYT": "malaysisk tid", "UYT": "uruguayansk normaltid", "MEZ": "centraleuropeisk normaltid", "NZST": "nyzeeländsk normaltid", "WAST": "västafrikansk sommartid", "CLT": "chilensk normaltid", "EDT": "östnordamerikansk sommartid", "HEPMX": "mexikansk stillahavstid, sommartid", "HADT": "Honolulu, sommartid", "JST": "japansk normaltid", "ARST": "östargentinsk sommartid", "HNOG": "västgrönländsk normaltid", "COT": "colombiansk normaltid", "COST": "colombiansk sommartid", "AKST": "Alaska, normaltid", "AKDT": "Alaska, sommartid", "HENOMX": "nordvästmexikansk sommartid", "AST": "nordamerikansk atlantnormaltid", "CHADT": "Chatham, sommartid", "TMT": "turkmensk normaltid", "HNNOMX": "nordvästmexikansk normaltid", "ART": "östargentinsk normaltid", "PDT": "västnordamerikansk sommartid", "CHAST": "Chatham, normaltid", "HECU": "kubansk sommartid", "BT": "bhutansk tid", "NZDT": "nyzeeländsk sommartid", "SAST": "sydafrikansk tid", "HAT": "Newfoundland, sommartid", "MDT": "Macausommartid", "MESZ": "centraleuropeisk sommartid", "WEZ": "västeuropeisk normaltid", "WESZ": "västeuropeisk sommartid", "SGT": "Singaporetid", "WART": "västargentinsk normaltid", "IST": "indisk tid", "AEDT": "östaustralisk sommartid", "WIB": "västindonesisk tid", "PST": "västnordamerikansk normaltid", "VET": "venezuelansk tid", "ADT": "nordamerikansk atlantsommartid", "BOT": "boliviansk tid", "SRT": "Surinamtid", "TMST": "turkmensk sommartid", "WARST": "västargentinsk sommartid", "HEOG": "västgrönländsk sommartid", "HNEG": "östgrönländsk normaltid", "GFT": "Franska Guyanatid", "ACST": "centralaustralisk normaltid", "CST": "centralnordamerikansk normaltid", "CDT": "centralnordamerikansk sommartid", "MST": "Macaunormaltid", "OEZ": "östeuropeisk normaltid", "WITA": "centralindonesisk tid", "WAT": "västafrikansk normaltid", "HEEG": "östgrönländsk sommartid", "ACDT": "centralaustralisk sommartid", "ECT": "ecuadoriansk tid", "CAT": "centralafrikansk tid", "OESZ": "östeuropeisk sommartid", "∅∅∅": "peruansk sommartid", "HNPMX": "mexikansk stillahavstid, normaltid", "AWDT": "västaustralisk sommartid", "ACWDT": "västcentralaustralisk sommartid", "HKST": "Hongkong, sommartid", "CLST": "chilensk sommartid", "HNPM": "S:t Pierre och Miquelon, normaltid", "LHST": "Lord Howe, normaltid", "LHDT": "Lord Howe, sommartid", "HKT": "Hongkong, normaltid", "GYT": "Guyanatid", "WIT": "östindonesisk tid", "JDT": "japansk sommartid", "AEST": "östaustralisk normaltid"},
77         }
78 }
79
80 // Locale returns the current translators string locale
81 func (sv *sv_FI) Locale() string {
82         return sv.locale
83 }
84
85 // PluralsCardinal returns the list of cardinal plural rules associated with 'sv_FI'
86 func (sv *sv_FI) PluralsCardinal() []locales.PluralRule {
87         return sv.pluralsCardinal
88 }
89
90 // PluralsOrdinal returns the list of ordinal plural rules associated with 'sv_FI'
91 func (sv *sv_FI) PluralsOrdinal() []locales.PluralRule {
92         return sv.pluralsOrdinal
93 }
94
95 // PluralsRange returns the list of range plural rules associated with 'sv_FI'
96 func (sv *sv_FI) PluralsRange() []locales.PluralRule {
97         return sv.pluralsRange
98 }
99
100 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'sv_FI'
101 func (sv *sv_FI) 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         }
109
110         return locales.PluralRuleOther
111 }
112
113 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'sv_FI'
114 func (sv *sv_FI) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
115
116         n := math.Abs(num)
117         nMod10 := math.Mod(n, 10)
118         nMod100 := math.Mod(n, 100)
119
120         if (nMod10 == 1 || nMod10 == 2) && (nMod100 != 11 && nMod100 != 12) {
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 'sv_FI'
128 func (sv *sv_FI) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
129         return locales.PluralRuleOther
130 }
131
132 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
133 func (sv *sv_FI) MonthAbbreviated(month time.Month) string {
134         return sv.monthsAbbreviated[month]
135 }
136
137 // MonthsAbbreviated returns the locales abbreviated months
138 func (sv *sv_FI) MonthsAbbreviated() []string {
139         return sv.monthsAbbreviated[1:]
140 }
141
142 // MonthNarrow returns the locales narrow month given the 'month' provided
143 func (sv *sv_FI) MonthNarrow(month time.Month) string {
144         return sv.monthsNarrow[month]
145 }
146
147 // MonthsNarrow returns the locales narrow months
148 func (sv *sv_FI) MonthsNarrow() []string {
149         return sv.monthsNarrow[1:]
150 }
151
152 // MonthWide returns the locales wide month given the 'month' provided
153 func (sv *sv_FI) MonthWide(month time.Month) string {
154         return sv.monthsWide[month]
155 }
156
157 // MonthsWide returns the locales wide months
158 func (sv *sv_FI) MonthsWide() []string {
159         return sv.monthsWide[1:]
160 }
161
162 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
163 func (sv *sv_FI) WeekdayAbbreviated(weekday time.Weekday) string {
164         return sv.daysAbbreviated[weekday]
165 }
166
167 // WeekdaysAbbreviated returns the locales abbreviated weekdays
168 func (sv *sv_FI) WeekdaysAbbreviated() []string {
169         return sv.daysAbbreviated
170 }
171
172 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
173 func (sv *sv_FI) WeekdayNarrow(weekday time.Weekday) string {
174         return sv.daysNarrow[weekday]
175 }
176
177 // WeekdaysNarrow returns the locales narrow weekdays
178 func (sv *sv_FI) WeekdaysNarrow() []string {
179         return sv.daysNarrow
180 }
181
182 // WeekdayShort returns the locales short weekday given the 'weekday' provided
183 func (sv *sv_FI) WeekdayShort(weekday time.Weekday) string {
184         return sv.daysShort[weekday]
185 }
186
187 // WeekdaysShort returns the locales short weekdays
188 func (sv *sv_FI) WeekdaysShort() []string {
189         return sv.daysShort
190 }
191
192 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
193 func (sv *sv_FI) WeekdayWide(weekday time.Weekday) string {
194         return sv.daysWide[weekday]
195 }
196
197 // WeekdaysWide returns the locales wide weekdays
198 func (sv *sv_FI) WeekdaysWide() []string {
199         return sv.daysWide
200 }
201
202 // Decimal returns the decimal point of number
203 func (sv *sv_FI) Decimal() string {
204         return sv.decimal
205 }
206
207 // Group returns the group of number
208 func (sv *sv_FI) Group() string {
209         return sv.group
210 }
211
212 // Group returns the minus sign of number
213 func (sv *sv_FI) Minus() string {
214         return sv.minus
215 }
216
217 // FmtNumber returns 'num' with digits/precision of 'v' for 'sv_FI' and handles both Whole and Real numbers based on 'v'
218 func (sv *sv_FI) FmtNumber(num float64, v uint64) string {
219
220         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
221         l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3
222         count := 0
223         inWhole := v == 0
224         b := make([]byte, 0, l)
225
226         for i := len(s) - 1; i >= 0; i-- {
227
228                 if s[i] == '.' {
229                         b = append(b, sv.decimal[0])
230                         inWhole = true
231                         continue
232                 }
233
234                 if inWhole {
235                         if count == 3 {
236                                 for j := len(sv.group) - 1; j >= 0; j-- {
237                                         b = append(b, sv.group[j])
238                                 }
239                                 count = 1
240                         } else {
241                                 count++
242                         }
243                 }
244
245                 b = append(b, s[i])
246         }
247
248         if num < 0 {
249                 for j := len(sv.minus) - 1; j >= 0; j-- {
250                         b = append(b, sv.minus[j])
251                 }
252         }
253
254         // reverse
255         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
256                 b[i], b[j] = b[j], b[i]
257         }
258
259         return string(b)
260 }
261
262 // FmtPercent returns 'num' with digits/precision of 'v' for 'sv_FI' and handles both Whole and Real numbers based on 'v'
263 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
264 func (sv *sv_FI) FmtPercent(num float64, v uint64) string {
265         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
266         l := len(s) + 7
267         b := make([]byte, 0, l)
268
269         for i := len(s) - 1; i >= 0; i-- {
270
271                 if s[i] == '.' {
272                         b = append(b, sv.decimal[0])
273                         continue
274                 }
275
276                 b = append(b, s[i])
277         }
278
279         if num < 0 {
280                 for j := len(sv.minus) - 1; j >= 0; j-- {
281                         b = append(b, sv.minus[j])
282                 }
283         }
284
285         // reverse
286         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
287                 b[i], b[j] = b[j], b[i]
288         }
289
290         b = append(b, sv.percentSuffix...)
291
292         b = append(b, sv.percent...)
293
294         return string(b)
295 }
296
297 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'sv_FI'
298 func (sv *sv_FI) FmtCurrency(num float64, v uint64, currency currency.Type) string {
299
300         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
301         symbol := sv.currencies[currency]
302         l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3
303         count := 0
304         inWhole := v == 0
305         b := make([]byte, 0, l)
306
307         for i := len(s) - 1; i >= 0; i-- {
308
309                 if s[i] == '.' {
310                         b = append(b, sv.decimal[0])
311                         inWhole = true
312                         continue
313                 }
314
315                 if inWhole {
316                         if count == 3 {
317                                 for j := len(sv.group) - 1; j >= 0; j-- {
318                                         b = append(b, sv.group[j])
319                                 }
320                                 count = 1
321                         } else {
322                                 count++
323                         }
324                 }
325
326                 b = append(b, s[i])
327         }
328
329         if num < 0 {
330                 for j := len(sv.minus) - 1; j >= 0; j-- {
331                         b = append(b, sv.minus[j])
332                 }
333         }
334
335         // reverse
336         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
337                 b[i], b[j] = b[j], b[i]
338         }
339
340         if int(v) < 2 {
341
342                 if v == 0 {
343                         b = append(b, sv.decimal...)
344                 }
345
346                 for i := 0; i < 2-int(v); i++ {
347                         b = append(b, '0')
348                 }
349         }
350
351         b = append(b, sv.currencyPositiveSuffix...)
352
353         b = append(b, symbol...)
354
355         return string(b)
356 }
357
358 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'sv_FI'
359 // in accounting notation.
360 func (sv *sv_FI) FmtAccounting(num float64, v uint64, currency currency.Type) string {
361
362         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
363         symbol := sv.currencies[currency]
364         l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3
365         count := 0
366         inWhole := v == 0
367         b := make([]byte, 0, l)
368
369         for i := len(s) - 1; i >= 0; i-- {
370
371                 if s[i] == '.' {
372                         b = append(b, sv.decimal[0])
373                         inWhole = true
374                         continue
375                 }
376
377                 if inWhole {
378                         if count == 3 {
379                                 for j := len(sv.group) - 1; j >= 0; j-- {
380                                         b = append(b, sv.group[j])
381                                 }
382                                 count = 1
383                         } else {
384                                 count++
385                         }
386                 }
387
388                 b = append(b, s[i])
389         }
390
391         if num < 0 {
392
393                 for j := len(sv.minus) - 1; j >= 0; j-- {
394                         b = append(b, sv.minus[j])
395                 }
396
397         }
398
399         // reverse
400         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
401                 b[i], b[j] = b[j], b[i]
402         }
403
404         if int(v) < 2 {
405
406                 if v == 0 {
407                         b = append(b, sv.decimal...)
408                 }
409
410                 for i := 0; i < 2-int(v); i++ {
411                         b = append(b, '0')
412                 }
413         }
414
415         if num < 0 {
416                 b = append(b, sv.currencyNegativeSuffix...)
417                 b = append(b, symbol...)
418         } else {
419
420                 b = append(b, sv.currencyPositiveSuffix...)
421                 b = append(b, symbol...)
422         }
423
424         return string(b)
425 }
426
427 // FmtDateShort returns the short date representation of 't' for 'sv_FI'
428 func (sv *sv_FI) FmtDateShort(t time.Time) string {
429
430         b := make([]byte, 0, 32)
431
432         if t.Day() < 10 {
433                 b = append(b, '0')
434         }
435
436         b = strconv.AppendInt(b, int64(t.Day()), 10)
437         b = append(b, []byte{0x2d}...)
438
439         if t.Month() < 10 {
440                 b = append(b, '0')
441         }
442
443         b = strconv.AppendInt(b, int64(t.Month()), 10)
444
445         b = append(b, []byte{0x2d}...)
446
447         if t.Year() > 0 {
448                 b = strconv.AppendInt(b, int64(t.Year()), 10)
449         } else {
450                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
451         }
452
453         return string(b)
454 }
455
456 // FmtDateMedium returns the medium date representation of 't' for 'sv_FI'
457 func (sv *sv_FI) FmtDateMedium(t time.Time) string {
458
459         b := make([]byte, 0, 32)
460
461         b = strconv.AppendInt(b, int64(t.Day()), 10)
462         b = append(b, []byte{0x20}...)
463         b = append(b, sv.monthsAbbreviated[t.Month()]...)
464         b = append(b, []byte{0x20}...)
465
466         if t.Year() > 0 {
467                 b = strconv.AppendInt(b, int64(t.Year()), 10)
468         } else {
469                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
470         }
471
472         return string(b)
473 }
474
475 // FmtDateLong returns the long date representation of 't' for 'sv_FI'
476 func (sv *sv_FI) FmtDateLong(t time.Time) string {
477
478         b := make([]byte, 0, 32)
479
480         b = strconv.AppendInt(b, int64(t.Day()), 10)
481         b = append(b, []byte{0x20}...)
482         b = append(b, sv.monthsWide[t.Month()]...)
483         b = append(b, []byte{0x20}...)
484
485         if t.Year() > 0 {
486                 b = strconv.AppendInt(b, int64(t.Year()), 10)
487         } else {
488                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
489         }
490
491         return string(b)
492 }
493
494 // FmtDateFull returns the full date representation of 't' for 'sv_FI'
495 func (sv *sv_FI) FmtDateFull(t time.Time) string {
496
497         b := make([]byte, 0, 32)
498
499         b = append(b, sv.daysWide[t.Weekday()]...)
500         b = append(b, []byte{0x20}...)
501         b = strconv.AppendInt(b, int64(t.Day()), 10)
502         b = append(b, []byte{0x20}...)
503         b = append(b, sv.monthsWide[t.Month()]...)
504         b = append(b, []byte{0x20}...)
505
506         if t.Year() > 0 {
507                 b = strconv.AppendInt(b, int64(t.Year()), 10)
508         } else {
509                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
510         }
511
512         return string(b)
513 }
514
515 // FmtTimeShort returns the short time representation of 't' for 'sv_FI'
516 func (sv *sv_FI) FmtTimeShort(t time.Time) string {
517
518         b := make([]byte, 0, 32)
519
520         if t.Hour() < 10 {
521                 b = append(b, '0')
522         }
523
524         b = strconv.AppendInt(b, int64(t.Hour()), 10)
525         b = append(b, sv.timeSeparator...)
526
527         if t.Minute() < 10 {
528                 b = append(b, '0')
529         }
530
531         b = strconv.AppendInt(b, int64(t.Minute()), 10)
532
533         return string(b)
534 }
535
536 // FmtTimeMedium returns the medium time representation of 't' for 'sv_FI'
537 func (sv *sv_FI) FmtTimeMedium(t time.Time) string {
538
539         b := make([]byte, 0, 32)
540
541         if t.Hour() < 10 {
542                 b = append(b, '0')
543         }
544
545         b = strconv.AppendInt(b, int64(t.Hour()), 10)
546         b = append(b, sv.timeSeparator...)
547
548         if t.Minute() < 10 {
549                 b = append(b, '0')
550         }
551
552         b = strconv.AppendInt(b, int64(t.Minute()), 10)
553         b = append(b, sv.timeSeparator...)
554
555         if t.Second() < 10 {
556                 b = append(b, '0')
557         }
558
559         b = strconv.AppendInt(b, int64(t.Second()), 10)
560
561         return string(b)
562 }
563
564 // FmtTimeLong returns the long time representation of 't' for 'sv_FI'
565 func (sv *sv_FI) FmtTimeLong(t time.Time) string {
566
567         b := make([]byte, 0, 32)
568
569         if t.Hour() < 10 {
570                 b = append(b, '0')
571         }
572
573         b = strconv.AppendInt(b, int64(t.Hour()), 10)
574         b = append(b, sv.timeSeparator...)
575
576         if t.Minute() < 10 {
577                 b = append(b, '0')
578         }
579
580         b = strconv.AppendInt(b, int64(t.Minute()), 10)
581         b = append(b, sv.timeSeparator...)
582
583         if t.Second() < 10 {
584                 b = append(b, '0')
585         }
586
587         b = strconv.AppendInt(b, int64(t.Second()), 10)
588         b = append(b, []byte{0x20}...)
589
590         tz, _ := t.Zone()
591         b = append(b, tz...)
592
593         return string(b)
594 }
595
596 // FmtTimeFull returns the full time representation of 't' for 'sv_FI'
597 func (sv *sv_FI) FmtTimeFull(t time.Time) string {
598
599         b := make([]byte, 0, 32)
600
601         b = append(b, []byte{0x6b, 0x6c}...)
602         b = append(b, []byte{0x2e, 0x20}...)
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, sv.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, sv.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 := sv.timezones[tz]; ok {
628                 b = append(b, btz...)
629         } else {
630                 b = append(b, tz...)
631         }
632
633         return string(b)
634 }