8 "github.com/go-playground/locales"
9 "github.com/go-playground/locales/currency"
14 pluralsCardinal []locales.PluralRule
15 pluralsOrdinal []locales.PluralRule
16 pluralsRange []locales.PluralRule
24 currencies []string // idx = enum of currency code
25 currencyNegativePrefix string
26 currencyNegativeSuffix string
27 monthsAbbreviated []string
30 daysAbbreviated []string
34 periodsAbbreviated []string
35 periodsNarrow []string
38 erasAbbreviated []string
41 timezones map[string]string
44 // New returns a new instance of translator for the 'ml_IN' locale
45 func New() locales.Translator {
48 pluralsCardinal: []locales.PluralRule{2, 6},
49 pluralsOrdinal: []locales.PluralRule{6},
50 pluralsRange: []locales.PluralRule{2, 6},
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 currencyNegativePrefix: "(",
60 currencyNegativeSuffix: ")",
61 monthsAbbreviated: []string{"", "ജനു", "ഫെബ്രു", "മാർ", "ഏപ്രി", "മേയ്", "ജൂൺ", "ജൂലൈ", "ഓഗ", "സെപ്റ്റം", "ഒക്ടോ", "നവം", "ഡിസം"},
62 monthsNarrow: []string{"", "ജ", "ഫ", "മാ", "ഏ", "മെ", "ജൂൺ", "ജൂ", "ഓ", "സെ", "ഒ", "ന", "ഡി"},
63 monthsWide: []string{"", "ജനുവരി", "ഫെബ്രുവരി", "മാർച്ച്", "ഏപ്രിൽ", "മേയ്", "ജൂൺ", "ജൂലൈ", "ഓഗസ്റ്റ്", "സെപ്റ്റംബർ", "ഒക്\u200cടോബർ", "നവംബർ", "ഡിസംബർ"},
64 daysAbbreviated: []string{"ഞായർ", "തിങ്കൾ", "ചൊവ്വ", "ബുധൻ", "വ്യാഴം", "വെള്ളി", "ശനി"},
65 daysNarrow: []string{"ഞ", "തി", "ചൊ", "ബു", "വ്യാ", "വെ", "ശ"},
66 daysShort: []string{"ഞാ", "തി", "ചൊ", "ബു", "വ്യാ", "വെ", "ശ"},
67 daysWide: []string{"ഞായറാഴ്\u200cച", "തിങ്കളാഴ്\u200cച", "ചൊവ്വാഴ്ച", "ബുധനാഴ്\u200cച", "വ്യാഴാഴ്\u200cച", "വെള്ളിയാഴ്\u200cച", "ശനിയാഴ്\u200cച"},
68 periodsAbbreviated: []string{"AM", "PM"},
69 periodsNarrow: []string{"AM", "PM"},
70 periodsWide: []string{"AM", "PM"},
71 erasAbbreviated: []string{"ക്രി.മു.", "എഡി"},
72 erasNarrow: []string{"", ""},
73 erasWide: []string{"ക്രിസ്\u200cതുവിന് മുമ്പ്", "ആന്നോ ഡൊമിനി"},
74 timezones: map[string]string{"LHDT": "ലോർഡ് ഹോവ് ഡേലൈറ്റ് സമയം", "EAT": "കിഴക്കൻ ആഫ്രിക്ക സമയം", "WITA": "മധ്യ ഇന്തോനേഷ്യ സമയം", "JST": "ജപ്പാൻ സ്റ്റാൻഡേർഡ് സമയം", "HNPMX": "മെക്\u200cസിക്കൻ പസഫിക് സ്റ്റാൻഡേർഡ് സമയം", "CHADT": "ചാത്തം ഗ്രീഷ്\u200cമകാല സമയം", "∅∅∅": "ആമസോൺ ഗ്രീഷ്\u200cമകാല സമയം", "WEZ": "പടിഞ്ഞാറൻ യൂറോപ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "UYST": "ഉറുഗ്വേ ഗ്രീഷ്\u200cമകാല സമയം", "TMST": "തുർക്ക്\u200cമെനിസ്ഥാൻ ഗ്രീഷ്\u200cമകാല സമയം", "ADT": "അറ്റ്\u200cലാന്റിക് ഡേലൈറ്റ് സമയം", "CLT": "ചിലി സ്റ്റാൻഡേർഡ് സമയം", "EDT": "വടക്കെ അമേരിക്കൻ കിഴക്കൻ ഡേലൈറ്റ് സമയം", "PDT": "വടക്കെ അമേരിക്കൻ പസഫിക് ഡേലൈറ്റ് സമയം", "BOT": "ബൊളീവിയ സമയം", "NZST": "ന്യൂസിലാൻഡ് സ്റ്റാൻഡേർഡ് സമയം", "ARST": "അർജന്റീന ഗ്രീഷ്\u200cമകാല സമയം", "HAT": "ന്യൂഫൗണ്ട്\u200cലാന്റ് ഡേലൈറ്റ് സമയം", "HKT": "ഹോങ്കോങ്ങ് സ്റ്റാൻഡേർഡ് സമയം", "SGT": "സിംഗപ്പൂർ സ്റ്റാൻഡേർഡ് സമയം", "HECU": "ക്യൂബ ഡേലൈറ്റ് സമയം", "OESZ": "കിഴക്കൻ യൂറോപ്യൻ ഗ്രീഷ്മകാല സമയം", "HNEG": "കിഴക്കൻ ഗ്രീൻലാൻഡ് സ്റ്റാൻഡേർഡ് സമയം", "HKST": "ഹോങ്കോങ്ങ് ഗ്രീഷ്\u200cമകാല സമയം", "EST": "വടക്കെ അമേരിക്കൻ കിഴക്കൻ സ്റ്റാൻഡേർഡ് സമയം", "HNPM": "സെന്റ് പിയറി ആൻഡ് മിക്വലൻ സ്റ്റാൻഡേർഡ് സമയം", "AWDT": "ഓസ്\u200cട്രേലിയൻ പടിഞ്ഞാറൻ ഡേലൈറ്റ് സമയം", "AEST": "ഓസ്\u200cട്രേലിയൻ കിഴക്കൻ സ്റ്റാൻഡേർഡ് സമയം", "COT": "കൊളംബിയ സ്റ്റാൻഡേർഡ് സമയം", "ACWDT": "ഓസ്ട്രേലിയൻ സെൻട്രൽ പടിഞ്ഞാറൻ ഡേലൈറ്റ് സമയം", "LHST": "ലോർഡ് ഹോവ് സ്റ്റാൻഡേർഡ് സമയം", "BT": "ഭൂട്ടാൻ സമയം", "HADT": "ഹവായ്-അലൂഷ്യൻ ഡേലൈറ്റ് സമയം", "HEOG": "പടിഞ്ഞാറൻ ഗ്രീൻലാൻഡ് ഗ്രീഷ്\u200cമകാല സമയം", "HEEG": "കിഴക്കൻ ഗ്രീൻലാൻഡ് ഗ്രീഷ്\u200cമകാല സമയം", "SAST": "ദക്ഷിണാഫ്രിക്ക സ്റ്റാൻഡേർഡ് സമയം", "CLST": "ചിലി ഗ്രീഷ്\u200cമകാല സമയം", "PST": "വടക്കെ അമേരിക്കൻ പസഫിക് സ്റ്റാൻഡേർഡ് സമയം", "ACWST": "ഓസ്ട്രേലിയൻ സെൻട്രൽ പടിഞ്ഞാറൻ സ്റ്റാൻഡേർഡ് സമയം", "NZDT": "ന്യൂസിലാൻഡ് ഡേലൈറ്റ് സമയം", "MEZ": "സെൻട്രൽ യൂറോപ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "VET": "വെനിസ്വേല സമയം", "HNNOMX": "വടക്കുപടിഞ്ഞാറൻ മെക്\u200cസിക്കൻ സ്റ്റാൻഡേർഡ് സമയം", "IST": "ഇന്ത്യൻ സ്റ്റാൻഡേർഡ് സമയം", "COST": "കൊളംബിയ ഗ്രീഷ്\u200cമകാല സമയം", "AKST": "അലാസ്ക സ്റ്റാൻഡേർഡ് സമയം", "WESZ": "പടിഞ്ഞാറൻ യൂറോപ്യൻ ഗ്രീഷ്\u200cമകാല സമയം", "HNCU": "ക്യൂബ സ്റ്റാൻഡേർഡ് സമയം", "SRT": "സുരിനെയിം സമയം", "CDT": "വടക്കെ അമേരിക്കൻ സെൻട്രൽ ഡേലൈറ്റ് സമയം", "WAST": "പടിഞ്ഞാറൻ ആഫ്രിക്ക ഗ്രീഷ്\u200cമകാല സമയം", "HEPMX": "മെക്സിക്കൻ പസഫിക് ഡേലൈറ്റ് സമയം", "WIB": "പടിഞ്ഞാറൻ ഇന്തോനേഷ്യ സമയം", "ACDT": "ഓസ്ട്രേലിയൻ സെൻട്രൽ ഡേലൈറ്റ് സമയം", "CHAST": "ചാത്തം സ്റ്റാൻഡേർഡ് സമയം", "AWST": "ഓസ്\u200cട്രേലിയൻ പടിഞ്ഞാറൻ സ്റ്റാൻഡേർഡ് സമയം", "MST": "മകൌ സ്റ്റാൻഡേർഡ് സമയം", "MDT": "മകൌ വേനൽക്കാല സമയം", "MYT": "മലേഷ്യ സമയം", "ECT": "ഇക്വഡോർ സമയം", "ACST": "ഓസ്ട്രേലിയൻ സെൻട്രൽ സ്റ്റാൻഡേർഡ് സമയം", "WARST": "പടിഞ്ഞാറൻ അർജന്റീന ഗ്രീഷ്\u200cമകാല സമയം", "GFT": "ഫ്രഞ്ച് ഗയാന സമയം", "MESZ": "സെൻട്രൽ യൂറോപ്യൻ ഗ്രീഷ്മകാല സമയം", "HAST": "ഹവായ്-അലൂഷ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "WAT": "പടിഞ്ഞാറൻ ആഫ്രിക്ക സ്റ്റാൻഡേർഡ് സമയം", "TMT": "തുർക്ക്\u200cമെനിസ്ഥാൻ സ്റ്റാൻഡേർഡ് സമയം", "HENOMX": "വടക്കുപടിഞ്ഞാറൻ മെക്സിക്കൻ ഡേലൈറ്റ് സമയം", "JDT": "ജപ്പാൻ ഡേലൈറ്റ് സമയം", "ART": "അർജന്റീന സ്റ്റാൻഡേർഡ് സമയം", "HNOG": "പടിഞ്ഞാറൻ ഗ്രീൻലാൻഡ് സ്റ്റാൻഡേർഡ് സമയം", "GMT": "ഗ്രീൻവിച്ച് മീൻ സമയം", "WIT": "കിഴക്കൻ ഇന്തോനേഷ്യ സമയം", "ChST": "ചമോറോ സ്റ്റാൻഡേർഡ് സമയം", "UYT": "ഉറുഗ്വേ സ്റ്റാൻഡേർഡ് സമയം", "WART": "പടിഞ്ഞാറൻ അർജന്റീന സ്റ്റാൻഡേർഡ് സമയം", "OEZ": "കിഴക്കൻ യൂറോപ്യൻ സ്റ്റാൻഡേർഡ് സമയം", "AEDT": "ഓസ്\u200cട്രേലിയൻ കിഴക്കൻ ഡേലൈറ്റ് സമയം", "HNT": "ന്യൂഫൗണ്ട്\u200cലാന്റ് സ്റ്റാൻഡേർഡ് സമയം", "AKDT": "അലാസ്\u200cക ഡേലൈറ്റ് സമയം", "CAT": "മധ്യ ആഫ്രിക്ക സമയം", "GYT": "ഗയാന സമയം", "HEPM": "സെന്റ് പിയറി ആൻഡ് മിക്വലൻ ഡേലൈറ്റ് സമയം", "CST": "വടക്കെ അമേരിക്കൻ സെൻട്രൽ സ്റ്റാൻഡേർഡ് സമയം", "AST": "അറ്റ്\u200cലാന്റിക് സ്റ്റാൻഡേർഡ് സമയം"},
78 // Locale returns the current translators string locale
79 func (ml *ml_IN) Locale() string {
83 // PluralsCardinal returns the list of cardinal plural rules associated with 'ml_IN'
84 func (ml *ml_IN) PluralsCardinal() []locales.PluralRule {
85 return ml.pluralsCardinal
88 // PluralsOrdinal returns the list of ordinal plural rules associated with 'ml_IN'
89 func (ml *ml_IN) PluralsOrdinal() []locales.PluralRule {
90 return ml.pluralsOrdinal
93 // PluralsRange returns the list of range plural rules associated with 'ml_IN'
94 func (ml *ml_IN) PluralsRange() []locales.PluralRule {
95 return ml.pluralsRange
98 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'ml_IN'
99 func (ml *ml_IN) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
104 return locales.PluralRuleOne
107 return locales.PluralRuleOther
110 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'ml_IN'
111 func (ml *ml_IN) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
112 return locales.PluralRuleOther
115 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'ml_IN'
116 func (ml *ml_IN) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
118 start := ml.CardinalPluralRule(num1, v1)
119 end := ml.CardinalPluralRule(num2, v2)
121 if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
122 return locales.PluralRuleOther
123 } else if start == locales.PluralRuleOther && end == locales.PluralRuleOne {
124 return locales.PluralRuleOne
127 return locales.PluralRuleOther
131 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
132 func (ml *ml_IN) MonthAbbreviated(month time.Month) string {
133 return ml.monthsAbbreviated[month]
136 // MonthsAbbreviated returns the locales abbreviated months
137 func (ml *ml_IN) MonthsAbbreviated() []string {
138 return ml.monthsAbbreviated[1:]
141 // MonthNarrow returns the locales narrow month given the 'month' provided
142 func (ml *ml_IN) MonthNarrow(month time.Month) string {
143 return ml.monthsNarrow[month]
146 // MonthsNarrow returns the locales narrow months
147 func (ml *ml_IN) MonthsNarrow() []string {
148 return ml.monthsNarrow[1:]
151 // MonthWide returns the locales wide month given the 'month' provided
152 func (ml *ml_IN) MonthWide(month time.Month) string {
153 return ml.monthsWide[month]
156 // MonthsWide returns the locales wide months
157 func (ml *ml_IN) MonthsWide() []string {
158 return ml.monthsWide[1:]
161 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
162 func (ml *ml_IN) WeekdayAbbreviated(weekday time.Weekday) string {
163 return ml.daysAbbreviated[weekday]
166 // WeekdaysAbbreviated returns the locales abbreviated weekdays
167 func (ml *ml_IN) WeekdaysAbbreviated() []string {
168 return ml.daysAbbreviated
171 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
172 func (ml *ml_IN) WeekdayNarrow(weekday time.Weekday) string {
173 return ml.daysNarrow[weekday]
176 // WeekdaysNarrow returns the locales narrow weekdays
177 func (ml *ml_IN) WeekdaysNarrow() []string {
181 // WeekdayShort returns the locales short weekday given the 'weekday' provided
182 func (ml *ml_IN) WeekdayShort(weekday time.Weekday) string {
183 return ml.daysShort[weekday]
186 // WeekdaysShort returns the locales short weekdays
187 func (ml *ml_IN) WeekdaysShort() []string {
191 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
192 func (ml *ml_IN) WeekdayWide(weekday time.Weekday) string {
193 return ml.daysWide[weekday]
196 // WeekdaysWide returns the locales wide weekdays
197 func (ml *ml_IN) WeekdaysWide() []string {
201 // Decimal returns the decimal point of number
202 func (ml *ml_IN) Decimal() string {
206 // Group returns the group of number
207 func (ml *ml_IN) Group() string {
211 // Group returns the minus sign of number
212 func (ml *ml_IN) Minus() string {
216 // FmtNumber returns 'num' with digits/precision of 'v' for 'ml_IN' and handles both Whole and Real numbers based on 'v'
217 func (ml *ml_IN) FmtNumber(num float64, v uint64) string {
219 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
220 l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3
226 b := make([]byte, 0, l)
228 for i := len(s) - 1; i >= 0; i-- {
231 b = append(b, ml.decimal[0])
238 if count == groupThreshold {
239 b = append(b, ml.group[0])
255 b = append(b, ml.minus[0])
259 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
260 b[i], b[j] = b[j], b[i]
266 // FmtPercent returns 'num' with digits/precision of 'v' for 'ml_IN' and handles both Whole and Real numbers based on 'v'
267 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
268 func (ml *ml_IN) FmtPercent(num float64, v uint64) string {
269 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
271 b := make([]byte, 0, l)
273 for i := len(s) - 1; i >= 0; i-- {
276 b = append(b, ml.decimal[0])
284 b = append(b, ml.minus[0])
288 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
289 b[i], b[j] = b[j], b[i]
292 b = append(b, ml.percent...)
297 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ml_IN'
298 func (ml *ml_IN) FmtCurrency(num float64, v uint64, currency currency.Type) string {
300 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
301 symbol := ml.currencies[currency]
302 l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3
305 b := make([]byte, 0, l)
307 for i := len(s) - 1; i >= 0; i-- {
310 b = append(b, ml.decimal[0])
317 b = append(b, ml.group[0])
327 for j := len(symbol) - 1; j >= 0; j-- {
328 b = append(b, symbol[j])
332 b = append(b, ml.minus[0])
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]
343 b = append(b, ml.decimal...)
346 for i := 0; i < 2-int(v); i++ {
354 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ml_IN'
355 // in accounting notation.
356 func (ml *ml_IN) FmtAccounting(num float64, v uint64, currency currency.Type) string {
358 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
359 symbol := ml.currencies[currency]
360 l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
363 b := make([]byte, 0, l)
365 for i := len(s) - 1; i >= 0; i-- {
368 b = append(b, ml.decimal[0])
375 b = append(b, ml.group[0])
387 for j := len(symbol) - 1; j >= 0; j-- {
388 b = append(b, symbol[j])
391 b = append(b, ml.currencyNegativePrefix[0])
395 for j := len(symbol) - 1; j >= 0; j-- {
396 b = append(b, symbol[j])
402 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
403 b[i], b[j] = b[j], b[i]
409 b = append(b, ml.decimal...)
412 for i := 0; i < 2-int(v); i++ {
418 b = append(b, ml.currencyNegativeSuffix...)
424 // FmtDateShort returns the short date representation of 't' for 'ml_IN'
425 func (ml *ml_IN) FmtDateShort(t time.Time) string {
427 b := make([]byte, 0, 32)
429 b = strconv.AppendInt(b, int64(t.Day()), 10)
430 b = append(b, []byte{0x2f}...)
431 b = strconv.AppendInt(b, int64(t.Month()), 10)
432 b = append(b, []byte{0x2f}...)
435 b = append(b, strconv.Itoa(t.Year())[2:]...)
437 b = append(b, strconv.Itoa(t.Year())[1:]...)
443 // FmtDateMedium returns the medium date representation of 't' for 'ml_IN'
444 func (ml *ml_IN) FmtDateMedium(t time.Time) string {
446 b := make([]byte, 0, 32)
449 b = strconv.AppendInt(b, int64(t.Year()), 10)
451 b = strconv.AppendInt(b, int64(-t.Year()), 10)
454 b = append(b, []byte{0x2c, 0x20}...)
455 b = append(b, ml.monthsAbbreviated[t.Month()]...)
456 b = append(b, []byte{0x20}...)
457 b = strconv.AppendInt(b, int64(t.Day()), 10)
462 // FmtDateLong returns the long date representation of 't' for 'ml_IN'
463 func (ml *ml_IN) FmtDateLong(t time.Time) string {
465 b := make([]byte, 0, 32)
468 b = strconv.AppendInt(b, int64(t.Year()), 10)
470 b = strconv.AppendInt(b, int64(-t.Year()), 10)
473 b = append(b, []byte{0x2c, 0x20}...)
474 b = append(b, ml.monthsWide[t.Month()]...)
475 b = append(b, []byte{0x20}...)
476 b = strconv.AppendInt(b, int64(t.Day()), 10)
481 // FmtDateFull returns the full date representation of 't' for 'ml_IN'
482 func (ml *ml_IN) FmtDateFull(t time.Time) string {
484 b := make([]byte, 0, 32)
487 b = strconv.AppendInt(b, int64(t.Year()), 10)
489 b = strconv.AppendInt(b, int64(-t.Year()), 10)
492 b = append(b, []byte{0x2c, 0x20}...)
493 b = append(b, ml.monthsWide[t.Month()]...)
494 b = append(b, []byte{0x20}...)
495 b = strconv.AppendInt(b, int64(t.Day()), 10)
496 b = append(b, []byte{0x2c, 0x20}...)
497 b = append(b, ml.daysWide[t.Weekday()]...)
502 // FmtTimeShort returns the short time representation of 't' for 'ml_IN'
503 func (ml *ml_IN) FmtTimeShort(t time.Time) string {
505 b := make([]byte, 0, 32)
513 b = strconv.AppendInt(b, int64(h), 10)
514 b = append(b, ml.timeSeparator...)
520 b = strconv.AppendInt(b, int64(t.Minute()), 10)
521 b = append(b, []byte{0x20}...)
524 b = append(b, ml.periodsAbbreviated[0]...)
526 b = append(b, ml.periodsAbbreviated[1]...)
532 // FmtTimeMedium returns the medium time representation of 't' for 'ml_IN'
533 func (ml *ml_IN) FmtTimeMedium(t time.Time) string {
535 b := make([]byte, 0, 32)
543 b = strconv.AppendInt(b, int64(h), 10)
544 b = append(b, ml.timeSeparator...)
550 b = strconv.AppendInt(b, int64(t.Minute()), 10)
551 b = append(b, ml.timeSeparator...)
557 b = strconv.AppendInt(b, int64(t.Second()), 10)
558 b = append(b, []byte{0x20}...)
561 b = append(b, ml.periodsAbbreviated[0]...)
563 b = append(b, ml.periodsAbbreviated[1]...)
569 // FmtTimeLong returns the long time representation of 't' for 'ml_IN'
570 func (ml *ml_IN) FmtTimeLong(t time.Time) string {
572 b := make([]byte, 0, 32)
580 b = strconv.AppendInt(b, int64(h), 10)
581 b = append(b, ml.timeSeparator...)
587 b = strconv.AppendInt(b, int64(t.Minute()), 10)
588 b = append(b, ml.timeSeparator...)
594 b = strconv.AppendInt(b, int64(t.Second()), 10)
595 b = append(b, []byte{0x20}...)
598 b = append(b, ml.periodsAbbreviated[0]...)
600 b = append(b, ml.periodsAbbreviated[1]...)
603 b = append(b, []byte{0x20}...)
611 // FmtTimeFull returns the full time representation of 't' for 'ml_IN'
612 func (ml *ml_IN) FmtTimeFull(t time.Time) string {
614 b := make([]byte, 0, 32)
622 b = strconv.AppendInt(b, int64(h), 10)
623 b = append(b, ml.timeSeparator...)
629 b = strconv.AppendInt(b, int64(t.Minute()), 10)
630 b = append(b, ml.timeSeparator...)
636 b = strconv.AppendInt(b, int64(t.Second()), 10)
637 b = append(b, []byte{0x20}...)
640 b = append(b, ml.periodsAbbreviated[0]...)
642 b = append(b, ml.periodsAbbreviated[1]...)
645 b = append(b, []byte{0x20}...)
649 if btz, ok := ml.timezones[tz]; ok {
650 b = append(b, btz...)