1 package mzn_IR
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 mzn_IR 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
25 monthsAbbreviated []string
26 monthsNarrow []string
27 monthsWide []string
28 daysAbbreviated []string
29 daysNarrow []string
30 daysShort []string
31 daysWide []string
32 periodsAbbreviated []string
33 periodsNarrow []string
34 periodsShort []string
35 periodsWide []string
36 erasAbbreviated []string
37 erasNarrow []string
38 erasWide []string
39 timezones map[string]string
40 }
41
42
43 func New() locales.Translator {
44 return &mzn_IR{
45 locale: "mzn_IR",
46 pluralsCardinal: nil,
47 pluralsOrdinal: nil,
48 pluralsRange: nil,
49 timeSeparator: ":",
50 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", "CNH", "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", "MRU", "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", "STN", "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", "UYW", "UZS", "VEB", "VEF", "VES", "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"},
51 monthsAbbreviated: []string{"", "ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"},
52 monthsWide: []string{"", "ژانویه", "فوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"},
53 erasAbbreviated: []string{"پ.م", "م."},
54 erasNarrow: []string{"", ""},
55 erasWide: []string{"قبل میلاد", "بعد میلاد"},
56 timezones: map[string]string{"ACDT": "ACDT", "ACST": "ACST", "ACWDT": "ACWDT", "ACWST": "ACWST", "ADT": "ADT", "AEDT": "AEDT", "AEST": "AEST", "AKDT": "AKDT", "AKST": "AKST", "ARST": "ARST", "ART": "ART", "AST": "AST", "AWDT": "AWDT", "AWST": "AWST", "BOT": "BOT", "BT": "BT", "CAT": "CAT", "CDT": "CDT", "CHADT": "CHADT", "CHAST": "CHAST", "CLST": "CLST", "CLT": "CLT", "COST": "COST", "COT": "COT", "CST": "CST", "ChST": "ChST", "EAT": "EAT", "ECT": "ECT", "EDT": "EDT", "EST": "EST", "GFT": "GFT", "GMT": "GMT", "GST": "GST", "GYT": "GYT", "HADT": "HADT", "HAST": "HAST", "HAT": "HAT", "HECU": "HECU", "HEEG": "HEEG", "HENOMX": "HENOMX", "HEOG": "HEOG", "HEPM": "HEPM", "HEPMX": "HEPMX", "HKST": "HKST", "HKT": "HKT", "HNCU": "HNCU", "HNEG": "HNEG", "HNNOMX": "HNNOMX", "HNOG": "HNOG", "HNPM": "HNPM", "HNPMX": "HNPMX", "HNT": "HNT", "IST": "IST", "JDT": "JDT", "JST": "JST", "LHDT": "LHDT", "LHST": "LHST", "MDT": "MDT", "MESZ": "MESZ", "MEZ": "MEZ", "MST": "MST", "MYT": "MYT", "NZDT": "NZDT", "NZST": "NZST", "OESZ": "OESZ", "OEZ": "OEZ", "PDT": "PDT", "PST": "PST", "SAST": "SAST", "SGT": "SGT", "SRT": "SRT", "TMST": "TMST", "TMT": "TMT", "UYST": "UYST", "UYT": "UYT", "VET": "VET", "WARST": "WARST", "WART": "WART", "WAST": "WAST", "WAT": "WAT", "WESZ": "WESZ", "WEZ": "WEZ", "WIB": "WIB", "WIT": "WIT", "WITA": "WITA", "∅∅∅": "∅∅∅"},
57 }
58 }
59
60
61 func (mzn *mzn_IR) Locale() string {
62 return mzn.locale
63 }
64
65
66 func (mzn *mzn_IR) PluralsCardinal() []locales.PluralRule {
67 return mzn.pluralsCardinal
68 }
69
70
71 func (mzn *mzn_IR) PluralsOrdinal() []locales.PluralRule {
72 return mzn.pluralsOrdinal
73 }
74
75
76 func (mzn *mzn_IR) PluralsRange() []locales.PluralRule {
77 return mzn.pluralsRange
78 }
79
80
81 func (mzn *mzn_IR) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
82 return locales.PluralRuleUnknown
83 }
84
85
86 func (mzn *mzn_IR) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
87 return locales.PluralRuleUnknown
88 }
89
90
91 func (mzn *mzn_IR) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
92 return locales.PluralRuleUnknown
93 }
94
95
96 func (mzn *mzn_IR) MonthAbbreviated(month time.Month) string {
97 return mzn.monthsAbbreviated[month]
98 }
99
100
101 func (mzn *mzn_IR) MonthsAbbreviated() []string {
102 return mzn.monthsAbbreviated[1:]
103 }
104
105
106 func (mzn *mzn_IR) MonthNarrow(month time.Month) string {
107 return mzn.monthsNarrow[month]
108 }
109
110
111 func (mzn *mzn_IR) MonthsNarrow() []string {
112 return nil
113 }
114
115
116 func (mzn *mzn_IR) MonthWide(month time.Month) string {
117 return mzn.monthsWide[month]
118 }
119
120
121 func (mzn *mzn_IR) MonthsWide() []string {
122 return mzn.monthsWide[1:]
123 }
124
125
126 func (mzn *mzn_IR) WeekdayAbbreviated(weekday time.Weekday) string {
127 return mzn.daysAbbreviated[weekday]
128 }
129
130
131 func (mzn *mzn_IR) WeekdaysAbbreviated() []string {
132 return mzn.daysAbbreviated
133 }
134
135
136 func (mzn *mzn_IR) WeekdayNarrow(weekday time.Weekday) string {
137 return mzn.daysNarrow[weekday]
138 }
139
140
141 func (mzn *mzn_IR) WeekdaysNarrow() []string {
142 return mzn.daysNarrow
143 }
144
145
146 func (mzn *mzn_IR) WeekdayShort(weekday time.Weekday) string {
147 return mzn.daysShort[weekday]
148 }
149
150
151 func (mzn *mzn_IR) WeekdaysShort() []string {
152 return mzn.daysShort
153 }
154
155
156 func (mzn *mzn_IR) WeekdayWide(weekday time.Weekday) string {
157 return mzn.daysWide[weekday]
158 }
159
160
161 func (mzn *mzn_IR) WeekdaysWide() []string {
162 return mzn.daysWide
163 }
164
165
166 func (mzn *mzn_IR) Decimal() string {
167 return mzn.decimal
168 }
169
170
171 func (mzn *mzn_IR) Group() string {
172 return mzn.group
173 }
174
175
176 func (mzn *mzn_IR) Minus() string {
177 return mzn.minus
178 }
179
180
181 func (mzn *mzn_IR) FmtNumber(num float64, v uint64) string {
182
183 return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
184 }
185
186
187
188 func (mzn *mzn_IR) FmtPercent(num float64, v uint64) string {
189 return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
190 }
191
192
193 func (mzn *mzn_IR) FmtCurrency(num float64, v uint64, currency currency.Type) string {
194
195 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
196 symbol := mzn.currencies[currency]
197 return string(append(append([]byte{}, symbol...), s...))
198 }
199
200
201
202 func (mzn *mzn_IR) FmtAccounting(num float64, v uint64, currency currency.Type) string {
203
204 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
205 symbol := mzn.currencies[currency]
206 return string(append(append([]byte{}, symbol...), s...))
207 }
208
209
210 func (mzn *mzn_IR) FmtDateShort(t time.Time) string {
211
212 b := make([]byte, 0, 32)
213
214 return string(b)
215 }
216
217
218 func (mzn *mzn_IR) FmtDateMedium(t time.Time) string {
219
220 b := make([]byte, 0, 32)
221
222 return string(b)
223 }
224
225
226 func (mzn *mzn_IR) FmtDateLong(t time.Time) string {
227
228 b := make([]byte, 0, 32)
229
230 return string(b)
231 }
232
233
234 func (mzn *mzn_IR) FmtDateFull(t time.Time) string {
235
236 b := make([]byte, 0, 32)
237
238 return string(b)
239 }
240
241
242 func (mzn *mzn_IR) FmtTimeShort(t time.Time) string {
243
244 b := make([]byte, 0, 32)
245
246 return string(b)
247 }
248
249
250 func (mzn *mzn_IR) FmtTimeMedium(t time.Time) string {
251
252 b := make([]byte, 0, 32)
253
254 return string(b)
255 }
256
257
258 func (mzn *mzn_IR) FmtTimeLong(t time.Time) string {
259
260 b := make([]byte, 0, 32)
261
262 return string(b)
263 }
264
265
266 func (mzn *mzn_IR) FmtTimeFull(t time.Time) string {
267
268 b := make([]byte, 0, 32)
269
270 return string(b)
271 }
272
View as plain text