OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / go-playground / locales / en_IN / en_IN.go
1 package en_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 en_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 'en_IN' locale
45 func New() locales.Translator {
46         return &en_IN{
47                 locale:                 "en_IN",
48                 pluralsCardinal:        []locales.PluralRule{2, 6},
49                 pluralsOrdinal:         []locales.PluralRule{2, 3, 4, 6},
50                 pluralsRange:           []locales.PluralRule{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{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"},
62                 monthsNarrow:           []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"},
63                 monthsWide:             []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"},
64                 daysAbbreviated:        []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"},
65                 daysNarrow:             []string{"S", "M", "T", "W", "T", "F", "S"},
66                 daysShort:              []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"},
67                 daysWide:               []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"},
68                 periodsAbbreviated:     []string{"am", "pm"},
69                 periodsNarrow:          []string{"a", "p"},
70                 periodsWide:            []string{"am", "pm"},
71                 erasAbbreviated:        []string{"BC", "AD"},
72                 erasNarrow:             []string{"B", "A"},
73                 erasWide:               []string{"Before Christ", "Anno Domini"},
74                 timezones:              map[string]string{"ART": "Argentina Standard Time", "ACST": "Australian Central Standard Time", "PST": "Pacific Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "AWST": "Australian Western Standard Time", "AEST": "Australian Eastern Standard Time", "SGT": "Singapore Standard Time", "CHAST": "Chatham Standard Time", "UYT": "Uruguay Standard Time", "HEOG": "West Greenland Summer Time", "GFT": "French Guiana Time", "EST": "Eastern Standard Time", "HECU": "Cuba Daylight Time", "HNEG": "East Greenland Standard Time", "HKT": "Hong Kong Standard Time", "ACDT": "Australian Central Daylight Time", "WIB": "Western Indonesia Time", "MESZ": "Central European Summer Time", "HENOMX": "Northwest Mexico Daylight Time", "AST": "Atlantic Standard Time", "WAST": "West Africa Summer Time", "HEEG": "East Greenland Summer Time", "COST": "Colombia Summer Time", "WESZ": "Western European Summer Time", "CST": "Central Standard Time", "VET": "Venezuela Time", "LHST": "Lord Howe Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "TMT": "Turkmenistan Standard Time", "TMST": "Turkmenistan Summer Time", "JDT": "Japan Daylight Time", "HNT": "Newfoundland Standard Time", "MDT": "Mountain Daylight Time", "WARST": "Western Argentina Summer Time", "SAST": "South Africa Standard Time", "MST": "Mountain Standard Time", "GYT": "Guyana Time", "ECT": "Ecuador Time", "BT": "Bhutan Time", "ACWDT": "Australian Central Western Daylight Time", "MYT": "Malaysia Time", "MEZ": "Central European Standard Time", "NZST": "New Zealand Standard Time", "IST": "India Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "UYST": "Uruguay Summer Time", "CLT": "Chile Standard Time", "∅∅∅": "Azores Summer Time", "HNOG": "West Greenland Standard Time", "HEPMX": "Mexican Pacific Daylight Time", "PDT": "Pacific Daylight Time", "CHADT": "Chatham Daylight Time", "NZDT": "New Zealand Daylight Time", "OEZ": "Eastern European Standard Time", "BOT": "Bolivia Time", "COT": "Colombia Standard Time", "EAT": "East Africa Time", "HKST": "Hong Kong Summer Time", "WEZ": "Western European Standard Time", "GMT": "Greenwich Mean Time", "ACWST": "Australian Central Western Standard Time", "WIT": "Eastern Indonesia Time", "ADT": "Atlantic Daylight Time", "HNNOMX": "Northwest Mexico Standard Time", "WAT": "West Africa Standard Time", "AKDT": "Alaska Daylight Time", "CAT": "Central Africa Time", "HNCU": "Cuba Standard Time", "SRT": "Suriname Time", "HADT": "Hawaii-Aleutian Daylight Time", "OESZ": "Eastern European Summer Time", "WART": "Western Argentina Standard Time", "AEDT": "Australian Eastern Daylight Time", "CLST": "Chile Summer Time", "ChST": "Chamorro Standard Time", "AWDT": "Australian Western Daylight Time", "JST": "Japan Standard Time", "WITA": "Central Indonesia Time", "ARST": "Argentina Summer Time", "HAT": "Newfoundland Daylight Time", "EDT": "Eastern Daylight Time", "AKST": "Alaska Standard Time", "HNPMX": "Mexican Pacific Standard Time", "CDT": "Central Daylight Time", "LHDT": "Lord Howe Daylight Time"},
75         }
76 }
77
78 // Locale returns the current translators string locale
79 func (en *en_IN) Locale() string {
80         return en.locale
81 }
82
83 // PluralsCardinal returns the list of cardinal plural rules associated with 'en_IN'
84 func (en *en_IN) PluralsCardinal() []locales.PluralRule {
85         return en.pluralsCardinal
86 }
87
88 // PluralsOrdinal returns the list of ordinal plural rules associated with 'en_IN'
89 func (en *en_IN) PluralsOrdinal() []locales.PluralRule {
90         return en.pluralsOrdinal
91 }
92
93 // PluralsRange returns the list of range plural rules associated with 'en_IN'
94 func (en *en_IN) PluralsRange() []locales.PluralRule {
95         return en.pluralsRange
96 }
97
98 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'en_IN'
99 func (en *en_IN) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
100
101         n := math.Abs(num)
102         i := int64(n)
103
104         if i == 1 && v == 0 {
105                 return locales.PluralRuleOne
106         }
107
108         return locales.PluralRuleOther
109 }
110
111 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'en_IN'
112 func (en *en_IN) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
113
114         n := math.Abs(num)
115         nMod10 := math.Mod(n, 10)
116         nMod100 := math.Mod(n, 100)
117
118         if nMod10 == 1 && nMod100 != 11 {
119                 return locales.PluralRuleOne
120         } else if nMod10 == 2 && nMod100 != 12 {
121                 return locales.PluralRuleTwo
122         } else if nMod10 == 3 && nMod100 != 13 {
123                 return locales.PluralRuleFew
124         }
125
126         return locales.PluralRuleOther
127 }
128
129 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'en_IN'
130 func (en *en_IN) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
131         return locales.PluralRuleOther
132 }
133
134 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
135 func (en *en_IN) MonthAbbreviated(month time.Month) string {
136         return en.monthsAbbreviated[month]
137 }
138
139 // MonthsAbbreviated returns the locales abbreviated months
140 func (en *en_IN) MonthsAbbreviated() []string {
141         return en.monthsAbbreviated[1:]
142 }
143
144 // MonthNarrow returns the locales narrow month given the 'month' provided
145 func (en *en_IN) MonthNarrow(month time.Month) string {
146         return en.monthsNarrow[month]
147 }
148
149 // MonthsNarrow returns the locales narrow months
150 func (en *en_IN) MonthsNarrow() []string {
151         return en.monthsNarrow[1:]
152 }
153
154 // MonthWide returns the locales wide month given the 'month' provided
155 func (en *en_IN) MonthWide(month time.Month) string {
156         return en.monthsWide[month]
157 }
158
159 // MonthsWide returns the locales wide months
160 func (en *en_IN) MonthsWide() []string {
161         return en.monthsWide[1:]
162 }
163
164 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
165 func (en *en_IN) WeekdayAbbreviated(weekday time.Weekday) string {
166         return en.daysAbbreviated[weekday]
167 }
168
169 // WeekdaysAbbreviated returns the locales abbreviated weekdays
170 func (en *en_IN) WeekdaysAbbreviated() []string {
171         return en.daysAbbreviated
172 }
173
174 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
175 func (en *en_IN) WeekdayNarrow(weekday time.Weekday) string {
176         return en.daysNarrow[weekday]
177 }
178
179 // WeekdaysNarrow returns the locales narrow weekdays
180 func (en *en_IN) WeekdaysNarrow() []string {
181         return en.daysNarrow
182 }
183
184 // WeekdayShort returns the locales short weekday given the 'weekday' provided
185 func (en *en_IN) WeekdayShort(weekday time.Weekday) string {
186         return en.daysShort[weekday]
187 }
188
189 // WeekdaysShort returns the locales short weekdays
190 func (en *en_IN) WeekdaysShort() []string {
191         return en.daysShort
192 }
193
194 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
195 func (en *en_IN) WeekdayWide(weekday time.Weekday) string {
196         return en.daysWide[weekday]
197 }
198
199 // WeekdaysWide returns the locales wide weekdays
200 func (en *en_IN) WeekdaysWide() []string {
201         return en.daysWide
202 }
203
204 // Decimal returns the decimal point of number
205 func (en *en_IN) Decimal() string {
206         return en.decimal
207 }
208
209 // Group returns the group of number
210 func (en *en_IN) Group() string {
211         return en.group
212 }
213
214 // Group returns the minus sign of number
215 func (en *en_IN) Minus() string {
216         return en.minus
217 }
218
219 // FmtNumber returns 'num' with digits/precision of 'v' for 'en_IN' and handles both Whole and Real numbers based on 'v'
220 func (en *en_IN) FmtNumber(num float64, v uint64) string {
221
222         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
223         l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3
224         count := 0
225         inWhole := v == 0
226         inSecondary := false
227         groupThreshold := 3
228
229         b := make([]byte, 0, l)
230
231         for i := len(s) - 1; i >= 0; i-- {
232
233                 if s[i] == '.' {
234                         b = append(b, en.decimal[0])
235                         inWhole = true
236                         continue
237                 }
238
239                 if inWhole {
240
241                         if count == groupThreshold {
242                                 b = append(b, en.group[0])
243                                 count = 1
244
245                                 if !inSecondary {
246                                         inSecondary = true
247                                         groupThreshold = 2
248                                 }
249                         } else {
250                                 count++
251                         }
252                 }
253
254                 b = append(b, s[i])
255         }
256
257         if num < 0 {
258                 b = append(b, en.minus[0])
259         }
260
261         // reverse
262         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
263                 b[i], b[j] = b[j], b[i]
264         }
265
266         return string(b)
267 }
268
269 // FmtPercent returns 'num' with digits/precision of 'v' for 'en_IN' and handles both Whole and Real numbers based on 'v'
270 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
271 func (en *en_IN) FmtPercent(num float64, v uint64) string {
272         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
273         l := len(s) + 3
274         b := make([]byte, 0, l)
275
276         for i := len(s) - 1; i >= 0; i-- {
277
278                 if s[i] == '.' {
279                         b = append(b, en.decimal[0])
280                         continue
281                 }
282
283                 b = append(b, s[i])
284         }
285
286         if num < 0 {
287                 b = append(b, en.minus[0])
288         }
289
290         // reverse
291         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
292                 b[i], b[j] = b[j], b[i]
293         }
294
295         b = append(b, en.percent...)
296
297         return string(b)
298 }
299
300 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_IN'
301 func (en *en_IN) FmtCurrency(num float64, v uint64, currency currency.Type) string {
302
303         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
304         symbol := en.currencies[currency]
305         l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
306         count := 0
307         inWhole := v == 0
308         inSecondary := false
309         groupThreshold := 3
310
311         b := make([]byte, 0, l)
312
313         for i := len(s) - 1; i >= 0; i-- {
314
315                 if s[i] == '.' {
316                         b = append(b, en.decimal[0])
317                         inWhole = true
318                         continue
319                 }
320
321                 if inWhole {
322
323                         if count == groupThreshold {
324                                 b = append(b, en.group[0])
325                                 count = 1
326
327                                 if !inSecondary {
328                                         inSecondary = true
329                                         groupThreshold = 2
330                                 }
331                         } else {
332                                 count++
333                         }
334                 }
335
336                 b = append(b, s[i])
337         }
338
339         for j := len(symbol) - 1; j >= 0; j-- {
340                 b = append(b, symbol[j])
341         }
342
343         for j := len(en.currencyPositivePrefix) - 1; j >= 0; j-- {
344                 b = append(b, en.currencyPositivePrefix[j])
345         }
346
347         if num < 0 {
348                 b = append(b, en.minus[0])
349         }
350
351         // reverse
352         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
353                 b[i], b[j] = b[j], b[i]
354         }
355
356         if int(v) < 2 {
357
358                 if v == 0 {
359                         b = append(b, en.decimal...)
360                 }
361
362                 for i := 0; i < 2-int(v); i++ {
363                         b = append(b, '0')
364                 }
365         }
366
367         return string(b)
368 }
369
370 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_IN'
371 // in accounting notation.
372 func (en *en_IN) FmtAccounting(num float64, v uint64, currency currency.Type) string {
373
374         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
375         symbol := en.currencies[currency]
376         l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
377         count := 0
378         inWhole := v == 0
379         inSecondary := false
380         groupThreshold := 3
381
382         b := make([]byte, 0, l)
383
384         for i := len(s) - 1; i >= 0; i-- {
385
386                 if s[i] == '.' {
387                         b = append(b, en.decimal[0])
388                         inWhole = true
389                         continue
390                 }
391
392                 if inWhole {
393
394                         if count == groupThreshold {
395                                 b = append(b, en.group[0])
396                                 count = 1
397
398                                 if !inSecondary {
399                                         inSecondary = true
400                                         groupThreshold = 2
401                                 }
402                         } else {
403                                 count++
404                         }
405                 }
406
407                 b = append(b, s[i])
408         }
409
410         if num < 0 {
411
412                 for j := len(symbol) - 1; j >= 0; j-- {
413                         b = append(b, symbol[j])
414                 }
415
416                 for j := len(en.currencyNegativePrefix) - 1; j >= 0; j-- {
417                         b = append(b, en.currencyNegativePrefix[j])
418                 }
419
420                 b = append(b, en.minus[0])
421
422         } else {
423
424                 for j := len(symbol) - 1; j >= 0; j-- {
425                         b = append(b, symbol[j])
426                 }
427
428                 for j := len(en.currencyPositivePrefix) - 1; j >= 0; j-- {
429                         b = append(b, en.currencyPositivePrefix[j])
430                 }
431
432         }
433
434         // reverse
435         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
436                 b[i], b[j] = b[j], b[i]
437         }
438
439         if int(v) < 2 {
440
441                 if v == 0 {
442                         b = append(b, en.decimal...)
443                 }
444
445                 for i := 0; i < 2-int(v); i++ {
446                         b = append(b, '0')
447                 }
448         }
449
450         return string(b)
451 }
452
453 // FmtDateShort returns the short date representation of 't' for 'en_IN'
454 func (en *en_IN) FmtDateShort(t time.Time) string {
455
456         b := make([]byte, 0, 32)
457
458         if t.Day() < 10 {
459                 b = append(b, '0')
460         }
461
462         b = strconv.AppendInt(b, int64(t.Day()), 10)
463         b = append(b, []byte{0x2f}...)
464
465         if t.Month() < 10 {
466                 b = append(b, '0')
467         }
468
469         b = strconv.AppendInt(b, int64(t.Month()), 10)
470
471         b = append(b, []byte{0x2f}...)
472
473         if t.Year() > 9 {
474                 b = append(b, strconv.Itoa(t.Year())[2:]...)
475         } else {
476                 b = append(b, strconv.Itoa(t.Year())[1:]...)
477         }
478
479         return string(b)
480 }
481
482 // FmtDateMedium returns the medium date representation of 't' for 'en_IN'
483 func (en *en_IN) FmtDateMedium(t time.Time) string {
484
485         b := make([]byte, 0, 32)
486
487         if t.Day() < 10 {
488                 b = append(b, '0')
489         }
490
491         b = strconv.AppendInt(b, int64(t.Day()), 10)
492         b = append(b, []byte{0x2d}...)
493         b = append(b, en.monthsAbbreviated[t.Month()]...)
494         b = append(b, []byte{0x2d}...)
495
496         if t.Year() > 0 {
497                 b = strconv.AppendInt(b, int64(t.Year()), 10)
498         } else {
499                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
500         }
501
502         return string(b)
503 }
504
505 // FmtDateLong returns the long date representation of 't' for 'en_IN'
506 func (en *en_IN) FmtDateLong(t time.Time) string {
507
508         b := make([]byte, 0, 32)
509
510         b = strconv.AppendInt(b, int64(t.Day()), 10)
511         b = append(b, []byte{0x20}...)
512         b = append(b, en.monthsWide[t.Month()]...)
513         b = append(b, []byte{0x20}...)
514
515         if t.Year() > 0 {
516                 b = strconv.AppendInt(b, int64(t.Year()), 10)
517         } else {
518                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
519         }
520
521         return string(b)
522 }
523
524 // FmtDateFull returns the full date representation of 't' for 'en_IN'
525 func (en *en_IN) FmtDateFull(t time.Time) string {
526
527         b := make([]byte, 0, 32)
528
529         b = append(b, en.daysWide[t.Weekday()]...)
530         b = append(b, []byte{0x20}...)
531         b = strconv.AppendInt(b, int64(t.Day()), 10)
532         b = append(b, []byte{0x20}...)
533         b = append(b, en.monthsWide[t.Month()]...)
534         b = append(b, []byte{0x20}...)
535
536         if t.Year() > 0 {
537                 b = strconv.AppendInt(b, int64(t.Year()), 10)
538         } else {
539                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
540         }
541
542         return string(b)
543 }
544
545 // FmtTimeShort returns the short time representation of 't' for 'en_IN'
546 func (en *en_IN) FmtTimeShort(t time.Time) string {
547
548         b := make([]byte, 0, 32)
549
550         if t.Hour() < 10 {
551                 b = append(b, '0')
552         }
553
554         b = strconv.AppendInt(b, int64(t.Hour()), 10)
555         b = append(b, en.timeSeparator...)
556
557         if t.Minute() < 10 {
558                 b = append(b, '0')
559         }
560
561         b = strconv.AppendInt(b, int64(t.Minute()), 10)
562
563         return string(b)
564 }
565
566 // FmtTimeMedium returns the medium time representation of 't' for 'en_IN'
567 func (en *en_IN) FmtTimeMedium(t time.Time) string {
568
569         b := make([]byte, 0, 32)
570
571         if t.Hour() < 10 {
572                 b = append(b, '0')
573         }
574
575         b = strconv.AppendInt(b, int64(t.Hour()), 10)
576         b = append(b, en.timeSeparator...)
577
578         if t.Minute() < 10 {
579                 b = append(b, '0')
580         }
581
582         b = strconv.AppendInt(b, int64(t.Minute()), 10)
583         b = append(b, en.timeSeparator...)
584
585         if t.Second() < 10 {
586                 b = append(b, '0')
587         }
588
589         b = strconv.AppendInt(b, int64(t.Second()), 10)
590
591         return string(b)
592 }
593
594 // FmtTimeLong returns the long time representation of 't' for 'en_IN'
595 func (en *en_IN) FmtTimeLong(t time.Time) string {
596
597         b := make([]byte, 0, 32)
598
599         if t.Hour() < 10 {
600                 b = append(b, '0')
601         }
602
603         b = strconv.AppendInt(b, int64(t.Hour()), 10)
604         b = append(b, en.timeSeparator...)
605
606         if t.Minute() < 10 {
607                 b = append(b, '0')
608         }
609
610         b = strconv.AppendInt(b, int64(t.Minute()), 10)
611         b = append(b, en.timeSeparator...)
612
613         if t.Second() < 10 {
614                 b = append(b, '0')
615         }
616
617         b = strconv.AppendInt(b, int64(t.Second()), 10)
618         b = append(b, []byte{0x20}...)
619
620         tz, _ := t.Zone()
621         b = append(b, tz...)
622
623         return string(b)
624 }
625
626 // FmtTimeFull returns the full time representation of 't' for 'en_IN'
627 func (en *en_IN) FmtTimeFull(t time.Time) string {
628
629         b := make([]byte, 0, 32)
630
631         if t.Hour() < 10 {
632                 b = append(b, '0')
633         }
634
635         b = strconv.AppendInt(b, int64(t.Hour()), 10)
636         b = append(b, en.timeSeparator...)
637
638         if t.Minute() < 10 {
639                 b = append(b, '0')
640         }
641
642         b = strconv.AppendInt(b, int64(t.Minute()), 10)
643         b = append(b, en.timeSeparator...)
644
645         if t.Second() < 10 {
646                 b = append(b, '0')
647         }
648
649         b = strconv.AppendInt(b, int64(t.Second()), 10)
650         b = append(b, []byte{0x20}...)
651
652         tz, _ := t.Zone()
653
654         if btz, ok := en.timezones[tz]; ok {
655                 b = append(b, btz...)
656         } else {
657                 b = append(b, tz...)
658         }
659
660         return string(b)
661 }