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 'km_KH' locale
45 func New() locales.Translator {
48 pluralsCardinal: []locales.PluralRule{6},
49 pluralsOrdinal: []locales.PluralRule{6},
50 pluralsRange: []locales.PluralRule{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{"", "មករា", "កុម្ភៈ", "មីនា", "មេសា", "ឧសភា", "មិថុនា", "កក្កដា", "សីហា", "កញ្ញា", "តុលា", "វិច្ឆិកា", "ធ្នូ"},
64 daysAbbreviated: []string{"អាទិត្យ", "ច័ន្ទ", "អង្គារ", "ពុធ", "ព្រហស្បតិ៍", "សុក្រ", "សៅរ៍"},
65 daysNarrow: []string{"អ", "ច", "អ", "ព", "ព", "ស", "ស"},
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{"មុន\u200bគ្រិស្តសករាជ", "គ្រិស្តសករាជ"},
74 timezones: map[string]string{"NZST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bនូវែលសេឡង់", "VET": "ម៉ោង\u200bនៅ\u200bវ៉េណេស៊ុយអេឡា", "HNNOMX": "ម៉ោង\u200bស្តង់ដា\u200bនៅ\u200bម៉ិកស៊ិកភាគពាយព្យ", "WITA": "ម៉ោង\u200bនៅ\u200bឥណ្ឌូណេស៊ី\u200b\u200b\u200bកណ្ដាល", "ADT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bអាត្លង់ទិក", "CLST": "ម៉ោងរដូវក្តៅនៅឈីលី", "HEPM": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅសង់\u200bព្យែរ និង\u200bមីគុយឡុង", "ACWST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bភាគ\u200bខាង\u200bលិច\u200bនៃ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "IST": "ម៉ោង\u200bនៅ\u200bឥណ្ឌា", "COST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bកូឡុំប៊ី", "JST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bជប៉ុន", "LHST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bឡត\u200bហៅ", "MESZ": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអឺរ៉ុប\u200bកណ្ដាល", "HNT": "ម៉ោង\u200b\u200bស្តង់ដារ\u200b\u200bនៅ\u200bញូហ្វោនឡែន", "MYT": "ម៉ោង\u200bនៅ\u200bម៉ាឡេស៊ី", "MEZ": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអឺរ៉ុប\u200bកណ្ដាល", "ACWDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200b\u200bភាគ\u200bខាង\u200bលិច\u200bនៃ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "ART": "ម៉ោង\u200b\u200bស្តង់ដារ\u200bនៅ\u200bអាសង់ទីន", "SAST": "ម៉ោង\u200bនៅ\u200bអាហ្វ្រិក\u200bខាង\u200bត្បូង", "CLT": "ម៉ោងស្តង់ដារនៅឈីលី", "COT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bកូឡុំប៊ី", "GFT": "ម៉ោង\u200bនៅ\u200bឃ្វីយ៉ាន\u200bបារាំង", "AWST": "ម៉ោង\u200b\u200bស្តង់ដារ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bលិច", "MST": "MST", "HKST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bហុងកុង", "HNPM": "ម៉ោង\u200bស្តង់ដារ\u200bនៅសង់\u200bព្យែរ និង\u200bមីគុយឡុង", "MDT": "MDT", "NZDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bនូវែលសេឡង់", "HEOG": "ម៉ោងរដូវក្តៅនៅហ្គ្រីនលែនខាងលិច", "HEEG": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bហ្គ្រីនលែនខាង\u200bកើត", "AKDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200b\u200bអាឡាស្កា", "SGT": "ម៉ោង\u200bនៅ\u200bសិង្ហបូរី", "WESZ": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអឺរ៉ុប\u200bខាង\u200bលិច", "CHAST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bចាថាំ", "CHADT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bចាថាំ", "SRT": "ម៉ោង\u200bនៅ\u200bសូរីណាម", "WIT": "ម៉ោង\u200bនៅ\u200bឥណ្ឌូណេស៊ី\u200b\u200bខាង\u200bកើត", "TMST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bតួកម៉េនីស្ថាន\u200b", "HNEG": "ម៉ោង\u200b\u200b\u200bស្តង់ដារ\u200bនៅ\u200b\u200bហ្គ្រីនលែន\u200bខាង\u200bកើត", "HAT": "ម៉ោង\u200bពេលថ្ងៃ\u200bនៅ\u200bញូហ្វោនឡែន", "HKT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bហុងកុង", "ChST": "ម៉ោង\u200bនៅ\u200bចាំម៉ូរ៉ូ", "AWDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bលិច", "ACDT": "ម៉ោង\u200bពេលថ្ងៃ\u200b\u200b\u200b\u200bនៅ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "HNOG": "ម៉ោងស្តង់ដារនៅហ្គ្រីនលែនខាងលិច", "HECU": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bគុយបា", "UYST": "ម៉ោង\u200b\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអ៊ុយរូហ្គាយ", "ACST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអូស្ត្រាលី\u200bកណ្ដាល", "CAT": "ម៉ោង\u200bនៅ\u200bអាហ្វ្រិក\u200bកណ្ដាល", "TMT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅតួកម៉េនីស្ថាន", "WAT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាហ្វ្រិក\u200bខាង\u200bលិច", "LHDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bឡតហៅ", "AEST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bកើត", "EST": "ម៉ោង\u200bស្តង់ដារ\u200bភាគ\u200bខាង\u200bកើត\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "HNPMX": "ម៉ោង\u200bស្តង់ដា\u200bនៅ\u200bប៉ាសីុហ្វិក\u200bម៉ិកស៊ិក", "OEZ": "ម៉ោង\u200bស្តង់ដារ\u200b\u200bនៅ\u200bអឺរ៉ុប\u200b\u200bខាង\u200bកើត\u200b", "BT": "ម៉ោងនៅប៊ូតាន", "UYT": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអ៊ុយរូហ្គាយ", "HADT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bហាវៃ-អាល់ដ្យូសិន", "AEDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bអូស្ត្រាលី\u200bខាង\u200bកើត", "GYT": "ម៉ោង\u200bនៅ\u200bឃ្វីយ៉ាន", "∅∅∅": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bប៉េរូ", "HEPMX": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bប៉ាសីុហ្វិក\u200bម៉ិកស៊ិក", "AST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាត្លង់ទិក", "WAST": "ម៉ោង\u200b\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាហ្វ្រិក\u200b\u200b\u200bខាងលិច", "ECT": "ម៉ោង\u200bនៅ\u200bអេក្វាទ័រ", "PST": "ម៉ោង\u200bស្តង់ដារ\u200bភាគ\u200bខាង\u200bលិច\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "OESZ": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអឺរ៉ុប\u200b\u200bខាង\u200bកើត\u200b", "HNCU": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bគុយបា", "CDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bភាគ\u200bកណ្ដាល\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "CST": "ម៉ោង\u200bស្តង់ដារ\u200bភាគ\u200bកណ្ដាល\u200bនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "HAST": "ម៉ោង\u200bស្តង់ដារ\u200b\u200bនៅ\u200bហាវៃ-អាល់ដ្យូសិន", "JDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅជប៉ុន", "WIB": "ម៉ោង\u200bនៅ\u200bឥណ្ឌូណេស៊ី\u200b\u200bខាង\u200bលិច", "GMT": "ម៉ោងនៅគ្រីនវិច", "WART": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាសង់ទីន\u200b\u200bខាង\u200bលិច", "WARST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាសង់ទីន\u200b\u200bខាង\u200bលិច", "HENOMX": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bនៅ\u200bម៉ិកស៊ិកភាគពាយព្យ", "ARST": "ម៉ោង\u200bរដូវ\u200bក្ដៅ\u200bនៅ\u200bអាសង់ទីន", "EAT": "ម៉ោង\u200bនៅ\u200bអាហ្វ្រិក\u200bខាង\u200bកើត", "EDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200bភាគខាង\u200bកើតនៅ\u200bអាមេរិក\u200bខាង\u200bជើង", "PDT": "ម៉ោង\u200bពេល\u200bថ្ងៃ\u200b\u200bភាគ\u200bខាងលិច\u200bនៅ\u200bអាមេរិក\u200bភាគ\u200bខាង\u200bជើង", "BOT": "ម៉ោង\u200bនៅ\u200bបូលីវី", "AKST": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអាឡាស្កា", "WEZ": "ម៉ោង\u200bស្តង់ដារ\u200bនៅ\u200bអឺរ៉ុប\u200bខាង\u200bលិច"},
78 // Locale returns the current translators string locale
79 func (km *km_KH) Locale() string {
83 // PluralsCardinal returns the list of cardinal plural rules associated with 'km_KH'
84 func (km *km_KH) PluralsCardinal() []locales.PluralRule {
85 return km.pluralsCardinal
88 // PluralsOrdinal returns the list of ordinal plural rules associated with 'km_KH'
89 func (km *km_KH) PluralsOrdinal() []locales.PluralRule {
90 return km.pluralsOrdinal
93 // PluralsRange returns the list of range plural rules associated with 'km_KH'
94 func (km *km_KH) PluralsRange() []locales.PluralRule {
95 return km.pluralsRange
98 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'km_KH'
99 func (km *km_KH) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
100 return locales.PluralRuleOther
103 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'km_KH'
104 func (km *km_KH) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
105 return locales.PluralRuleOther
108 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'km_KH'
109 func (km *km_KH) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
110 return locales.PluralRuleOther
113 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
114 func (km *km_KH) MonthAbbreviated(month time.Month) string {
115 return km.monthsAbbreviated[month]
118 // MonthsAbbreviated returns the locales abbreviated months
119 func (km *km_KH) MonthsAbbreviated() []string {
120 return km.monthsAbbreviated[1:]
123 // MonthNarrow returns the locales narrow month given the 'month' provided
124 func (km *km_KH) MonthNarrow(month time.Month) string {
125 return km.monthsNarrow[month]
128 // MonthsNarrow returns the locales narrow months
129 func (km *km_KH) MonthsNarrow() []string {
130 return km.monthsNarrow[1:]
133 // MonthWide returns the locales wide month given the 'month' provided
134 func (km *km_KH) MonthWide(month time.Month) string {
135 return km.monthsWide[month]
138 // MonthsWide returns the locales wide months
139 func (km *km_KH) MonthsWide() []string {
140 return km.monthsWide[1:]
143 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
144 func (km *km_KH) WeekdayAbbreviated(weekday time.Weekday) string {
145 return km.daysAbbreviated[weekday]
148 // WeekdaysAbbreviated returns the locales abbreviated weekdays
149 func (km *km_KH) WeekdaysAbbreviated() []string {
150 return km.daysAbbreviated
153 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
154 func (km *km_KH) WeekdayNarrow(weekday time.Weekday) string {
155 return km.daysNarrow[weekday]
158 // WeekdaysNarrow returns the locales narrow weekdays
159 func (km *km_KH) WeekdaysNarrow() []string {
163 // WeekdayShort returns the locales short weekday given the 'weekday' provided
164 func (km *km_KH) WeekdayShort(weekday time.Weekday) string {
165 return km.daysShort[weekday]
168 // WeekdaysShort returns the locales short weekdays
169 func (km *km_KH) WeekdaysShort() []string {
173 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
174 func (km *km_KH) WeekdayWide(weekday time.Weekday) string {
175 return km.daysWide[weekday]
178 // WeekdaysWide returns the locales wide weekdays
179 func (km *km_KH) WeekdaysWide() []string {
183 // Decimal returns the decimal point of number
184 func (km *km_KH) Decimal() string {
188 // Group returns the group of number
189 func (km *km_KH) Group() string {
193 // Group returns the minus sign of number
194 func (km *km_KH) Minus() string {
198 // FmtNumber returns 'num' with digits/precision of 'v' for 'km_KH' and handles both Whole and Real numbers based on 'v'
199 func (km *km_KH) FmtNumber(num float64, v uint64) string {
201 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
202 l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3
205 b := make([]byte, 0, l)
207 for i := len(s) - 1; i >= 0; i-- {
210 b = append(b, km.decimal[0])
217 b = append(b, km.group[0])
228 b = append(b, km.minus[0])
232 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
233 b[i], b[j] = b[j], b[i]
239 // FmtPercent returns 'num' with digits/precision of 'v' for 'km_KH' and handles both Whole and Real numbers based on 'v'
240 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
241 func (km *km_KH) FmtPercent(num float64, v uint64) string {
242 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
244 b := make([]byte, 0, l)
246 for i := len(s) - 1; i >= 0; i-- {
249 b = append(b, km.decimal[0])
257 b = append(b, km.minus[0])
261 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
262 b[i], b[j] = b[j], b[i]
265 b = append(b, km.percent...)
270 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'km_KH'
271 func (km *km_KH) FmtCurrency(num float64, v uint64, currency currency.Type) string {
273 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
274 symbol := km.currencies[currency]
275 l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3
278 b := make([]byte, 0, l)
280 for i := len(s) - 1; i >= 0; i-- {
283 b = append(b, km.decimal[0])
290 b = append(b, km.group[0])
301 b = append(b, km.minus[0])
305 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
306 b[i], b[j] = b[j], b[i]
312 b = append(b, km.decimal...)
315 for i := 0; i < 2-int(v); i++ {
320 b = append(b, symbol...)
325 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'km_KH'
326 // in accounting notation.
327 func (km *km_KH) FmtAccounting(num float64, v uint64, currency currency.Type) string {
329 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
330 symbol := km.currencies[currency]
331 l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
334 b := make([]byte, 0, l)
336 for i := len(s) - 1; i >= 0; i-- {
339 b = append(b, km.decimal[0])
346 b = append(b, km.group[0])
358 b = append(b, km.currencyNegativePrefix[0])
363 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
364 b[i], b[j] = b[j], b[i]
370 b = append(b, km.decimal...)
373 for i := 0; i < 2-int(v); i++ {
379 b = append(b, km.currencyNegativeSuffix...)
380 b = append(b, symbol...)
383 b = append(b, symbol...)
389 // FmtDateShort returns the short date representation of 't' for 'km_KH'
390 func (km *km_KH) FmtDateShort(t time.Time) string {
392 b := make([]byte, 0, 32)
394 b = strconv.AppendInt(b, int64(t.Day()), 10)
395 b = append(b, []byte{0x2f}...)
396 b = strconv.AppendInt(b, int64(t.Month()), 10)
397 b = append(b, []byte{0x2f}...)
400 b = append(b, strconv.Itoa(t.Year())[2:]...)
402 b = append(b, strconv.Itoa(t.Year())[1:]...)
408 // FmtDateMedium returns the medium date representation of 't' for 'km_KH'
409 func (km *km_KH) FmtDateMedium(t time.Time) string {
411 b := make([]byte, 0, 32)
413 b = strconv.AppendInt(b, int64(t.Day()), 10)
414 b = append(b, []byte{0x20}...)
415 b = append(b, km.monthsAbbreviated[t.Month()]...)
416 b = append(b, []byte{0x20}...)
419 b = strconv.AppendInt(b, int64(t.Year()), 10)
421 b = strconv.AppendInt(b, int64(-t.Year()), 10)
427 // FmtDateLong returns the long date representation of 't' for 'km_KH'
428 func (km *km_KH) FmtDateLong(t time.Time) string {
430 b := make([]byte, 0, 32)
432 b = strconv.AppendInt(b, int64(t.Day()), 10)
433 b = append(b, []byte{0x20}...)
434 b = append(b, km.monthsWide[t.Month()]...)
435 b = append(b, []byte{0x20}...)
438 b = strconv.AppendInt(b, int64(t.Year()), 10)
440 b = strconv.AppendInt(b, int64(-t.Year()), 10)
446 // FmtDateFull returns the full date representation of 't' for 'km_KH'
447 func (km *km_KH) FmtDateFull(t time.Time) string {
449 b := make([]byte, 0, 32)
451 b = append(b, km.daysWide[t.Weekday()]...)
452 b = append(b, []byte{0x20}...)
453 b = strconv.AppendInt(b, int64(t.Day()), 10)
454 b = append(b, []byte{0x20}...)
455 b = append(b, km.monthsWide[t.Month()]...)
456 b = append(b, []byte{0x20}...)
459 b = strconv.AppendInt(b, int64(t.Year()), 10)
461 b = strconv.AppendInt(b, int64(-t.Year()), 10)
467 // FmtTimeShort returns the short time representation of 't' for 'km_KH'
468 func (km *km_KH) FmtTimeShort(t time.Time) string {
470 b := make([]byte, 0, 32)
478 b = strconv.AppendInt(b, int64(h), 10)
479 b = append(b, km.timeSeparator...)
485 b = strconv.AppendInt(b, int64(t.Minute()), 10)
486 b = append(b, []byte{0x20}...)
489 b = append(b, km.periodsAbbreviated[0]...)
491 b = append(b, km.periodsAbbreviated[1]...)
497 // FmtTimeMedium returns the medium time representation of 't' for 'km_KH'
498 func (km *km_KH) FmtTimeMedium(t time.Time) string {
500 b := make([]byte, 0, 32)
508 b = strconv.AppendInt(b, int64(h), 10)
509 b = append(b, km.timeSeparator...)
515 b = strconv.AppendInt(b, int64(t.Minute()), 10)
516 b = append(b, km.timeSeparator...)
522 b = strconv.AppendInt(b, int64(t.Second()), 10)
523 b = append(b, []byte{0x20}...)
526 b = append(b, km.periodsAbbreviated[0]...)
528 b = append(b, km.periodsAbbreviated[1]...)
534 // FmtTimeLong returns the long time representation of 't' for 'km_KH'
535 func (km *km_KH) FmtTimeLong(t time.Time) string {
537 b := make([]byte, 0, 32)
545 b = strconv.AppendInt(b, int64(h), 10)
546 b = append(b, km.timeSeparator...)
552 b = strconv.AppendInt(b, int64(t.Minute()), 10)
553 b = append(b, km.timeSeparator...)
559 b = strconv.AppendInt(b, int64(t.Second()), 10)
560 b = append(b, []byte{0x20}...)
563 b = append(b, km.periodsAbbreviated[0]...)
565 b = append(b, km.periodsAbbreviated[1]...)
568 b = append(b, []byte{0x20}...)
576 // FmtTimeFull returns the full time representation of 't' for 'km_KH'
577 func (km *km_KH) FmtTimeFull(t time.Time) string {
579 b := make([]byte, 0, 32)
587 b = strconv.AppendInt(b, int64(h), 10)
588 b = append(b, km.timeSeparator...)
594 b = strconv.AppendInt(b, int64(t.Minute()), 10)
595 b = append(b, km.timeSeparator...)
601 b = strconv.AppendInt(b, int64(t.Second()), 10)
602 b = append(b, []byte{0x20}...)
605 b = append(b, km.periodsAbbreviated[0]...)
607 b = append(b, km.periodsAbbreviated[1]...)
610 b = append(b, []byte{0x20}...)
614 if btz, ok := km.timezones[tz]; ok {
615 b = append(b, btz...)