OSDN Git Service

delete miner
[bytom/vapor.git] / vendor / github.com / go-playground / locales / is_IS / is_IS.go
1 package is_IS
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 is_IS 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         perMille               string
22         timeSeparator          string
23         inifinity              string
24         currencies             []string // idx = enum of currency code
25         currencyPositiveSuffix string
26         currencyNegativeSuffix string
27         monthsAbbreviated      []string
28         monthsNarrow           []string
29         monthsWide             []string
30         daysAbbreviated        []string
31         daysNarrow             []string
32         daysShort              []string
33         daysWide               []string
34         periodsAbbreviated     []string
35         periodsNarrow          []string
36         periodsShort           []string
37         periodsWide            []string
38         erasAbbreviated        []string
39         erasNarrow             []string
40         erasWide               []string
41         timezones              map[string]string
42 }
43
44 // New returns a new instance of translator for the 'is_IS' locale
45 func New() locales.Translator {
46         return &is_IS{
47                 locale:                 "is_IS",
48                 pluralsCardinal:        []locales.PluralRule{2, 6},
49                 pluralsOrdinal:         []locales.PluralRule{6},
50                 pluralsRange:           []locales.PluralRule{2, 6},
51                 decimal:                ",",
52                 group:                  ".",
53                 minus:                  "-",
54                 percent:                "%",
55                 perMille:               "‰",
56                 timeSeparator:          ":",
57                 inifinity:              "∞",
58                 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"},
59                 currencyPositiveSuffix: " ",
60                 currencyNegativeSuffix: " ",
61                 monthsAbbreviated:      []string{"", "jan.", "feb.", "mar.", "apr.", "maí", "jún.", "júl.", "ágú.", "sep.", "okt.", "nóv.", "des."},
62                 monthsNarrow:           []string{"", "J", "F", "M", "A", "M", "J", "J", "Á", "S", "O", "N", "D"},
63                 monthsWide:             []string{"", "janúar", "febrúar", "mars", "apríl", "maí", "júní", "júlí", "ágúst", "september", "október", "nóvember", "desember"},
64                 daysAbbreviated:        []string{"sun.", "mán.", "þri.", "mið.", "fim.", "fös.", "lau."},
65                 daysNarrow:             []string{"S", "M", "Þ", "M", "F", "F", "L"},
66                 daysShort:              []string{"su.", "má.", "þr.", "mi.", "fi.", "fö.", "la."},
67                 daysWide:               []string{"sunnudagur", "mánudagur", "þriðjudagur", "miðvikudagur", "fimmtudagur", "föstudagur", "laugardagur"},
68                 periodsAbbreviated:     []string{"f.h.", "e.h."},
69                 periodsNarrow:          []string{"f.", "e."},
70                 periodsWide:            []string{"f.h.", "e.h."},
71                 erasAbbreviated:        []string{"f.Kr.", "e.Kr."},
72                 erasNarrow:             []string{"f.k.", "e.k."},
73                 erasWide:               []string{"fyrir Krist", "eftir Krist"},
74                 timezones:              map[string]string{"AWST": "Staðaltími í Vestur-Ástralíu", "WAT": "Staðaltími í Vestur-Afríku", "ChST": "Chamorro-staðaltími", "MST": "MST", "CST": "Staðaltími í miðhluta Bandaríkjanna og Kanada", "ACWDT": "Sumartími í miðvesturhluta Ástralíu", "OESZ": "Sumartími í Austur-Evrópu", "ADT": "Sumartími á Atlantshafssvæðinu", "SAST": "Suður-Afríkutími", "ECT": "Ekvadortími", "WEZ": "Staðaltími í Vestur-Evrópu", "AKST": "Staðaltími í Alaska", "CHADT": "Sumartími í Chatham", "TMT": "Staðaltími í Túrkmenistan", "HNOG": "Staðaltími á Vestur-Grænlandi", "HEOG": "Sumartími á Vestur-Grænlandi", "HNEG": "Staðaltími á Austur-Grænlandi", "EST": "Staðaltími í austurhluta Bandaríkjanna og Kanada", "EDT": "Sumartími í austurhluta Bandaríkjanna og Kanada", "COT": "Staðaltími í Kólumbíu", "COST": "Sumartími í Kólumbíu", "MESZ": "Sumartími í Mið-Evrópu", "CLST": "Sumartími í Síle", "GFT": "Tími í Frönsku Gvæjana", "HEPM": "Sumartími á Sankti Pierre og Miquelon", "WIT": "Austur-Indónesíutími", "CHAST": "Staðaltími í Chatham", "ACDT": "Sumartími í Mið-Ástralíu", "PDT": "Sumartími á Kyrrahafssvæðinu", "NZST": "Staðaltími á Nýja-Sjálandi", "TMST": "Sumartími í Túrkmenistan", "VET": "Venesúelatími", "HKT": "Staðaltími í Hong Kong", "CLT": "Staðaltími í Síle", "HNPM": "Staðaltími á Sankti Pierre og Miquelon", "UYST": "Sumartími í Úrúgvæ", "UYT": "Staðaltími í Úrúgvæ", "PST": "Staðaltími á Kyrrahafssvæðinu", "AWDT": "Sumartími í Vestur-Ástralíu", "MEZ": "Staðaltími í Mið-Evrópu", "OEZ": "Staðaltími í Austur-Evrópu", "LHDT": "Sumartími á Lord Howe-eyju", "HKST": "Sumartími í Hong Kong", "∅∅∅": "Sumartími á Amasónsvæðinu", "HECU": "Sumartími á Kúbu", "SRT": "Súrinamtími", "ACWST": "Staðaltími í miðvesturhluta Ástralíu", "BT": "Bútantími", "CDT": "Sumartími í miðhluta Bandaríkjanna og Kanada", "HNNOMX": "Staðaltími í Norðvestur-Mexíkó", "AEDT": "Sumartími í Austur-Ástralíu", "ARST": "Sumartími í Argentínu", "WAST": "Sumartími í Vestur-Afríku", "HEEG": "Sumartími á Austur-Grænlandi", "GMT": "Greenwich-staðaltími", "HADT": "Sumartími á Havaí og Aleúta", "BOT": "Bólivíutími", "MDT": "MDT", "LHST": "Staðaltími á Lord Howe-eyju", "WART": "Staðaltími í Vestur-Argentínu", "WARST": "Sumartími í Vestur-Argentínu", "CAT": "Mið-Afríkutími", "SGT": "Singapúrtími", "ART": "Staðaltími í Argentínu", "EAT": "Austur-Afríkutími", "AKDT": "Sumartími í Alaska", "AEST": "Staðaltími í Austur-Ástralíu", "MYT": "Malasíutími", "HENOMX": "Sumartími í Norðvestur-Mexíkó", "JDT": "Sumartími í Japan", "IST": "Indlandstími", "HEPMX": "Sumartími í Mexíkó á Kyrrahafssvæðinu", "HNCU": "Staðaltími á Kúbu", "WESZ": "Sumartími í Vestur-Evrópu", "WIB": "Vestur-Indónesíutími", "NZDT": "Sumartími á Nýja-Sjálandi", "AST": "Staðaltími á Atlantshafssvæðinu", "HNT": "Staðaltími á Nýfundnalandi", "HNPMX": "Staðaltími í Mexíkó á Kyrrahafssvæðinu", "HAST": "Staðaltími á Havaí og Aleúta", "WITA": "Mið-Indónesíutími", "JST": "Staðaltími í Japan", "HAT": "Sumartími á Nýfundnalandi", "GYT": "Gvæjanatími", "ACST": "Staðaltími í Mið-Ástralíu"},
75         }
76 }
77
78 // Locale returns the current translators string locale
79 func (is *is_IS) Locale() string {
80         return is.locale
81 }
82
83 // PluralsCardinal returns the list of cardinal plural rules associated with 'is_IS'
84 func (is *is_IS) PluralsCardinal() []locales.PluralRule {
85         return is.pluralsCardinal
86 }
87
88 // PluralsOrdinal returns the list of ordinal plural rules associated with 'is_IS'
89 func (is *is_IS) PluralsOrdinal() []locales.PluralRule {
90         return is.pluralsOrdinal
91 }
92
93 // PluralsRange returns the list of range plural rules associated with 'is_IS'
94 func (is *is_IS) PluralsRange() []locales.PluralRule {
95         return is.pluralsRange
96 }
97
98 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'is_IS'
99 func (is *is_IS) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
100
101         n := math.Abs(num)
102         i := int64(n)
103         t := locales.T(n, v)
104         iMod10 := i % 10
105         iMod100 := i % 100
106
107         if (t == 0 && iMod10 == 1 && iMod100 != 11) || (t != 0) {
108                 return locales.PluralRuleOne
109         }
110
111         return locales.PluralRuleOther
112 }
113
114 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'is_IS'
115 func (is *is_IS) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
116         return locales.PluralRuleOther
117 }
118
119 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'is_IS'
120 func (is *is_IS) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
121
122         start := is.CardinalPluralRule(num1, v1)
123         end := is.CardinalPluralRule(num2, v2)
124
125         if start == locales.PluralRuleOne && end == locales.PluralRuleOne {
126                 return locales.PluralRuleOne
127         } else if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
128                 return locales.PluralRuleOther
129         } else if start == locales.PluralRuleOther && end == locales.PluralRuleOne {
130                 return locales.PluralRuleOne
131         }
132
133         return locales.PluralRuleOther
134
135 }
136
137 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
138 func (is *is_IS) MonthAbbreviated(month time.Month) string {
139         return is.monthsAbbreviated[month]
140 }
141
142 // MonthsAbbreviated returns the locales abbreviated months
143 func (is *is_IS) MonthsAbbreviated() []string {
144         return is.monthsAbbreviated[1:]
145 }
146
147 // MonthNarrow returns the locales narrow month given the 'month' provided
148 func (is *is_IS) MonthNarrow(month time.Month) string {
149         return is.monthsNarrow[month]
150 }
151
152 // MonthsNarrow returns the locales narrow months
153 func (is *is_IS) MonthsNarrow() []string {
154         return is.monthsNarrow[1:]
155 }
156
157 // MonthWide returns the locales wide month given the 'month' provided
158 func (is *is_IS) MonthWide(month time.Month) string {
159         return is.monthsWide[month]
160 }
161
162 // MonthsWide returns the locales wide months
163 func (is *is_IS) MonthsWide() []string {
164         return is.monthsWide[1:]
165 }
166
167 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
168 func (is *is_IS) WeekdayAbbreviated(weekday time.Weekday) string {
169         return is.daysAbbreviated[weekday]
170 }
171
172 // WeekdaysAbbreviated returns the locales abbreviated weekdays
173 func (is *is_IS) WeekdaysAbbreviated() []string {
174         return is.daysAbbreviated
175 }
176
177 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
178 func (is *is_IS) WeekdayNarrow(weekday time.Weekday) string {
179         return is.daysNarrow[weekday]
180 }
181
182 // WeekdaysNarrow returns the locales narrow weekdays
183 func (is *is_IS) WeekdaysNarrow() []string {
184         return is.daysNarrow
185 }
186
187 // WeekdayShort returns the locales short weekday given the 'weekday' provided
188 func (is *is_IS) WeekdayShort(weekday time.Weekday) string {
189         return is.daysShort[weekday]
190 }
191
192 // WeekdaysShort returns the locales short weekdays
193 func (is *is_IS) WeekdaysShort() []string {
194         return is.daysShort
195 }
196
197 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
198 func (is *is_IS) WeekdayWide(weekday time.Weekday) string {
199         return is.daysWide[weekday]
200 }
201
202 // WeekdaysWide returns the locales wide weekdays
203 func (is *is_IS) WeekdaysWide() []string {
204         return is.daysWide
205 }
206
207 // Decimal returns the decimal point of number
208 func (is *is_IS) Decimal() string {
209         return is.decimal
210 }
211
212 // Group returns the group of number
213 func (is *is_IS) Group() string {
214         return is.group
215 }
216
217 // Group returns the minus sign of number
218 func (is *is_IS) Minus() string {
219         return is.minus
220 }
221
222 // FmtNumber returns 'num' with digits/precision of 'v' for 'is_IS' and handles both Whole and Real numbers based on 'v'
223 func (is *is_IS) FmtNumber(num float64, v uint64) string {
224
225         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
226         l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3
227         count := 0
228         inWhole := v == 0
229         b := make([]byte, 0, l)
230
231         for i := len(s) - 1; i >= 0; i-- {
232
233                 if s[i] == '.' {
234                         b = append(b, is.decimal[0])
235                         inWhole = true
236                         continue
237                 }
238
239                 if inWhole {
240                         if count == 3 {
241                                 b = append(b, is.group[0])
242                                 count = 1
243                         } else {
244                                 count++
245                         }
246                 }
247
248                 b = append(b, s[i])
249         }
250
251         if num < 0 {
252                 b = append(b, is.minus[0])
253         }
254
255         // reverse
256         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
257                 b[i], b[j] = b[j], b[i]
258         }
259
260         return string(b)
261 }
262
263 // FmtPercent returns 'num' with digits/precision of 'v' for 'is_IS' and handles both Whole and Real numbers based on 'v'
264 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
265 func (is *is_IS) FmtPercent(num float64, v uint64) string {
266         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
267         l := len(s) + 3
268         b := make([]byte, 0, l)
269
270         for i := len(s) - 1; i >= 0; i-- {
271
272                 if s[i] == '.' {
273                         b = append(b, is.decimal[0])
274                         continue
275                 }
276
277                 b = append(b, s[i])
278         }
279
280         if num < 0 {
281                 b = append(b, is.minus[0])
282         }
283
284         // reverse
285         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
286                 b[i], b[j] = b[j], b[i]
287         }
288
289         b = append(b, is.percent...)
290
291         return string(b)
292 }
293
294 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'is_IS'
295 func (is *is_IS) FmtCurrency(num float64, v uint64, currency currency.Type) string {
296
297         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
298         symbol := is.currencies[currency]
299         l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
300         count := 0
301         inWhole := v == 0
302         b := make([]byte, 0, l)
303
304         for i := len(s) - 1; i >= 0; i-- {
305
306                 if s[i] == '.' {
307                         b = append(b, is.decimal[0])
308                         inWhole = true
309                         continue
310                 }
311
312                 if inWhole {
313                         if count == 3 {
314                                 b = append(b, is.group[0])
315                                 count = 1
316                         } else {
317                                 count++
318                         }
319                 }
320
321                 b = append(b, s[i])
322         }
323
324         if num < 0 {
325                 b = append(b, is.minus[0])
326         }
327
328         // reverse
329         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
330                 b[i], b[j] = b[j], b[i]
331         }
332
333         if int(v) < 2 {
334
335                 if v == 0 {
336                         b = append(b, is.decimal...)
337                 }
338
339                 for i := 0; i < 2-int(v); i++ {
340                         b = append(b, '0')
341                 }
342         }
343
344         b = append(b, is.currencyPositiveSuffix...)
345
346         b = append(b, symbol...)
347
348         return string(b)
349 }
350
351 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'is_IS'
352 // in accounting notation.
353 func (is *is_IS) FmtAccounting(num float64, v uint64, currency currency.Type) string {
354
355         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
356         symbol := is.currencies[currency]
357         l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
358         count := 0
359         inWhole := v == 0
360         b := make([]byte, 0, l)
361
362         for i := len(s) - 1; i >= 0; i-- {
363
364                 if s[i] == '.' {
365                         b = append(b, is.decimal[0])
366                         inWhole = true
367                         continue
368                 }
369
370                 if inWhole {
371                         if count == 3 {
372                                 b = append(b, is.group[0])
373                                 count = 1
374                         } else {
375                                 count++
376                         }
377                 }
378
379                 b = append(b, s[i])
380         }
381
382         if num < 0 {
383
384                 b = append(b, is.minus[0])
385
386         }
387
388         // reverse
389         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
390                 b[i], b[j] = b[j], b[i]
391         }
392
393         if int(v) < 2 {
394
395                 if v == 0 {
396                         b = append(b, is.decimal...)
397                 }
398
399                 for i := 0; i < 2-int(v); i++ {
400                         b = append(b, '0')
401                 }
402         }
403
404         if num < 0 {
405                 b = append(b, is.currencyNegativeSuffix...)
406                 b = append(b, symbol...)
407         } else {
408
409                 b = append(b, is.currencyPositiveSuffix...)
410                 b = append(b, symbol...)
411         }
412
413         return string(b)
414 }
415
416 // FmtDateShort returns the short date representation of 't' for 'is_IS'
417 func (is *is_IS) FmtDateShort(t time.Time) string {
418
419         b := make([]byte, 0, 32)
420
421         b = strconv.AppendInt(b, int64(t.Day()), 10)
422         b = append(b, []byte{0x2e}...)
423         b = strconv.AppendInt(b, int64(t.Month()), 10)
424         b = append(b, []byte{0x2e}...)
425
426         if t.Year() > 0 {
427                 b = strconv.AppendInt(b, int64(t.Year()), 10)
428         } else {
429                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
430         }
431
432         return string(b)
433 }
434
435 // FmtDateMedium returns the medium date representation of 't' for 'is_IS'
436 func (is *is_IS) FmtDateMedium(t time.Time) string {
437
438         b := make([]byte, 0, 32)
439
440         b = strconv.AppendInt(b, int64(t.Day()), 10)
441         b = append(b, []byte{0x2e, 0x20}...)
442         b = append(b, is.monthsAbbreviated[t.Month()]...)
443         b = append(b, []byte{0x20}...)
444
445         if t.Year() > 0 {
446                 b = strconv.AppendInt(b, int64(t.Year()), 10)
447         } else {
448                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
449         }
450
451         return string(b)
452 }
453
454 // FmtDateLong returns the long date representation of 't' for 'is_IS'
455 func (is *is_IS) FmtDateLong(t time.Time) string {
456
457         b := make([]byte, 0, 32)
458
459         b = strconv.AppendInt(b, int64(t.Day()), 10)
460         b = append(b, []byte{0x2e, 0x20}...)
461         b = append(b, is.monthsWide[t.Month()]...)
462         b = append(b, []byte{0x20}...)
463
464         if t.Year() > 0 {
465                 b = strconv.AppendInt(b, int64(t.Year()), 10)
466         } else {
467                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
468         }
469
470         return string(b)
471 }
472
473 // FmtDateFull returns the full date representation of 't' for 'is_IS'
474 func (is *is_IS) FmtDateFull(t time.Time) string {
475
476         b := make([]byte, 0, 32)
477
478         b = append(b, is.daysWide[t.Weekday()]...)
479         b = append(b, []byte{0x2c, 0x20}...)
480         b = strconv.AppendInt(b, int64(t.Day()), 10)
481         b = append(b, []byte{0x2e, 0x20}...)
482         b = append(b, is.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 // FmtTimeShort returns the short time representation of 't' for 'is_IS'
495 func (is *is_IS) FmtTimeShort(t time.Time) string {
496
497         b := make([]byte, 0, 32)
498
499         if t.Hour() < 10 {
500                 b = append(b, '0')
501         }
502
503         b = strconv.AppendInt(b, int64(t.Hour()), 10)
504         b = append(b, is.timeSeparator...)
505
506         if t.Minute() < 10 {
507                 b = append(b, '0')
508         }
509
510         b = strconv.AppendInt(b, int64(t.Minute()), 10)
511
512         return string(b)
513 }
514
515 // FmtTimeMedium returns the medium time representation of 't' for 'is_IS'
516 func (is *is_IS) FmtTimeMedium(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, is.timeSeparator...)
526
527         if t.Minute() < 10 {
528                 b = append(b, '0')
529         }
530
531         b = strconv.AppendInt(b, int64(t.Minute()), 10)
532         b = append(b, is.timeSeparator...)
533
534         if t.Second() < 10 {
535                 b = append(b, '0')
536         }
537
538         b = strconv.AppendInt(b, int64(t.Second()), 10)
539
540         return string(b)
541 }
542
543 // FmtTimeLong returns the long time representation of 't' for 'is_IS'
544 func (is *is_IS) FmtTimeLong(t time.Time) string {
545
546         b := make([]byte, 0, 32)
547
548         if t.Hour() < 10 {
549                 b = append(b, '0')
550         }
551
552         b = strconv.AppendInt(b, int64(t.Hour()), 10)
553         b = append(b, is.timeSeparator...)
554
555         if t.Minute() < 10 {
556                 b = append(b, '0')
557         }
558
559         b = strconv.AppendInt(b, int64(t.Minute()), 10)
560         b = append(b, is.timeSeparator...)
561
562         if t.Second() < 10 {
563                 b = append(b, '0')
564         }
565
566         b = strconv.AppendInt(b, int64(t.Second()), 10)
567         b = append(b, []byte{0x20}...)
568
569         tz, _ := t.Zone()
570         b = append(b, tz...)
571
572         return string(b)
573 }
574
575 // FmtTimeFull returns the full time representation of 't' for 'is_IS'
576 func (is *is_IS) FmtTimeFull(t time.Time) string {
577
578         b := make([]byte, 0, 32)
579
580         if t.Hour() < 10 {
581                 b = append(b, '0')
582         }
583
584         b = strconv.AppendInt(b, int64(t.Hour()), 10)
585         b = append(b, is.timeSeparator...)
586
587         if t.Minute() < 10 {
588                 b = append(b, '0')
589         }
590
591         b = strconv.AppendInt(b, int64(t.Minute()), 10)
592         b = append(b, is.timeSeparator...)
593
594         if t.Second() < 10 {
595                 b = append(b, '0')
596         }
597
598         b = strconv.AppendInt(b, int64(t.Second()), 10)
599         b = append(b, []byte{0x20}...)
600
601         tz, _ := t.Zone()
602
603         if btz, ok := is.timezones[tz]; ok {
604                 b = append(b, btz...)
605         } else {
606                 b = append(b, tz...)
607         }
608
609         return string(b)
610 }