OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / go-playground / locales / bn_BD / bn_BD.go
1 package bn_BD
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 bn_BD 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 'bn_BD' locale
43 func New() locales.Translator {
44         return &bn_BD{
45                 locale:             "bn_BD",
46                 pluralsCardinal:    []locales.PluralRule{2, 6},
47                 pluralsOrdinal:     []locales.PluralRule{2, 3, 4, 5, 6},
48                 pluralsRange:       []locales.PluralRule{2, 6},
49                 decimal:            ".",
50                 percent:            "%",
51                 perMille:           "‰",
52                 timeSeparator:      ":",
53                 inifinity:          "∞",
54                 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"},
55                 monthsAbbreviated:  []string{"", "জানু", "ফেব", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর"},
56                 monthsNarrow:       []string{"", "জা", "ফে", "মা", "এ", "মে", "জুন", "জু", "আ", "সে", "অ", "ন", "ডি"},
57                 monthsWide:         []string{"", "জানুয়ারী", "ফেব্রুয়ারী", "মার্চ", "এপ্রিল", "মে", "জুন", "জুলাই", "আগস্ট", "সেপ্টেম্বর", "অক্টোবর", "নভেম্বর", "ডিসেম্বর"},
58                 daysAbbreviated:    []string{"রবি", "সোম", "মঙ্গল", "বুধ", "বৃহস্পতি", "শুক্র", "শনি"},
59                 daysNarrow:         []string{"র", "সো", "ম", "বু", "বৃ", "শু", "শ"},
60                 daysShort:          []string{"রঃ", "সোঃ", "মঃ", "বুঃ", "বৃঃ", "শুঃ", "শোঃ"},
61                 daysWide:           []string{"রবিবার", "সোমবার", "মঙ্গলবার", "বুধবার", "বৃহস্পতিবার", "শুক্রবার", "শনিবার"},
62                 periodsAbbreviated: []string{"AM", "PM"},
63                 periodsNarrow:      []string{"AM", "PM"},
64                 periodsWide:        []string{"AM", "PM"},
65                 erasAbbreviated:    []string{"খ্রিস্টপূর্ব", "খৃষ্টাব্দ"},
66                 erasNarrow:         []string{"", ""},
67                 erasWide:           []string{"খ্রিস্টপূর্ব", "খৃষ্টাব্দ"},
68                 timezones:          map[string]string{"ACDT": "অস্ট্রেলীয় কেন্দ্রীয় দিবালোক সময়", "NZDT": "নিউজিল্যান্ড দিবালোক সময়", "WITA": "কেন্দ্রীয় ইন্দোনেশিয়া সময়", "LHST": "লর্ড হাওয়ে মানক মসয়", "IST": "ভারতীয় মানক সময়", "HEOG": "পশ্চিম গ্রীনল্যান্ড গ্রীষ্মকালীন সময়", "SRT": "সুরিনাম সময়", "NZST": "নিউজিল্যান্ড মানক সময়", "CST": "কেন্দ্রীয় মানক সময়", "MST": "মাকাও মান সময়", "HEPM": "সেন্ট পিয়ের ও মিকেলন দিবালোক সময়", "OESZ": "পূর্ব ইউরোপের গ্রীষ্মকালীন সময়", "AKDT": "আলাস্কা দিবালোক সময়", "PDT": "প্রশান্ত মহাসাগরীয় অঞ্চলের দিনের সময়", "WEZ": "পশ্চিম ইউরোপের মানক সময়", "AWDT": "অস্ট্রেলীয় পশ্চিমি দিবালোক সময়", "HADT": "হাওয়াই-আলেউত দিবালোক সময়", "HENOMX": "উত্তরপশ্চিম মেক্সিকোর দিনের সময়", "HNT": "নিউফাউন্ডল্যান্ড মানক সময়", "CLT": "চিলি মানক সময়", "WAT": "পশ্চিম আফ্রিকা মানক সময়", "HKST": "হং কং গ্রীষ্মকালীন সময়", "GYT": "গুয়ানা সময়", "GMT": "গ্রীনিচ মিন টাইম", "AST": "অতলান্তিক মানক সময়", "AEST": "অস্ট্রেলীয় পূর্ব মানক সময়", "JST": "জাপান মানক সময়", "HECU": "কিউবা দিবালোক সময়", "HNPM": "সেন্ট পিয়ের ও মিকেলন মানক সময়", "TMST": "তুর্কমেনিস্তান গ্রীষ্মকালীন সময়", "VET": "ভেনেজুয়েলা সময়", "WAST": "পশ্চিম আফ্রিকা গ্রীষ্মকালীন সময়", "WIB": "পশ্চিমী ইন্দোনেশিয়া সময়", "GFT": "ফরাসি গায়ানা সময়", "CDT": "কেন্দ্রীয় দিবালোক সময়", "HKT": "হং কং মানক সময়", "COT": "কোলোম্বিয়া মানক সময়", "HEEG": "পূর্ব গ্রীনল্যান্ড গ্রীষ্মকালীন সময়", "MESZ": "মধ্য ইউরোপের গ্রীষ্মকালীন সময়", "COST": "কোলোম্বিয়া গ্রীষ্মকালীন সময়", "PST": "প্রশান্ত মহাসাগরীয় অঞ্চলের মানক সময়", "MDT": "মাকাও গ্রীষ্মকাল সময়", "ACWDT": "অস্ট্রেলীয় কেন্দ্রীয় পশ্চিমি দিবালোক সময়", "UYT": "উরুগুয়ে মানক সময়", "JDT": "জাপান দিবালোক সময়", "HNOG": "পশ্চিম গ্রীনল্যান্ড মানক সময়", "SAST": "দক্ষিণ আফ্রিকা মানক সময়", "LHDT": "লর্ড হাওয়ে দিবালোক মসয়", "SGT": "সিঙ্গাপুর মানক সময়", "MEZ": "মধ্য ইউরোপের মানক সময়", "EAT": "পূর্ব আফ্রিকা সময়", "HNEG": "পূর্ব গ্রীনল্যান্ড মানক সময়", "HAT": "নিউফাউন্ডল্যান্ড দিবালোক সময়", "AKST": "আলাস্কা মানক সময়", "CAT": "মধ্য আফ্রিকা সময়", "HEPMX": "মেক্সিকান প্রশান্ত মহাসাগরীয় দিবালোক সময়", "∅∅∅": "এজোরেস গ্রীষ্মকালীন সময়", "ART": "আর্জেনটিনা মানক সময়", "MYT": "মালয়েশিয়া সময়", "WART": "পশ্চিমি আর্জেনটিনার প্রমাণ সময়", "ChST": "চামেরো মানক সময়", "CHAST": "চ্যাথাম মানক সময়", "ACWST": "অস্ট্রেলীয় কেন্দ্রীয় পশ্চিমি মানক সময়", "TMT": "তুর্কমেনিস্তান মানক সময়", "HNNOMX": "উত্তরপশ্চিম মেক্সিকোর মানক সময়", "ARST": "আর্জেনটিনা গ্রীষ্মকালীন সময়", "ECT": "ইকুয়েডর সময়", "WESZ": "পশ্চিম ইউরোপের গ্রীষ্মকালীন সময়", "BOT": "বোলিভিয়া সময়", "UYST": "উরুগুয়ে গ্রীষ্মকালীন সময়", "ADT": "অতলান্তিক দিবালোক সময়", "EST": "পূর্বাঞ্চলের প্রমাণ সময়", "HNCU": "কিউবা মানক সময়", "WIT": "পূর্ব ইন্দোনেশিয়া সময়", "HAST": "হাওয়াই-আলেউত মানক সময়", "CLST": "চিলি গ্রীষ্মকাল সময়", "CHADT": "চ্যাথাম দিবালোক সময়", "ACST": "অস্ট্রেলীয় কেন্দ্রীয় মানক সময়", "HNPMX": "মেক্সিকান প্রশান্ত মহসাগরীয় মানক সময়", "BT": "ভুটান সময়", "AWST": "অস্ট্রেলীয় পশ্চিমি মানক সময়", "OEZ": "পূর্ব ইউরোপের মানক সময়", "WARST": "পশ্চিমি আর্জেনটিনা গৃষ্মকালীন সময়", "AEDT": "অস্ট্রেলীয় পূর্ব দিবালোক সময়", "EDT": "পূর্বাঞ্চলের দিবালোক সময়"},
69         }
70 }
71
72 // Locale returns the current translators string locale
73 func (bn *bn_BD) Locale() string {
74         return bn.locale
75 }
76
77 // PluralsCardinal returns the list of cardinal plural rules associated with 'bn_BD'
78 func (bn *bn_BD) PluralsCardinal() []locales.PluralRule {
79         return bn.pluralsCardinal
80 }
81
82 // PluralsOrdinal returns the list of ordinal plural rules associated with 'bn_BD'
83 func (bn *bn_BD) PluralsOrdinal() []locales.PluralRule {
84         return bn.pluralsOrdinal
85 }
86
87 // PluralsRange returns the list of range plural rules associated with 'bn_BD'
88 func (bn *bn_BD) PluralsRange() []locales.PluralRule {
89         return bn.pluralsRange
90 }
91
92 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'bn_BD'
93 func (bn *bn_BD) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
94
95         n := math.Abs(num)
96         i := int64(n)
97
98         if (i == 0) || (n == 1) {
99                 return locales.PluralRuleOne
100         }
101
102         return locales.PluralRuleOther
103 }
104
105 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'bn_BD'
106 func (bn *bn_BD) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
107
108         n := math.Abs(num)
109
110         if n == 1 || n == 5 || n == 7 || n == 8 || n == 9 || n == 10 {
111                 return locales.PluralRuleOne
112         } else if n == 2 || n == 3 {
113                 return locales.PluralRuleTwo
114         } else if n == 4 {
115                 return locales.PluralRuleFew
116         } else if n == 6 {
117                 return locales.PluralRuleMany
118         }
119
120         return locales.PluralRuleOther
121 }
122
123 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'bn_BD'
124 func (bn *bn_BD) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
125
126         start := bn.CardinalPluralRule(num1, v1)
127         end := bn.CardinalPluralRule(num2, v2)
128
129         if start == locales.PluralRuleOne && end == locales.PluralRuleOne {
130                 return locales.PluralRuleOne
131         } else if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
132                 return locales.PluralRuleOther
133         }
134
135         return locales.PluralRuleOther
136
137 }
138
139 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
140 func (bn *bn_BD) MonthAbbreviated(month time.Month) string {
141         return bn.monthsAbbreviated[month]
142 }
143
144 // MonthsAbbreviated returns the locales abbreviated months
145 func (bn *bn_BD) MonthsAbbreviated() []string {
146         return bn.monthsAbbreviated[1:]
147 }
148
149 // MonthNarrow returns the locales narrow month given the 'month' provided
150 func (bn *bn_BD) MonthNarrow(month time.Month) string {
151         return bn.monthsNarrow[month]
152 }
153
154 // MonthsNarrow returns the locales narrow months
155 func (bn *bn_BD) MonthsNarrow() []string {
156         return bn.monthsNarrow[1:]
157 }
158
159 // MonthWide returns the locales wide month given the 'month' provided
160 func (bn *bn_BD) MonthWide(month time.Month) string {
161         return bn.monthsWide[month]
162 }
163
164 // MonthsWide returns the locales wide months
165 func (bn *bn_BD) MonthsWide() []string {
166         return bn.monthsWide[1:]
167 }
168
169 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
170 func (bn *bn_BD) WeekdayAbbreviated(weekday time.Weekday) string {
171         return bn.daysAbbreviated[weekday]
172 }
173
174 // WeekdaysAbbreviated returns the locales abbreviated weekdays
175 func (bn *bn_BD) WeekdaysAbbreviated() []string {
176         return bn.daysAbbreviated
177 }
178
179 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
180 func (bn *bn_BD) WeekdayNarrow(weekday time.Weekday) string {
181         return bn.daysNarrow[weekday]
182 }
183
184 // WeekdaysNarrow returns the locales narrow weekdays
185 func (bn *bn_BD) WeekdaysNarrow() []string {
186         return bn.daysNarrow
187 }
188
189 // WeekdayShort returns the locales short weekday given the 'weekday' provided
190 func (bn *bn_BD) WeekdayShort(weekday time.Weekday) string {
191         return bn.daysShort[weekday]
192 }
193
194 // WeekdaysShort returns the locales short weekdays
195 func (bn *bn_BD) WeekdaysShort() []string {
196         return bn.daysShort
197 }
198
199 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
200 func (bn *bn_BD) WeekdayWide(weekday time.Weekday) string {
201         return bn.daysWide[weekday]
202 }
203
204 // WeekdaysWide returns the locales wide weekdays
205 func (bn *bn_BD) WeekdaysWide() []string {
206         return bn.daysWide
207 }
208
209 // Decimal returns the decimal point of number
210 func (bn *bn_BD) Decimal() string {
211         return bn.decimal
212 }
213
214 // Group returns the group of number
215 func (bn *bn_BD) Group() string {
216         return bn.group
217 }
218
219 // Group returns the minus sign of number
220 func (bn *bn_BD) Minus() string {
221         return bn.minus
222 }
223
224 // FmtNumber returns 'num' with digits/precision of 'v' for 'bn_BD' and handles both Whole and Real numbers based on 'v'
225 func (bn *bn_BD) FmtNumber(num float64, v uint64) string {
226
227         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
228         l := len(s) + 1
229         count := 0
230         inWhole := v == 0
231         inSecondary := false
232         groupThreshold := 3
233
234         b := make([]byte, 0, l)
235
236         for i := len(s) - 1; i >= 0; i-- {
237
238                 if s[i] == '.' {
239                         b = append(b, bn.decimal[0])
240                         inWhole = true
241                         continue
242                 }
243
244                 if inWhole {
245
246                         if count == groupThreshold {
247                                 b = append(b, bn.group[0])
248                                 count = 1
249
250                                 if !inSecondary {
251                                         inSecondary = true
252                                         groupThreshold = 2
253                                 }
254                         } else {
255                                 count++
256                         }
257                 }
258
259                 b = append(b, s[i])
260         }
261
262         if num < 0 {
263                 b = append(b, bn.minus[0])
264         }
265
266         // reverse
267         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
268                 b[i], b[j] = b[j], b[i]
269         }
270
271         return string(b)
272 }
273
274 // FmtPercent returns 'num' with digits/precision of 'v' for 'bn_BD' and handles both Whole and Real numbers based on 'v'
275 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
276 func (bn *bn_BD) FmtPercent(num float64, v uint64) string {
277         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
278         l := len(s) + 2
279         b := make([]byte, 0, l)
280
281         for i := len(s) - 1; i >= 0; i-- {
282
283                 if s[i] == '.' {
284                         b = append(b, bn.decimal[0])
285                         continue
286                 }
287
288                 b = append(b, s[i])
289         }
290
291         if num < 0 {
292                 b = append(b, bn.minus[0])
293         }
294
295         // reverse
296         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
297                 b[i], b[j] = b[j], b[i]
298         }
299
300         b = append(b, bn.percent...)
301
302         return string(b)
303 }
304
305 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'bn_BD'
306 func (bn *bn_BD) FmtCurrency(num float64, v uint64, currency currency.Type) string {
307
308         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
309         symbol := bn.currencies[currency]
310         l := len(s) + len(symbol) + 1
311         count := 0
312         inWhole := v == 0
313         inSecondary := false
314         groupThreshold := 3
315
316         b := make([]byte, 0, l)
317
318         for i := len(s) - 1; i >= 0; i-- {
319
320                 if s[i] == '.' {
321                         b = append(b, bn.decimal[0])
322                         inWhole = true
323                         continue
324                 }
325
326                 if inWhole {
327
328                         if count == groupThreshold {
329                                 b = append(b, bn.group[0])
330                                 count = 1
331
332                                 if !inSecondary {
333                                         inSecondary = true
334                                         groupThreshold = 2
335                                 }
336                         } else {
337                                 count++
338                         }
339                 }
340
341                 b = append(b, s[i])
342         }
343
344         if num < 0 {
345                 b = append(b, bn.minus[0])
346         }
347
348         // reverse
349         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
350                 b[i], b[j] = b[j], b[i]
351         }
352
353         if int(v) < 2 {
354
355                 if v == 0 {
356                         b = append(b, bn.decimal...)
357                 }
358
359                 for i := 0; i < 2-int(v); i++ {
360                         b = append(b, '0')
361                 }
362         }
363
364         b = append(b, symbol...)
365
366         return string(b)
367 }
368
369 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'bn_BD'
370 // in accounting notation.
371 func (bn *bn_BD) FmtAccounting(num float64, v uint64, currency currency.Type) string {
372
373         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
374         symbol := bn.currencies[currency]
375         l := len(s) + len(symbol) + 1
376         count := 0
377         inWhole := v == 0
378         inSecondary := false
379         groupThreshold := 3
380
381         b := make([]byte, 0, l)
382
383         for i := len(s) - 1; i >= 0; i-- {
384
385                 if s[i] == '.' {
386                         b = append(b, bn.decimal[0])
387                         inWhole = true
388                         continue
389                 }
390
391                 if inWhole {
392
393                         if count == groupThreshold {
394                                 b = append(b, bn.group[0])
395                                 count = 1
396
397                                 if !inSecondary {
398                                         inSecondary = true
399                                         groupThreshold = 2
400                                 }
401                         } else {
402                                 count++
403                         }
404                 }
405
406                 b = append(b, s[i])
407         }
408
409         if num < 0 {
410
411                 b = append(b, bn.minus[0])
412
413         }
414
415         // reverse
416         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
417                 b[i], b[j] = b[j], b[i]
418         }
419
420         if int(v) < 2 {
421
422                 if v == 0 {
423                         b = append(b, bn.decimal...)
424                 }
425
426                 for i := 0; i < 2-int(v); i++ {
427                         b = append(b, '0')
428                 }
429         }
430
431         if num < 0 {
432                 b = append(b, symbol...)
433         } else {
434
435                 b = append(b, symbol...)
436         }
437
438         return string(b)
439 }
440
441 // FmtDateShort returns the short date representation of 't' for 'bn_BD'
442 func (bn *bn_BD) FmtDateShort(t time.Time) string {
443
444         b := make([]byte, 0, 32)
445
446         b = strconv.AppendInt(b, int64(t.Day()), 10)
447         b = append(b, []byte{0x2f}...)
448         b = strconv.AppendInt(b, int64(t.Month()), 10)
449         b = append(b, []byte{0x2f}...)
450
451         if t.Year() > 9 {
452                 b = append(b, strconv.Itoa(t.Year())[2:]...)
453         } else {
454                 b = append(b, strconv.Itoa(t.Year())[1:]...)
455         }
456
457         return string(b)
458 }
459
460 // FmtDateMedium returns the medium date representation of 't' for 'bn_BD'
461 func (bn *bn_BD) FmtDateMedium(t time.Time) string {
462
463         b := make([]byte, 0, 32)
464
465         b = strconv.AppendInt(b, int64(t.Day()), 10)
466         b = append(b, []byte{0x20}...)
467         b = append(b, bn.monthsAbbreviated[t.Month()]...)
468         b = append(b, []byte{0x2c, 0x20}...)
469
470         if t.Year() > 0 {
471                 b = strconv.AppendInt(b, int64(t.Year()), 10)
472         } else {
473                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
474         }
475
476         return string(b)
477 }
478
479 // FmtDateLong returns the long date representation of 't' for 'bn_BD'
480 func (bn *bn_BD) FmtDateLong(t time.Time) string {
481
482         b := make([]byte, 0, 32)
483
484         b = strconv.AppendInt(b, int64(t.Day()), 10)
485         b = append(b, []byte{0x20}...)
486         b = append(b, bn.monthsWide[t.Month()]...)
487         b = append(b, []byte{0x2c, 0x20}...)
488
489         if t.Year() > 0 {
490                 b = strconv.AppendInt(b, int64(t.Year()), 10)
491         } else {
492                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
493         }
494
495         return string(b)
496 }
497
498 // FmtDateFull returns the full date representation of 't' for 'bn_BD'
499 func (bn *bn_BD) FmtDateFull(t time.Time) string {
500
501         b := make([]byte, 0, 32)
502
503         b = append(b, bn.daysWide[t.Weekday()]...)
504         b = append(b, []byte{0x2c, 0x20}...)
505         b = strconv.AppendInt(b, int64(t.Day()), 10)
506         b = append(b, []byte{0x20}...)
507         b = append(b, bn.monthsWide[t.Month()]...)
508         b = append(b, []byte{0x2c, 0x20}...)
509
510         if t.Year() > 0 {
511                 b = strconv.AppendInt(b, int64(t.Year()), 10)
512         } else {
513                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
514         }
515
516         return string(b)
517 }
518
519 // FmtTimeShort returns the short time representation of 't' for 'bn_BD'
520 func (bn *bn_BD) 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, bn.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, bn.periodsAbbreviated[0]...)
542         } else {
543                 b = append(b, bn.periodsAbbreviated[1]...)
544         }
545
546         return string(b)
547 }
548
549 // FmtTimeMedium returns the medium time representation of 't' for 'bn_BD'
550 func (bn *bn_BD) 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, bn.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, bn.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, bn.periodsAbbreviated[0]...)
579         } else {
580                 b = append(b, bn.periodsAbbreviated[1]...)
581         }
582
583         return string(b)
584 }
585
586 // FmtTimeLong returns the long time representation of 't' for 'bn_BD'
587 func (bn *bn_BD) 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, bn.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, bn.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, bn.periodsAbbreviated[0]...)
616         } else {
617                 b = append(b, bn.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 'bn_BD'
629 func (bn *bn_BD) 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, bn.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, bn.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, bn.periodsAbbreviated[0]...)
658         } else {
659                 b = append(b, bn.periodsAbbreviated[1]...)
660         }
661
662         b = append(b, []byte{0x20}...)
663
664         tz, _ := t.Zone()
665
666         if btz, ok := bn.timezones[tz]; ok {
667                 b = append(b, btz...)
668         } else {
669                 b = append(b, tz...)
670         }
671
672         return string(b)
673 }