8 "github.com/go-playground/locales"
9 "github.com/go-playground/locales/currency"
14 pluralsCardinal []locales.PluralRule
15 pluralsOrdinal []locales.PluralRule
16 pluralsRange []locales.PluralRule
25 currencies []string // idx = enum of currency code
26 currencyPositiveSuffix string
27 currencyNegativeSuffix string
28 monthsAbbreviated []string
31 daysAbbreviated []string
35 periodsAbbreviated []string
36 periodsNarrow []string
39 erasAbbreviated []string
42 timezones map[string]string
45 // New returns a new instance of translator for the 'ar_SO' locale
46 func New() locales.Translator {
49 pluralsCardinal: []locales.PluralRule{1, 2, 3, 4, 5, 6},
50 pluralsOrdinal: []locales.PluralRule{6},
51 pluralsRange: []locales.PluralRule{1, 4, 5, 6},
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", "S", "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"},
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{"CST": "التوقيت الرسمي المركزي لأمريكا الشمالية", "HENOMX": "التوقيت الصيفي لشمال غرب المكسيك", "AEST": "توقيت شرق أستراليا الرسمي", "AKDT": "توقيت ألاسكا الصيفي", "∅∅∅": "توقيت برازيليا الصيفي", "JST": "توقيت اليابان الرسمي", "LHST": "توقيت لورد هاو الرسمي", "WAST": "توقيت غرب أفريقيا الصيفي", "EST": "التوقيت الرسمي الشرقي لأمريكا الشمالية", "ACST": "توقيت وسط أستراليا الرسمي", "HEPM": "توقيت سانت بيير وميكولون الصيفي", "CDT": "التوقيت الصيفي المركزي لأمريكا الشمالية", "AEDT": "توقيت شرق أستراليا الصيفي", "CAT": "توقيت وسط أفريقيا", "PST": "توقيت المحيط الهادي الرسمي", "HECU": "توقيت كوبا الصيفي", "AWST": "توقيت غرب أستراليا الرسمي", "UYST": "توقيت أورغواي الصيفي", "JDT": "توقيت اليابان الصيفي", "WARST": "توقيت غرب الأرجنتين الصيفي", "HEOG": "توقيت غرب غرينلاند الصيفي", "SAST": "توقيت جنوب أفريقيا", "GMT": "توقيت غرينتش", "GYT": "توقيت غيانا", "EDT": "التوقيت الصيفي الشرقي لأمريكا الشمالية", "WESZ": "توقيت غرب أوروبا الصيفي", "BOT": "توقيت بوليفيا", "OESZ": "توقيت شرق أوروبا الصيفي", "WITA": "توقيت وسط إندونيسيا", "HKT": "توقيت هونغ كونغ الرسمي", "CLT": "توقيت شيلي الرسمي", "TMST": "توقيت تركمانستان الصيفي", "WIT": "توقيت شرق إندونيسيا", "MESZ": "توقيت وسط أوروبا الصيفي", "HADT": "توقيت هاواي ألوتيان الصيفي", "HKST": "توقيت هونغ كونغ الصيفي", "AWDT": "توقيت غرب أستراليا الصيفي", "HNPM": "توقيت سانت بيير وميكولون الرسمي", "MST": "MST", "ACWST": "توقيت غرب وسط أستراليا الرسمي", "LHDT": "التوقيت الصيفي للورد هاو", "ADT": "التوقيت الصيفي الأطلسي", "WEZ": "توقيت غرب أوروبا الرسمي", "HEPMX": "توقيت المحيط الهادي الصيفي للمكسيك", "HNCU": "توقيت كوبا الرسمي", "SRT": "توقيت سورينام", "NZST": "توقيت نيوزيلندا الرسمي", "NZDT": "توقيت نيوزيلندا الصيفي", "IST": "توقيت الهند", "WIB": "توقيت غرب إندونيسيا", "HAST": "توقيت هاواي ألوتيان الرسمي", "HNNOMX": "التوقيت الرسمي لشمال غرب المكسيك", "ARST": "توقيت الأرجنتين الصيفي", "MDT": "MDT", "HNOG": "توقيت غرب غرينلاند الرسمي", "GFT": "توقيت غايانا الفرنسية", "SGT": "توقيت سنغافورة", "MEZ": "توقيت وسط أوروبا الرسمي", "ART": "توقيت الأرجنتين الرسمي", "HAT": "توقيت نيوفاوندلاند الصيفي", "ECT": "توقيت الإكوادور", "CHADT": "توقيت تشاتام الصيفي", "TMT": "توقيت تركمانستان الرسمي", "WART": "توقيت غرب الأرجنتين الرسمي", "AST": "التوقيت الرسمي الأطلسي", "EAT": "توقيت شرق أفريقيا", "WAT": "توقيت غرب أفريقيا الرسمي", "HEEG": "توقيت شرق غرينلاند الصيفي", "PDT": "توقيت المحيط الهادي الصيفي", "AKST": "التوقيت الرسمي لألاسكا", "MYT": "توقيت ماليزيا", "BT": "توقيت بوتان", "UYT": "توقيت أورغواي الرسمي", "HNEG": "توقيت شرق غرينلاند الرسمي", "HNT": "توقيت نيوفاوندلاند الرسمي", "CLST": "توقيت شيلي الصيفي", "COST": "توقيت كولومبيا الصيفي", "CHAST": "توقيت تشاتام الرسمي", "HNPMX": "توقيت المحيط الهادي الرسمي للمكسيك", "ACWDT": "توقيت غرب وسط أستراليا الصيفي", "OEZ": "توقيت شرق أوروبا الرسمي", "VET": "توقيت فنزويلا", "COT": "توقيت كولومبيا الرسمي", "ACDT": "توقيت وسط أستراليا الصيفي", "ChST": "توقيت تشامورو"},
80 // Locale returns the current translators string locale
81 func (ar *ar_SO) Locale() string {
85 // PluralsCardinal returns the list of cardinal plural rules associated with 'ar_SO'
86 func (ar *ar_SO) PluralsCardinal() []locales.PluralRule {
87 return ar.pluralsCardinal
90 // PluralsOrdinal returns the list of ordinal plural rules associated with 'ar_SO'
91 func (ar *ar_SO) PluralsOrdinal() []locales.PluralRule {
92 return ar.pluralsOrdinal
95 // PluralsRange returns the list of range plural rules associated with 'ar_SO'
96 func (ar *ar_SO) PluralsRange() []locales.PluralRule {
97 return ar.pluralsRange
100 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'ar_SO'
101 func (ar *ar_SO) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
104 nMod100 := math.Mod(n, 100)
107 return locales.PluralRuleZero
109 return locales.PluralRuleOne
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
118 return locales.PluralRuleOther
121 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'ar_SO'
122 func (ar *ar_SO) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
123 return locales.PluralRuleOther
126 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'ar_SO'
127 func (ar *ar_SO) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
129 start := ar.CardinalPluralRule(num1, v1)
130 end := ar.CardinalPluralRule(num2, v2)
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
178 return locales.PluralRuleOther
182 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
183 func (ar *ar_SO) MonthAbbreviated(month time.Month) string {
184 return ar.monthsAbbreviated[month]
187 // MonthsAbbreviated returns the locales abbreviated months
188 func (ar *ar_SO) MonthsAbbreviated() []string {
189 return ar.monthsAbbreviated[1:]
192 // MonthNarrow returns the locales narrow month given the 'month' provided
193 func (ar *ar_SO) MonthNarrow(month time.Month) string {
194 return ar.monthsNarrow[month]
197 // MonthsNarrow returns the locales narrow months
198 func (ar *ar_SO) MonthsNarrow() []string {
199 return ar.monthsNarrow[1:]
202 // MonthWide returns the locales wide month given the 'month' provided
203 func (ar *ar_SO) MonthWide(month time.Month) string {
204 return ar.monthsWide[month]
207 // MonthsWide returns the locales wide months
208 func (ar *ar_SO) MonthsWide() []string {
209 return ar.monthsWide[1:]
212 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
213 func (ar *ar_SO) WeekdayAbbreviated(weekday time.Weekday) string {
214 return ar.daysAbbreviated[weekday]
217 // WeekdaysAbbreviated returns the locales abbreviated weekdays
218 func (ar *ar_SO) WeekdaysAbbreviated() []string {
219 return ar.daysAbbreviated
222 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
223 func (ar *ar_SO) WeekdayNarrow(weekday time.Weekday) string {
224 return ar.daysNarrow[weekday]
227 // WeekdaysNarrow returns the locales narrow weekdays
228 func (ar *ar_SO) WeekdaysNarrow() []string {
232 // WeekdayShort returns the locales short weekday given the 'weekday' provided
233 func (ar *ar_SO) WeekdayShort(weekday time.Weekday) string {
234 return ar.daysShort[weekday]
237 // WeekdaysShort returns the locales short weekdays
238 func (ar *ar_SO) WeekdaysShort() []string {
242 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
243 func (ar *ar_SO) WeekdayWide(weekday time.Weekday) string {
244 return ar.daysWide[weekday]
247 // WeekdaysWide returns the locales wide weekdays
248 func (ar *ar_SO) WeekdaysWide() []string {
252 // Decimal returns the decimal point of number
253 func (ar *ar_SO) Decimal() string {
257 // Group returns the group of number
258 func (ar *ar_SO) Group() string {
262 // Group returns the minus sign of number
263 func (ar *ar_SO) Minus() string {
267 // FmtNumber returns 'num' with digits/precision of 'v' for 'ar_SO' and handles both Whole and Real numbers based on 'v'
268 func (ar *ar_SO) FmtNumber(num float64, v uint64) string {
270 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
271 l := len(s) + 5 + 2*len(s[:len(s)-int(v)-1])/3
274 b := make([]byte, 0, l)
276 for i := len(s) - 1; i >= 0; i-- {
279 for j := len(ar.decimal) - 1; j >= 0; j-- {
280 b = append(b, ar.decimal[j])
288 for j := len(ar.group) - 1; j >= 0; j-- {
289 b = append(b, ar.group[j])
301 for j := len(ar.minus) - 1; j >= 0; j-- {
302 b = append(b, ar.minus[j])
307 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
308 b[i], b[j] = b[j], b[i]
314 // FmtPercent returns 'num' with digits/precision of 'v' for 'ar_SO' and handles both Whole and Real numbers based on 'v'
315 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
316 func (ar *ar_SO) FmtPercent(num float64, v uint64) string {
317 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
319 b := make([]byte, 0, l)
321 for i := len(s) - 1; i >= 0; i-- {
324 for j := len(ar.decimal) - 1; j >= 0; j-- {
325 b = append(b, ar.decimal[j])
334 for j := len(ar.minus) - 1; j >= 0; j-- {
335 b = append(b, ar.minus[j])
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]
344 b = append(b, ar.percentSuffix...)
346 b = append(b, ar.percent...)
351 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SO'
352 func (ar *ar_SO) FmtCurrency(num float64, v uint64, currency currency.Type) string {
354 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
355 symbol := ar.currencies[currency]
356 l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3
359 b := make([]byte, 0, l)
361 for i := len(s) - 1; i >= 0; i-- {
364 for j := len(ar.decimal) - 1; j >= 0; j-- {
365 b = append(b, ar.decimal[j])
373 for j := len(ar.group) - 1; j >= 0; j-- {
374 b = append(b, ar.group[j])
386 for j := len(ar.minus) - 1; j >= 0; j-- {
387 b = append(b, ar.minus[j])
392 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
393 b[i], b[j] = b[j], b[i]
399 b = append(b, ar.decimal...)
402 for i := 0; i < 2-int(v); i++ {
407 b = append(b, ar.currencyPositiveSuffix...)
409 b = append(b, symbol...)
414 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ar_SO'
415 // in accounting notation.
416 func (ar *ar_SO) FmtAccounting(num float64, v uint64, currency currency.Type) string {
418 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
419 symbol := ar.currencies[currency]
420 l := len(s) + len(symbol) + 7 + 2*len(s[:len(s)-int(v)-1])/3
423 b := make([]byte, 0, l)
425 for i := len(s) - 1; i >= 0; i-- {
428 for j := len(ar.decimal) - 1; j >= 0; j-- {
429 b = append(b, ar.decimal[j])
437 for j := len(ar.group) - 1; j >= 0; j-- {
438 b = append(b, ar.group[j])
451 for j := len(ar.minus) - 1; j >= 0; j-- {
452 b = append(b, ar.minus[j])
458 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
459 b[i], b[j] = b[j], b[i]
465 b = append(b, ar.decimal...)
468 for i := 0; i < 2-int(v); i++ {
474 b = append(b, ar.currencyNegativeSuffix...)
475 b = append(b, symbol...)
478 b = append(b, ar.currencyPositiveSuffix...)
479 b = append(b, symbol...)
485 // FmtDateShort returns the short date representation of 't' for 'ar_SO'
486 func (ar *ar_SO) FmtDateShort(t time.Time) string {
488 b := make([]byte, 0, 32)
490 b = strconv.AppendInt(b, int64(t.Day()), 10)
491 b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...)
492 b = strconv.AppendInt(b, int64(t.Month()), 10)
493 b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...)
496 b = strconv.AppendInt(b, int64(t.Year()), 10)
498 b = strconv.AppendInt(b, int64(-t.Year()), 10)
504 // FmtDateMedium returns the medium date representation of 't' for 'ar_SO'
505 func (ar *ar_SO) FmtDateMedium(t time.Time) string {
507 b := make([]byte, 0, 32)
513 b = strconv.AppendInt(b, int64(t.Day()), 10)
514 b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...)
520 b = strconv.AppendInt(b, int64(t.Month()), 10)
522 b = append(b, []byte{0xe2, 0x80, 0x8f, 0x2f}...)
525 b = strconv.AppendInt(b, int64(t.Year()), 10)
527 b = strconv.AppendInt(b, int64(-t.Year()), 10)
533 // FmtDateLong returns the long date representation of 't' for 'ar_SO'
534 func (ar *ar_SO) FmtDateLong(t time.Time) string {
536 b := make([]byte, 0, 32)
538 b = strconv.AppendInt(b, int64(t.Day()), 10)
539 b = append(b, []byte{0x20}...)
540 b = append(b, ar.monthsWide[t.Month()]...)
541 b = append(b, []byte{0xd8, 0x8c, 0x20}...)
544 b = strconv.AppendInt(b, int64(t.Year()), 10)
546 b = strconv.AppendInt(b, int64(-t.Year()), 10)
552 // FmtDateFull returns the full date representation of 't' for 'ar_SO'
553 func (ar *ar_SO) FmtDateFull(t time.Time) string {
555 b := make([]byte, 0, 32)
557 b = append(b, ar.daysWide[t.Weekday()]...)
558 b = append(b, []byte{0xd8, 0x8c, 0x20}...)
559 b = strconv.AppendInt(b, int64(t.Day()), 10)
560 b = append(b, []byte{0x20}...)
561 b = append(b, ar.monthsWide[t.Month()]...)
562 b = append(b, []byte{0xd8, 0x8c, 0x20}...)
565 b = strconv.AppendInt(b, int64(t.Year()), 10)
567 b = strconv.AppendInt(b, int64(-t.Year()), 10)
573 // FmtTimeShort returns the short time representation of 't' for 'ar_SO'
574 func (ar *ar_SO) FmtTimeShort(t time.Time) string {
576 b := make([]byte, 0, 32)
584 b = strconv.AppendInt(b, int64(h), 10)
585 b = append(b, ar.timeSeparator...)
591 b = strconv.AppendInt(b, int64(t.Minute()), 10)
592 b = append(b, []byte{0x20}...)
595 b = append(b, ar.periodsAbbreviated[0]...)
597 b = append(b, ar.periodsAbbreviated[1]...)
603 // FmtTimeMedium returns the medium time representation of 't' for 'ar_SO'
604 func (ar *ar_SO) FmtTimeMedium(t time.Time) string {
606 b := make([]byte, 0, 32)
614 b = strconv.AppendInt(b, int64(h), 10)
615 b = append(b, ar.timeSeparator...)
621 b = strconv.AppendInt(b, int64(t.Minute()), 10)
622 b = append(b, ar.timeSeparator...)
628 b = strconv.AppendInt(b, int64(t.Second()), 10)
629 b = append(b, []byte{0x20}...)
632 b = append(b, ar.periodsAbbreviated[0]...)
634 b = append(b, ar.periodsAbbreviated[1]...)
640 // FmtTimeLong returns the long time representation of 't' for 'ar_SO'
641 func (ar *ar_SO) FmtTimeLong(t time.Time) string {
643 b := make([]byte, 0, 32)
651 b = strconv.AppendInt(b, int64(h), 10)
652 b = append(b, ar.timeSeparator...)
658 b = strconv.AppendInt(b, int64(t.Minute()), 10)
659 b = append(b, ar.timeSeparator...)
665 b = strconv.AppendInt(b, int64(t.Second()), 10)
666 b = append(b, []byte{0x20}...)
669 b = append(b, ar.periodsAbbreviated[0]...)
671 b = append(b, ar.periodsAbbreviated[1]...)
674 b = append(b, []byte{0x20}...)
682 // FmtTimeFull returns the full time representation of 't' for 'ar_SO'
683 func (ar *ar_SO) FmtTimeFull(t time.Time) string {
685 b := make([]byte, 0, 32)
693 b = strconv.AppendInt(b, int64(h), 10)
694 b = append(b, ar.timeSeparator...)
700 b = strconv.AppendInt(b, int64(t.Minute()), 10)
701 b = append(b, ar.timeSeparator...)
707 b = strconv.AppendInt(b, int64(t.Second()), 10)
708 b = append(b, []byte{0x20}...)
711 b = append(b, ar.periodsAbbreviated[0]...)
713 b = append(b, ar.periodsAbbreviated[1]...)
716 b = append(b, []byte{0x20}...)
720 if btz, ok := ar.timezones[tz]; ok {
721 b = append(b, btz...)