OSDN Git Service

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