OSDN Git Service

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