OSDN Git Service

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