OSDN Git Service

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