OSDN Git Service

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