OSDN Git Service

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