OSDN Git Service

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