OSDN Git Service

delete miner
[bytom/vapor.git] / vendor / github.com / go-playground / locales / ar_DZ / ar_DZ.go
1 package ar_DZ
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 ar_DZ struct {
13         locale                 string
14         pluralsCardinal        []locales.PluralRule
15         pluralsOrdinal         []locales.PluralRule
16         pluralsRange           []locales.PluralRule
17         decimal                string
18         group                  string
19         minus                  string
20         percent                string
21         percentSuffix          string
22         perMille               string
23         timeSeparator          string
24         inifinity              string
25         currencies             []string // idx = enum of currency code
26         currencyPositiveSuffix string
27         currencyNegativeSuffix string
28         monthsAbbreviated      []string
29         monthsNarrow           []string
30         monthsWide             []string
31         daysAbbreviated        []string
32         daysNarrow             []string
33         daysShort              []string
34         daysWide               []string
35         periodsAbbreviated     []string
36         periodsNarrow          []string
37         periodsShort           []string
38         periodsWide            []string
39         erasAbbreviated        []string
40         erasNarrow             []string
41         erasWide               []string
42         timezones              map[string]string
43 }
44
45 // New returns a new instance of translator for the 'ar_DZ' locale
46 func New() locales.Translator {
47         return &ar_DZ{
48                 locale:                 "ar_DZ",
49                 pluralsCardinal:        []locales.PluralRule{1, 2, 3, 4, 5, 6},
50                 pluralsOrdinal:         []locales.PluralRule{6},
51                 pluralsRange:           []locales.PluralRule{1, 4, 5, 6},
52                 decimal:                ",",
53                 group:                  ".",
54                 minus:                  "؜-",
55                 percent:                "٪؜",
56                 perMille:               "؉",
57                 timeSeparator:          ":",
58                 inifinity:              "∞",
59                 currencies:             []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"},
60                 percentSuffix:          " ",
61                 currencyPositiveSuffix: " ",
62                 currencyNegativeSuffix: " ",
63                 monthsAbbreviated:      []string{"", "جانفي", "فيفري", "مارس", "أفريل", "ماي", "جوان", "جويلية", "أوت", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"},
64                 monthsNarrow:           []string{"", "ج", "ف", "م", "أ", "م", "ج", "ج", "أ", "س", "أ", "ن", "د"},
65                 monthsWide:             []string{"", "جانفي", "فيفري", "مارس", "أفريل", "ماي", "جوان", "جويلية", "أوت", "سبتمبر", "أكتوبر", "نوفمبر", "ديسمبر"},
66                 daysAbbreviated:        []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"},
67                 daysNarrow:             []string{"ح", "ن", "ث", "ر", "خ", "ج", "س"},
68                 daysShort:              []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"},
69                 daysWide:               []string{"الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"},
70                 periodsAbbreviated:     []string{"ص", "م"},
71                 periodsNarrow:          []string{"ص", "م"},
72                 periodsWide:            []string{"ص", "م"},
73                 erasAbbreviated:        []string{"", ""},
74                 erasNarrow:             []string{"", ""},
75                 erasWide:               []string{"", ""},
76                 timezones:              map[string]string{"HNCU": "توقيت كوبا الرسمي", "WART": "توقيت غرب الأرجنتين الرسمي", "AEST": "توقيت شرق أستراليا الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "WESZ": "توقيت غرب أوروبا الصيفي", "SGT": "توقيت سنغافورة", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "OEZ": "توقيت شرق أوروبا الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "JST": "توقيت اليابان الرسمي", "COST": "توقيت كولومبيا الصيفي", "HNT": "توقيت نيوفاوندلاند الرسمي", "HAT": "توقيت نيوفاوندلاند الصيفي", "CHADT": "توقيت تشاتام الصيفي", "SRT": "توقيت سورينام", "UYT": "توقيت أورغواي الرسمي", "HADT": "توقيت هاواي ألوتيان الصيفي", "OESZ": "توقيت شرق أوروبا الصيفي", "CLT": "توقيت شيلي الرسمي", "PDT": "توقيت المحيط الهادي الصيفي", "MDT": "MDT", "MYT": "توقيت ماليزيا", "MEZ": "توقيت وسط أوروبا الرسمي", "IST": "توقيت الهند", "ART": "توقيت الأرجنتين الرسمي", "ARST": "توقيت الأرجنتين الصيفي", "ChST": "توقيت تشامورو", "PST": "توقيت المحيط الهادي الرسمي", "AEDT": "توقيت شرق أستراليا الصيفي", "WAST": "توقيت غرب أفريقيا الصيفي", "ECT": "توقيت الإكوادور", "AKDT": "توقيت ألاسكا الصيفي", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "WITA": "توقيت وسط إندونيسيا", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "WIT": "توقيت شرق إندونيسيا", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "HEEG": "توقيت شرق غرينلاند الصيفي", "WEZ": "توقيت غرب أوروبا الرسمي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "AWDT": "توقيت غرب أستراليا الصيفي", "WARST": "توقيت غرب الأرجنتين الصيفي", "COT": "توقيت كولومبيا الرسمي", "WIB": "توقيت غرب إندونيسيا", "CHAST": "توقيت تشاتام الرسمي", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "CLST": "توقيت شيلي الصيفي", "CAT": "توقيت وسط أفريقيا", "BT": "توقيت بوتان", "EAT": "توقيت شرق أفريقيا", "TMT": "توقيت تركمانستان الرسمي", "HNEG": "توقيت شرق غرينلاند الرسمي", "AST": "التوقيت الرسمي الأطلسي", "AWST": "توقيت غرب أستراليا الرسمي", "JDT": "توقيت اليابان الصيفي", "HNOG": "توقيت غرب غرينلاند الرسمي", "HEOG": "توقيت غرب غرينلاند الصيفي", "WAT": "توقيت غرب أفريقيا الرسمي", "HKT": "توقيت هونغ كونغ الرسمي", "GFT": "توقيت غايانا الفرنسية", "ACST": "توقيت وسط أستراليا الرسمي", "HECU": "توقيت كوبا الصيفي", "UYST": "توقيت أورغواي الصيفي", "NZDT": "توقيت نيوزيلندا الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "GYT": "توقيت غيانا", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "NZST": "توقيت نيوزيلندا الرسمي", "LHST": "توقيت لورد هاو الرسمي", "VET": "توقيت فنزويلا", "GMT": "توقيت غرينتش", "CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "HAST": "توقيت هاواي ألوتيان الرسمي", "TMST": "توقيت تركمانستان الصيفي", "ADT": "التوقيت الصيفي الأطلسي", "SAST": "توقيت جنوب أفريقيا", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "BOT": "توقيت بوليفيا", "MST": "MST", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "MESZ": "توقيت وسط أوروبا الصيفي", "AKST": "التوقيت الرسمي لألاسكا", "∅∅∅": "توقيت بيرو الصيفي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك"},
77         }
78 }
79
80 // Locale returns the current translators string locale
81 func (ar *ar_DZ) Locale() string {
82         return ar.locale
83 }
84
85 // PluralsCardinal returns the list of cardinal plural rules associated with 'ar_DZ'
86 func (ar *ar_DZ) PluralsCardinal() []locales.PluralRule {
87         return ar.pluralsCardinal
88 }
89
90 // PluralsOrdinal returns the list of ordinal plural rules associated with 'ar_DZ'
91 func (ar *ar_DZ) PluralsOrdinal() []locales.PluralRule {
92         return ar.pluralsOrdinal
93 }
94
95 // PluralsRange returns the list of range plural rules associated with 'ar_DZ'
96 func (ar *ar_DZ) PluralsRange() []locales.PluralRule {
97         return ar.pluralsRange
98 }
99
100 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'ar_DZ'
101 func (ar *ar_DZ) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
102
103         n := math.Abs(num)
104         nMod100 := math.Mod(n, 100)
105
106         if n == 0 {
107                 return locales.PluralRuleZero
108         } else if n == 1 {
109                 return locales.PluralRuleOne
110         } else if n == 2 {
111                 return locales.PluralRuleTwo
112         } else if nMod100 >= 3 && nMod100 <= 10 {
113                 return locales.PluralRuleFew
114         } else if nMod100 >= 11 && nMod100 <= 99 {
115                 return locales.PluralRuleMany
116         }
117
118         return locales.PluralRuleOther
119 }
120
121 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'ar_DZ'
122 func (ar *ar_DZ) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
123         return locales.PluralRuleOther
124 }
125
126 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'ar_DZ'
127 func (ar *ar_DZ) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
128
129         start := ar.CardinalPluralRule(num1, v1)
130         end := ar.CardinalPluralRule(num2, v2)
131
132         if start == locales.PluralRuleZero && end == locales.PluralRuleOne {
133                 return locales.PluralRuleZero
134         } else if start == locales.PluralRuleZero && end == locales.PluralRuleTwo {
135                 return locales.PluralRuleZero
136         } else if start == locales.PluralRuleZero && end == locales.PluralRuleFew {
137                 return locales.PluralRuleFew
138         } else if start == locales.PluralRuleZero && end == locales.PluralRuleMany {
139                 return locales.PluralRuleMany
140         } else if start == locales.PluralRuleZero && end == locales.PluralRuleOther {
141                 return locales.PluralRuleOther
142         } else if start == locales.PluralRuleOne && end == locales.PluralRuleTwo {
143                 return locales.PluralRuleOther
144         } else if start == locales.PluralRuleOne && end == locales.PluralRuleFew {
145                 return locales.PluralRuleFew
146         } else if start == locales.PluralRuleOne && end == locales.PluralRuleMany {
147                 return locales.PluralRuleMany
148         } else if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
149                 return locales.PluralRuleOther
150         } else if start == locales.PluralRuleTwo && end == locales.PluralRuleFew {
151                 return locales.PluralRuleFew
152         } else if start == locales.PluralRuleTwo && end == locales.PluralRuleMany {
153                 return locales.PluralRuleMany
154         } else if start == locales.PluralRuleTwo && end == locales.PluralRuleOther {
155                 return locales.PluralRuleOther
156         } else if start == locales.PluralRuleFew && end == locales.PluralRuleFew {
157                 return locales.PluralRuleFew
158         } else if start == locales.PluralRuleFew && end == locales.PluralRuleMany {
159                 return locales.PluralRuleMany
160         } else if start == locales.PluralRuleFew && end == locales.PluralRuleOther {
161                 return locales.PluralRuleOther
162         } else if start == locales.PluralRuleMany && end == locales.PluralRuleFew {
163                 return locales.PluralRuleFew
164         } else if start == locales.PluralRuleMany && end == locales.PluralRuleMany {
165                 return locales.PluralRuleMany
166         } else if start == locales.PluralRuleMany && end == locales.PluralRuleOther {
167                 return locales.PluralRuleOther
168         } else if start == locales.PluralRuleOther && end == locales.PluralRuleOne {
169                 return locales.PluralRuleOther
170         } else if start == locales.PluralRuleOther && end == locales.PluralRuleTwo {
171                 return locales.PluralRuleOther
172         } else if start == locales.PluralRuleOther && end == locales.PluralRuleFew {
173                 return locales.PluralRuleFew
174         } else if start == locales.PluralRuleOther && end == locales.PluralRuleMany {
175                 return locales.PluralRuleMany
176         }
177
178         return locales.PluralRuleOther
179
180 }
181
182 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
183 func (ar *ar_DZ) MonthAbbreviated(month time.Month) string {
184         return ar.monthsAbbreviated[month]
185 }
186
187 // MonthsAbbreviated returns the locales abbreviated months
188 func (ar *ar_DZ) MonthsAbbreviated() []string {
189         return ar.monthsAbbreviated[1:]
190 }
191
192 // MonthNarrow returns the locales narrow month given the 'month' provided
193 func (ar *ar_DZ) MonthNarrow(month time.Month) string {
194         return ar.monthsNarrow[month]
195 }
196
197 // MonthsNarrow returns the locales narrow months
198 func (ar *ar_DZ) MonthsNarrow() []string {
199         return ar.monthsNarrow[1:]
200 }
201
202 // MonthWide returns the locales wide month given the 'month' provided
203 func (ar *ar_DZ) MonthWide(month time.Month) string {
204         return ar.monthsWide[month]
205 }
206
207 // MonthsWide returns the locales wide months
208 func (ar *ar_DZ) MonthsWide() []string {
209         return ar.monthsWide[1:]
210 }
211
212 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
213 func (ar *ar_DZ) WeekdayAbbreviated(weekday time.Weekday) string {
214         return ar.daysAbbreviated[weekday]
215 }
216
217 // WeekdaysAbbreviated returns the locales abbreviated weekdays
218 func (ar *ar_DZ) WeekdaysAbbreviated() []string {
219         return ar.daysAbbreviated
220 }
221
222 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
223 func (ar *ar_DZ) WeekdayNarrow(weekday time.Weekday) string {
224         return ar.daysNarrow[weekday]
225 }
226
227 // WeekdaysNarrow returns the locales narrow weekdays
228 func (ar *ar_DZ) WeekdaysNarrow() []string {
229         return ar.daysNarrow
230 }
231
232 // WeekdayShort returns the locales short weekday given the 'weekday' provided
233 func (ar *ar_DZ) WeekdayShort(weekday time.Weekday) string {
234         return ar.daysShort[weekday]
235 }
236
237 // WeekdaysShort returns the locales short weekdays
238 func (ar *ar_DZ) WeekdaysShort() []string {
239         return ar.daysShort
240 }
241
242 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
243 func (ar *ar_DZ) WeekdayWide(weekday time.Weekday) string {
244         return ar.daysWide[weekday]
245 }
246
247 // WeekdaysWide returns the locales wide weekdays
248 func (ar *ar_DZ) WeekdaysWide() []string {
249         return ar.daysWide
250 }
251
252 // Decimal returns the decimal point of number
253 func (ar *ar_DZ) Decimal() string {
254         return ar.decimal
255 }
256
257 // Group returns the group of number
258 func (ar *ar_DZ) Group() string {
259         return ar.group
260 }
261
262 // Group returns the minus sign of number
263 func (ar *ar_DZ) Minus() string {
264         return ar.minus
265 }
266
267 // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_DZ' and handles both Whole and Real numbers based on 'v'
268 func (ar *ar_DZ) FmtNumber(num float64, v uint64) string {
269
270         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
271         l := len(s) + 4 + 1*len(s[:len(s)-int(v)-1])/3
272         count := 0
273         inWhole := v == 0
274         b := make([]byte, 0, l)
275
276         for i := len(s) - 1; i >= 0; i-- {
277
278                 if s[i] == '.' {
279                         b = append(b, ar.decimal[0])
280                         inWhole = true
281                         continue
282                 }
283
284                 if inWhole {
285                         if count == 3 {
286                                 b = append(b, ar.group[0])
287                                 count = 1
288                         } else {
289                                 count++
290                         }
291                 }
292
293                 b = append(b, s[i])
294         }
295
296         if num < 0 {
297                 for j := len(ar.minus) - 1; j >= 0; j-- {
298                         b = append(b, ar.minus[j])
299                 }
300         }
301
302         // reverse
303         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
304                 b[i], b[j] = b[j], b[i]
305         }
306
307         return string(b)
308 }
309
310 // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_DZ' and handles both Whole and Real numbers based on 'v'
311 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
312 func (ar *ar_DZ) FmtPercent(num float64, v uint64) string {
313         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
314         l := len(s) + 10
315         b := make([]byte, 0, l)
316
317         for i := len(s) - 1; i >= 0; i-- {
318
319                 if s[i] == '.' {
320                         b = append(b, ar.decimal[0])
321                         continue
322                 }
323
324                 b = append(b, s[i])
325         }
326
327         if num < 0 {
328                 for j := len(ar.minus) - 1; j >= 0; j-- {
329                         b = append(b, ar.minus[j])
330                 }
331         }
332
333         // reverse
334         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
335                 b[i], b[j] = b[j], b[i]
336         }
337
338         b = append(b, ar.percentSuffix...)
339
340         b = append(b, ar.percent...)
341
342         return string(b)
343 }
344
345 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_DZ'
346 func (ar *ar_DZ) FmtCurrency(num float64, v uint64, currency currency.Type) string {
347
348         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
349         symbol := ar.currencies[currency]
350         l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3
351         count := 0
352         inWhole := v == 0
353         b := make([]byte, 0, l)
354
355         for i := len(s) - 1; i >= 0; i-- {
356
357                 if s[i] == '.' {
358                         b = append(b, ar.decimal[0])
359                         inWhole = true
360                         continue
361                 }
362
363                 if inWhole {
364                         if count == 3 {
365                                 b = append(b, ar.group[0])
366                                 count = 1
367                         } else {
368                                 count++
369                         }
370                 }
371
372                 b = append(b, s[i])
373         }
374
375         if num < 0 {
376                 for j := len(ar.minus) - 1; j >= 0; j-- {
377                         b = append(b, ar.minus[j])
378                 }
379         }
380
381         // reverse
382         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
383                 b[i], b[j] = b[j], b[i]
384         }
385
386         if int(v) < 2 {
387
388                 if v == 0 {
389                         b = append(b, ar.decimal...)
390                 }
391
392                 for i := 0; i < 2-int(v); i++ {
393                         b = append(b, '0')
394                 }
395         }
396
397         b = append(b, ar.currencyPositiveSuffix...)
398
399         b = append(b, symbol...)
400
401         return string(b)
402 }
403
404 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_DZ'
405 // in accounting notation.
406 func (ar *ar_DZ) FmtAccounting(num float64, v uint64, currency currency.Type) string {
407
408         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
409         symbol := ar.currencies[currency]
410         l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3
411         count := 0
412         inWhole := v == 0
413         b := make([]byte, 0, l)
414
415         for i := len(s) - 1; i >= 0; i-- {
416
417                 if s[i] == '.' {
418                         b = append(b, ar.decimal[0])
419                         inWhole = true
420                         continue
421                 }
422
423                 if inWhole {
424                         if count == 3 {
425                                 b = append(b, ar.group[0])
426                                 count = 1
427                         } else {
428                                 count++
429                         }
430                 }
431
432                 b = append(b, s[i])
433         }
434
435         if num < 0 {
436
437                 for j := len(ar.minus) - 1; j >= 0; j-- {
438                         b = append(b, ar.minus[j])
439                 }
440
441         }
442
443         // reverse
444         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
445                 b[i], b[j] = b[j], b[i]
446         }
447
448         if int(v) < 2 {
449
450                 if v == 0 {
451                         b = append(b, ar.decimal...)
452                 }
453
454                 for i := 0; i < 2-int(v); i++ {
455                         b = append(b, '0')
456                 }
457         }
458
459         if num < 0 {
460                 b = append(b, ar.currencyNegativeSuffix...)
461                 b = append(b, symbol...)
462         } else {
463
464                 b = append(b, ar.currencyPositiveSuffix...)
465                 b = append(b, symbol...)
466         }
467
468         return string(b)
469 }
470
471 // FmtDateShort returns the short date representation of 't' for 'ar_DZ'
472 func (ar *ar_DZ) FmtDateShort(t time.Time) string {
473
474         b := make([]byte, 0, 32)
475
476         b = strconv.AppendInt(b, int64(t.Day()), 10)
477         b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...)
478         b = strconv.AppendInt(b, int64(t.Month()), 10)
479         b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...)
480
481         if t.Year() > 0 {
482                 b = strconv.AppendInt(b, int64(t.Year()), 10)
483         } else {
484                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
485         }
486
487         return string(b)
488 }
489
490 // FmtDateMedium returns the medium date representation of 't' for 'ar_DZ'
491 func (ar *ar_DZ) FmtDateMedium(t time.Time) string {
492
493         b := make([]byte, 0, 32)
494
495         if t.Day() < 10 {
496                 b = append(b, '0')
497         }
498
499         b = strconv.AppendInt(b, int64(t.Day()), 10)
500         b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...)
501
502         if t.Month() < 10 {
503                 b = append(b, '0')
504         }
505
506         b = strconv.AppendInt(b, int64(t.Month()), 10)
507
508         b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...)
509
510         if t.Year() > 0 {
511                 b = strconv.AppendInt(b, int64(t.Year()), 10)
512         } else {
513                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
514         }
515
516         return string(b)
517 }
518
519 // FmtDateLong returns the long date representation of 't' for 'ar_DZ'
520 func (ar *ar_DZ) FmtDateLong(t time.Time) string {
521
522         b := make([]byte, 0, 32)
523
524         b = strconv.AppendInt(b, int64(t.Day()), 10)
525         b = append(b, []byte{0x20}...)
526         b = append(b, ar.monthsWide[t.Month()]...)
527         b = append(b, []byte{0xd8, 0x8c, 0x20}...)
528
529         if t.Year() > 0 {
530                 b = strconv.AppendInt(b, int64(t.Year()), 10)
531         } else {
532                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
533         }
534
535         return string(b)
536 }
537
538 // FmtDateFull returns the full date representation of 't' for 'ar_DZ'
539 func (ar *ar_DZ) FmtDateFull(t time.Time) string {
540
541         b := make([]byte, 0, 32)
542
543         b = append(b, ar.daysWide[t.Weekday()]...)
544         b = append(b, []byte{0xd8, 0x8c, 0x20}...)
545         b = strconv.AppendInt(b, int64(t.Day()), 10)
546         b = append(b, []byte{0x20}...)
547         b = append(b, ar.monthsWide[t.Month()]...)
548         b = append(b, []byte{0xd8, 0x8c, 0x20}...)
549
550         if t.Year() > 0 {
551                 b = strconv.AppendInt(b, int64(t.Year()), 10)
552         } else {
553                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
554         }
555
556         return string(b)
557 }
558
559 // FmtTimeShort returns the short time representation of 't' for 'ar_DZ'
560 func (ar *ar_DZ) FmtTimeShort(t time.Time) string {
561
562         b := make([]byte, 0, 32)
563
564         h := t.Hour()
565
566         if h > 12 {
567                 h -= 12
568         }
569
570         b = strconv.AppendInt(b, int64(h), 10)
571         b = append(b, ar.timeSeparator...)
572
573         if t.Minute() < 10 {
574                 b = append(b, '0')
575         }
576
577         b = strconv.AppendInt(b, int64(t.Minute()), 10)
578         b = append(b, []byte{0x20}...)
579
580         if t.Hour() < 12 {
581                 b = append(b, ar.periodsAbbreviated[0]...)
582         } else {
583                 b = append(b, ar.periodsAbbreviated[1]...)
584         }
585
586         return string(b)
587 }
588
589 // FmtTimeMedium returns the medium time representation of 't' for 'ar_DZ'
590 func (ar *ar_DZ) FmtTimeMedium(t time.Time) string {
591
592         b := make([]byte, 0, 32)
593
594         h := t.Hour()
595
596         if h > 12 {
597                 h -= 12
598         }
599
600         b = strconv.AppendInt(b, int64(h), 10)
601         b = append(b, ar.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, ar.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         if t.Hour() < 12 {
618                 b = append(b, ar.periodsAbbreviated[0]...)
619         } else {
620                 b = append(b, ar.periodsAbbreviated[1]...)
621         }
622
623         return string(b)
624 }
625
626 // FmtTimeLong returns the long time representation of 't' for 'ar_DZ'
627 func (ar *ar_DZ) FmtTimeLong(t time.Time) string {
628
629         b := make([]byte, 0, 32)
630
631         h := t.Hour()
632
633         if h > 12 {
634                 h -= 12
635         }
636
637         b = strconv.AppendInt(b, int64(h), 10)
638         b = append(b, ar.timeSeparator...)
639
640         if t.Minute() < 10 {
641                 b = append(b, '0')
642         }
643
644         b = strconv.AppendInt(b, int64(t.Minute()), 10)
645         b = append(b, ar.timeSeparator...)
646
647         if t.Second() < 10 {
648                 b = append(b, '0')
649         }
650
651         b = strconv.AppendInt(b, int64(t.Second()), 10)
652         b = append(b, []byte{0x20}...)
653
654         if t.Hour() < 12 {
655                 b = append(b, ar.periodsAbbreviated[0]...)
656         } else {
657                 b = append(b, ar.periodsAbbreviated[1]...)
658         }
659
660         b = append(b, []byte{0x20}...)
661
662         tz, _ := t.Zone()
663         b = append(b, tz...)
664
665         return string(b)
666 }
667
668 // FmtTimeFull returns the full time representation of 't' for 'ar_DZ'
669 func (ar *ar_DZ) FmtTimeFull(t time.Time) string {
670
671         b := make([]byte, 0, 32)
672
673         h := t.Hour()
674
675         if h > 12 {
676                 h -= 12
677         }
678
679         b = strconv.AppendInt(b, int64(h), 10)
680         b = append(b, ar.timeSeparator...)
681
682         if t.Minute() < 10 {
683                 b = append(b, '0')
684         }
685
686         b = strconv.AppendInt(b, int64(t.Minute()), 10)
687         b = append(b, ar.timeSeparator...)
688
689         if t.Second() < 10 {
690                 b = append(b, '0')
691         }
692
693         b = strconv.AppendInt(b, int64(t.Second()), 10)
694         b = append(b, []byte{0x20}...)
695
696         if t.Hour() < 12 {
697                 b = append(b, ar.periodsAbbreviated[0]...)
698         } else {
699                 b = append(b, ar.periodsAbbreviated[1]...)
700         }
701
702         b = append(b, []byte{0x20}...)
703
704         tz, _ := t.Zone()
705
706         if btz, ok := ar.timezones[tz]; ok {
707                 b = append(b, btz...)
708         } else {
709                 b = append(b, tz...)
710         }
711
712         return string(b)
713 }