OSDN Git Service

delete miner
[bytom/vapor.git] / vendor / github.com / go-playground / locales / it_SM / it_SM.go
1 package it_SM
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 it_SM 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 'it_SM' locale
45 func New() locales.Translator {
46         return &it_SM{
47                 locale:                 "it_SM",
48                 pluralsCardinal:        []locales.PluralRule{2, 6},
49                 pluralsOrdinal:         []locales.PluralRule{5, 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{"", "gen", "feb", "mar", "apr", "mag", "giu", "lug", "ago", "set", "ott", "nov", "dic"},
62                 monthsNarrow:           []string{"", "G", "F", "M", "A", "M", "G", "L", "A", "S", "O", "N", "D"},
63                 monthsWide:             []string{"", "gennaio", "febbraio", "marzo", "aprile", "maggio", "giugno", "luglio", "agosto", "settembre", "ottobre", "novembre", "dicembre"},
64                 daysAbbreviated:        []string{"dom", "lun", "mar", "mer", "gio", "ven", "sab"},
65                 daysNarrow:             []string{"D", "L", "M", "M", "G", "V", "S"},
66                 daysShort:              []string{"dom", "lun", "mar", "mer", "gio", "ven", "sab"},
67                 daysWide:               []string{"domenica", "lunedì", "martedì", "mercoledì", "giovedì", "venerdì", "sabato"},
68                 periodsAbbreviated:     []string{"AM", "PM"},
69                 periodsNarrow:          []string{"m.", "p."},
70                 periodsWide:            []string{"AM", "PM"},
71                 erasAbbreviated:        []string{"a.C.", "d.C."},
72                 erasNarrow:             []string{"aC", "dC"},
73                 erasWide:               []string{"avanti Cristo", "dopo Cristo"},
74                 timezones:              map[string]string{"AEST": "Ora standard dell’Australia orientale", "HAT": "Ora legale di Terranova", "WIB": "Ora dell’Indonesia occidentale", "PST": "Ora standard del Pacifico USA", "SRT": "Ora del Suriname", "MEZ": "Ora standard dell’Europa centrale", "MDT": "Ora legale Montagne Rocciose USA", "HKST": "Ora legale di Hong Kong", "CHAST": "Ora standard delle Chatham", "UYT": "Ora standard dell’Uruguay", "TMST": "Ora legale del Turkmenistan", "WITA": "Ora dell’Indonesia centrale", "HNEG": "Ora standard della Groenlandia orientale", "HNT": "Ora standard di Terranova", "BOT": "Ora della Bolivia", "WESZ": "Ora legale dell’Europa occidentale", "HECU": "Ora legale di Cuba", "HNPM": "Ora standard di Saint-Pierre e Miquelon", "LHST": "Ora standard di Lord Howe", "IST": "Ora standard dell’India", "AST": "Ora standard dell’Atlantico", "ART": "Ora standard dell’Argentina", "COT": "Ora standard della Colombia", "CAT": "Ora dell’Africa centrale", "ACWST": "Ora standard dell’Australia centroccidentale", "∅∅∅": "Ora legale delle Azzorre", "HEOG": "Ora legale della Groenlandia occidentale", "GFT": "Ora della Guiana francese", "ACST": "Ora standard dell’Australia centrale", "ACDT": "Ora legale dell’Australia centrale", "AWST": "Ora standard dell’Australia occidentale", "UYST": "Ora legale dell’Uruguay", "LHDT": "Ora legale di Lord Howe", "WAT": "Ora standard dell’Africa occidentale", "AKST": "Ora standard dell’Alaska", "AKDT": "Ora legale dell’Alaska", "WEZ": "Ora standard dell’Europa occidentale", "MESZ": "Ora legale dell’Europa centrale", "TMT": "Ora standard del Turkmenistan", "ECT": "Ora dell’Ecuador", "AWDT": "Ora legale dell’Australia occidentale", "HNPMX": "Ora standard del Pacifico (Messico)", "JDT": "Ora legale del Giappone", "OESZ": "Ora legale dell’Europa orientale", "HNNOMX": "Ora standard del Messico nord-occidentale", "ARST": "Ora legale dell’Argentina", "GYT": "Ora della Guyana", "HEPMX": "Ora legale del Pacifico (Messico)", "HNCU": "Ora standard di Cuba", "VET": "Ora del Venezuela", "ADT": "Ora legale dell’Atlantico", "EAT": "Ora dell’Africa orientale", "CLT": "Ora standard del Cile", "ChST": "Ora di Chamorro", "SGT": "Ora di Singapore", "GMT": "Ora del meridiano di Greenwich", "NZDT": "Ora legale della Nuova Zelanda", "JST": "Ora standard del Giappone", "WARST": "Ora legale dell’Argentina occidentale", "WAST": "Ora legale dell’Africa occidentale", "HEEG": "Ora legale della Groenlandia orientale", "OEZ": "Ora standard dell’Europa orientale", "MST": "Ora standard Montagne Rocciose USA", "HENOMX": "Ora legale del Messico nord-occidentale", "COST": "Ora legale della Colombia", "EST": "Ora standard orientale USA", "HAST": "Ora standard delle Isole Hawaii-Aleutine", "HNOG": "Ora standard della Groenlandia occidentale", "CLST": "Ora legale del Cile", "CDT": "Ora legale centrale USA", "MYT": "Ora della Malesia", "WIT": "Ora dell’Indonesia orientale", "NZST": "Ora standard della Nuova Zelanda", "PDT": "Ora legale del Pacifico USA", "CHADT": "Ora legale delle Chatham", "HEPM": "Ora legale di Saint-Pierre e Miquelon", "ACWDT": "Ora legale dell’Australia centroccidentale", "HADT": "Ora legale delle Isole Hawaii-Aleutine", "WART": "Ora standard dell’Argentina occidentale", "SAST": "Ora dell’Africa meridionale", "BT": "Ora del Bhutan", "HKT": "Ora standard di Hong Kong", "EDT": "Ora legale orientale USA", "CST": "Ora standard centrale USA", "AEDT": "Ora legale dell’Australia orientale"},
75         }
76 }
77
78 // Locale returns the current translators string locale
79 func (it *it_SM) Locale() string {
80         return it.locale
81 }
82
83 // PluralsCardinal returns the list of cardinal plural rules associated with 'it_SM'
84 func (it *it_SM) PluralsCardinal() []locales.PluralRule {
85         return it.pluralsCardinal
86 }
87
88 // PluralsOrdinal returns the list of ordinal plural rules associated with 'it_SM'
89 func (it *it_SM) PluralsOrdinal() []locales.PluralRule {
90         return it.pluralsOrdinal
91 }
92
93 // PluralsRange returns the list of range plural rules associated with 'it_SM'
94 func (it *it_SM) PluralsRange() []locales.PluralRule {
95         return it.pluralsRange
96 }
97
98 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'it_SM'
99 func (it *it_SM) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
100
101         n := math.Abs(num)
102         i := int64(n)
103
104         if i == 1 && v == 0 {
105                 return locales.PluralRuleOne
106         }
107
108         return locales.PluralRuleOther
109 }
110
111 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'it_SM'
112 func (it *it_SM) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
113
114         n := math.Abs(num)
115
116         if n == 11 || n == 8 || n == 80 || n == 800 {
117                 return locales.PluralRuleMany
118         }
119
120         return locales.PluralRuleOther
121 }
122
123 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'it_SM'
124 func (it *it_SM) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
125
126         start := it.CardinalPluralRule(num1, v1)
127         end := it.CardinalPluralRule(num2, v2)
128
129         if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
130                 return locales.PluralRuleOther
131         } else if start == locales.PluralRuleOther && end == locales.PluralRuleOne {
132                 return locales.PluralRuleOne
133         }
134
135         return locales.PluralRuleOther
136
137 }
138
139 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
140 func (it *it_SM) MonthAbbreviated(month time.Month) string {
141         return it.monthsAbbreviated[month]
142 }
143
144 // MonthsAbbreviated returns the locales abbreviated months
145 func (it *it_SM) MonthsAbbreviated() []string {
146         return it.monthsAbbreviated[1:]
147 }
148
149 // MonthNarrow returns the locales narrow month given the 'month' provided
150 func (it *it_SM) MonthNarrow(month time.Month) string {
151         return it.monthsNarrow[month]
152 }
153
154 // MonthsNarrow returns the locales narrow months
155 func (it *it_SM) MonthsNarrow() []string {
156         return it.monthsNarrow[1:]
157 }
158
159 // MonthWide returns the locales wide month given the 'month' provided
160 func (it *it_SM) MonthWide(month time.Month) string {
161         return it.monthsWide[month]
162 }
163
164 // MonthsWide returns the locales wide months
165 func (it *it_SM) MonthsWide() []string {
166         return it.monthsWide[1:]
167 }
168
169 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
170 func (it *it_SM) WeekdayAbbreviated(weekday time.Weekday) string {
171         return it.daysAbbreviated[weekday]
172 }
173
174 // WeekdaysAbbreviated returns the locales abbreviated weekdays
175 func (it *it_SM) WeekdaysAbbreviated() []string {
176         return it.daysAbbreviated
177 }
178
179 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
180 func (it *it_SM) WeekdayNarrow(weekday time.Weekday) string {
181         return it.daysNarrow[weekday]
182 }
183
184 // WeekdaysNarrow returns the locales narrow weekdays
185 func (it *it_SM) WeekdaysNarrow() []string {
186         return it.daysNarrow
187 }
188
189 // WeekdayShort returns the locales short weekday given the 'weekday' provided
190 func (it *it_SM) WeekdayShort(weekday time.Weekday) string {
191         return it.daysShort[weekday]
192 }
193
194 // WeekdaysShort returns the locales short weekdays
195 func (it *it_SM) WeekdaysShort() []string {
196         return it.daysShort
197 }
198
199 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
200 func (it *it_SM) WeekdayWide(weekday time.Weekday) string {
201         return it.daysWide[weekday]
202 }
203
204 // WeekdaysWide returns the locales wide weekdays
205 func (it *it_SM) WeekdaysWide() []string {
206         return it.daysWide
207 }
208
209 // Decimal returns the decimal point of number
210 func (it *it_SM) Decimal() string {
211         return it.decimal
212 }
213
214 // Group returns the group of number
215 func (it *it_SM) Group() string {
216         return it.group
217 }
218
219 // Group returns the minus sign of number
220 func (it *it_SM) Minus() string {
221         return it.minus
222 }
223
224 // FmtNumber returns 'num' with digits/precision of 'v' for 'it_SM' and handles both Whole and Real numbers based on 'v'
225 func (it *it_SM) FmtNumber(num float64, v uint64) string {
226
227         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
228         l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3
229         count := 0
230         inWhole := v == 0
231         b := make([]byte, 0, l)
232
233         for i := len(s) - 1; i >= 0; i-- {
234
235                 if s[i] == '.' {
236                         b = append(b, it.decimal[0])
237                         inWhole = true
238                         continue
239                 }
240
241                 if inWhole {
242                         if count == 3 {
243                                 b = append(b, it.group[0])
244                                 count = 1
245                         } else {
246                                 count++
247                         }
248                 }
249
250                 b = append(b, s[i])
251         }
252
253         if num < 0 {
254                 b = append(b, it.minus[0])
255         }
256
257         // reverse
258         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
259                 b[i], b[j] = b[j], b[i]
260         }
261
262         return string(b)
263 }
264
265 // FmtPercent returns 'num' with digits/precision of 'v' for 'it_SM' and handles both Whole and Real numbers based on 'v'
266 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
267 func (it *it_SM) FmtPercent(num float64, v uint64) string {
268         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
269         l := len(s) + 3
270         b := make([]byte, 0, l)
271
272         for i := len(s) - 1; i >= 0; i-- {
273
274                 if s[i] == '.' {
275                         b = append(b, it.decimal[0])
276                         continue
277                 }
278
279                 b = append(b, s[i])
280         }
281
282         if num < 0 {
283                 b = append(b, it.minus[0])
284         }
285
286         // reverse
287         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
288                 b[i], b[j] = b[j], b[i]
289         }
290
291         b = append(b, it.percent...)
292
293         return string(b)
294 }
295
296 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'it_SM'
297 func (it *it_SM) FmtCurrency(num float64, v uint64, currency currency.Type) string {
298
299         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
300         symbol := it.currencies[currency]
301         l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
302         count := 0
303         inWhole := v == 0
304         b := make([]byte, 0, l)
305
306         for i := len(s) - 1; i >= 0; i-- {
307
308                 if s[i] == '.' {
309                         b = append(b, it.decimal[0])
310                         inWhole = true
311                         continue
312                 }
313
314                 if inWhole {
315                         if count == 3 {
316                                 b = append(b, it.group[0])
317                                 count = 1
318                         } else {
319                                 count++
320                         }
321                 }
322
323                 b = append(b, s[i])
324         }
325
326         if num < 0 {
327                 b = append(b, it.minus[0])
328         }
329
330         // reverse
331         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
332                 b[i], b[j] = b[j], b[i]
333         }
334
335         if int(v) < 2 {
336
337                 if v == 0 {
338                         b = append(b, it.decimal...)
339                 }
340
341                 for i := 0; i < 2-int(v); i++ {
342                         b = append(b, '0')
343                 }
344         }
345
346         b = append(b, it.currencyPositiveSuffix...)
347
348         b = append(b, symbol...)
349
350         return string(b)
351 }
352
353 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'it_SM'
354 // in accounting notation.
355 func (it *it_SM) FmtAccounting(num float64, v uint64, currency currency.Type) string {
356
357         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
358         symbol := it.currencies[currency]
359         l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
360         count := 0
361         inWhole := v == 0
362         b := make([]byte, 0, l)
363
364         for i := len(s) - 1; i >= 0; i-- {
365
366                 if s[i] == '.' {
367                         b = append(b, it.decimal[0])
368                         inWhole = true
369                         continue
370                 }
371
372                 if inWhole {
373                         if count == 3 {
374                                 b = append(b, it.group[0])
375                                 count = 1
376                         } else {
377                                 count++
378                         }
379                 }
380
381                 b = append(b, s[i])
382         }
383
384         if num < 0 {
385
386                 b = append(b, it.minus[0])
387
388         }
389
390         // reverse
391         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
392                 b[i], b[j] = b[j], b[i]
393         }
394
395         if int(v) < 2 {
396
397                 if v == 0 {
398                         b = append(b, it.decimal...)
399                 }
400
401                 for i := 0; i < 2-int(v); i++ {
402                         b = append(b, '0')
403                 }
404         }
405
406         if num < 0 {
407                 b = append(b, it.currencyNegativeSuffix...)
408                 b = append(b, symbol...)
409         } else {
410
411                 b = append(b, it.currencyPositiveSuffix...)
412                 b = append(b, symbol...)
413         }
414
415         return string(b)
416 }
417
418 // FmtDateShort returns the short date representation of 't' for 'it_SM'
419 func (it *it_SM) FmtDateShort(t time.Time) string {
420
421         b := make([]byte, 0, 32)
422
423         if t.Day() < 10 {
424                 b = append(b, '0')
425         }
426
427         b = strconv.AppendInt(b, int64(t.Day()), 10)
428         b = append(b, []byte{0x2f}...)
429
430         if t.Month() < 10 {
431                 b = append(b, '0')
432         }
433
434         b = strconv.AppendInt(b, int64(t.Month()), 10)
435
436         b = append(b, []byte{0x2f}...)
437
438         if t.Year() > 9 {
439                 b = append(b, strconv.Itoa(t.Year())[2:]...)
440         } else {
441                 b = append(b, strconv.Itoa(t.Year())[1:]...)
442         }
443
444         return string(b)
445 }
446
447 // FmtDateMedium returns the medium date representation of 't' for 'it_SM'
448 func (it *it_SM) FmtDateMedium(t time.Time) string {
449
450         b := make([]byte, 0, 32)
451
452         if t.Day() < 10 {
453                 b = append(b, '0')
454         }
455
456         b = strconv.AppendInt(b, int64(t.Day()), 10)
457         b = append(b, []byte{0x20}...)
458         b = append(b, it.monthsAbbreviated[t.Month()]...)
459         b = append(b, []byte{0x20}...)
460
461         if t.Year() > 0 {
462                 b = strconv.AppendInt(b, int64(t.Year()), 10)
463         } else {
464                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
465         }
466
467         return string(b)
468 }
469
470 // FmtDateLong returns the long date representation of 't' for 'it_SM'
471 func (it *it_SM) FmtDateLong(t time.Time) string {
472
473         b := make([]byte, 0, 32)
474
475         b = strconv.AppendInt(b, int64(t.Day()), 10)
476         b = append(b, []byte{0x20}...)
477         b = append(b, it.monthsWide[t.Month()]...)
478         b = append(b, []byte{0x20}...)
479
480         if t.Year() > 0 {
481                 b = strconv.AppendInt(b, int64(t.Year()), 10)
482         } else {
483                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
484         }
485
486         return string(b)
487 }
488
489 // FmtDateFull returns the full date representation of 't' for 'it_SM'
490 func (it *it_SM) FmtDateFull(t time.Time) string {
491
492         b := make([]byte, 0, 32)
493
494         b = append(b, it.daysWide[t.Weekday()]...)
495         b = append(b, []byte{0x20}...)
496         b = strconv.AppendInt(b, int64(t.Day()), 10)
497         b = append(b, []byte{0x20}...)
498         b = append(b, it.monthsWide[t.Month()]...)
499         b = append(b, []byte{0x20}...)
500
501         if t.Year() > 0 {
502                 b = strconv.AppendInt(b, int64(t.Year()), 10)
503         } else {
504                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
505         }
506
507         return string(b)
508 }
509
510 // FmtTimeShort returns the short time representation of 't' for 'it_SM'
511 func (it *it_SM) FmtTimeShort(t time.Time) string {
512
513         b := make([]byte, 0, 32)
514
515         if t.Hour() < 10 {
516                 b = append(b, '0')
517         }
518
519         b = strconv.AppendInt(b, int64(t.Hour()), 10)
520         b = append(b, it.timeSeparator...)
521
522         if t.Minute() < 10 {
523                 b = append(b, '0')
524         }
525
526         b = strconv.AppendInt(b, int64(t.Minute()), 10)
527
528         return string(b)
529 }
530
531 // FmtTimeMedium returns the medium time representation of 't' for 'it_SM'
532 func (it *it_SM) FmtTimeMedium(t time.Time) string {
533
534         b := make([]byte, 0, 32)
535
536         if t.Hour() < 10 {
537                 b = append(b, '0')
538         }
539
540         b = strconv.AppendInt(b, int64(t.Hour()), 10)
541         b = append(b, it.timeSeparator...)
542
543         if t.Minute() < 10 {
544                 b = append(b, '0')
545         }
546
547         b = strconv.AppendInt(b, int64(t.Minute()), 10)
548         b = append(b, it.timeSeparator...)
549
550         if t.Second() < 10 {
551                 b = append(b, '0')
552         }
553
554         b = strconv.AppendInt(b, int64(t.Second()), 10)
555
556         return string(b)
557 }
558
559 // FmtTimeLong returns the long time representation of 't' for 'it_SM'
560 func (it *it_SM) FmtTimeLong(t time.Time) string {
561
562         b := make([]byte, 0, 32)
563
564         if t.Hour() < 10 {
565                 b = append(b, '0')
566         }
567
568         b = strconv.AppendInt(b, int64(t.Hour()), 10)
569         b = append(b, it.timeSeparator...)
570
571         if t.Minute() < 10 {
572                 b = append(b, '0')
573         }
574
575         b = strconv.AppendInt(b, int64(t.Minute()), 10)
576         b = append(b, it.timeSeparator...)
577
578         if t.Second() < 10 {
579                 b = append(b, '0')
580         }
581
582         b = strconv.AppendInt(b, int64(t.Second()), 10)
583         b = append(b, []byte{0x20}...)
584
585         tz, _ := t.Zone()
586         b = append(b, tz...)
587
588         return string(b)
589 }
590
591 // FmtTimeFull returns the full time representation of 't' for 'it_SM'
592 func (it *it_SM) FmtTimeFull(t time.Time) string {
593
594         b := make([]byte, 0, 32)
595
596         if t.Hour() < 10 {
597                 b = append(b, '0')
598         }
599
600         b = strconv.AppendInt(b, int64(t.Hour()), 10)
601         b = append(b, it.timeSeparator...)
602
603         if t.Minute() < 10 {
604                 b = append(b, '0')
605         }
606
607         b = strconv.AppendInt(b, int64(t.Minute()), 10)
608         b = append(b, it.timeSeparator...)
609
610         if t.Second() < 10 {
611                 b = append(b, '0')
612         }
613
614         b = strconv.AppendInt(b, int64(t.Second()), 10)
615         b = append(b, []byte{0x20}...)
616
617         tz, _ := t.Zone()
618
619         if btz, ok := it.timezones[tz]; ok {
620                 b = append(b, btz...)
621         } else {
622                 b = append(b, tz...)
623         }
624
625         return string(b)
626 }