Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/locales.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'en_DK/en_DK.go')
-rw-r--r--en_DK/en_DK.go75
1 files changed, 40 insertions, 35 deletions
diff --git a/en_DK/en_DK.go b/en_DK/en_DK.go
index 36029bdf..89b5fdb6 100644
--- a/en_DK/en_DK.go
+++ b/en_DK/en_DK.go
@@ -23,7 +23,7 @@ type en_DK struct {
timeSeparator string
inifinity string
currencies []string // idx = enum of currency code
- currencyNegativePrefix string
+ currencyPositiveSuffix string
currencyNegativeSuffix string
monthsAbbreviated []string
monthsNarrow []string
@@ -49,17 +49,17 @@ func New() locales.Translator {
pluralsCardinal: []locales.PluralRule{2, 6},
pluralsOrdinal: []locales.PluralRule{2, 3, 4, 6},
pluralsRange: []locales.PluralRule{6},
- decimal: ".",
- group: ",",
+ decimal: ",",
+ group: ".",
minus: "-",
percent: "%",
perMille: "‰",
timeSeparator: ".",
inifinity: "∞",
- 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", "kr.", "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"},
+ 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", "CNH", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "kr.", "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", "STN", "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"},
percentSuffix: " ",
- currencyNegativePrefix: "(",
- currencyNegativeSuffix: ")",
+ currencyPositiveSuffix: " ",
+ currencyNegativeSuffix: " ",
monthsAbbreviated: []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"},
monthsNarrow: []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"},
monthsWide: []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"},
@@ -73,7 +73,7 @@ func New() locales.Translator {
erasAbbreviated: []string{"BC", "AD"},
erasNarrow: []string{"B", "A"},
erasWide: []string{"Before Christ", "Anno Domini"},
- timezones: map[string]string{"AST": "Atlantic Standard Time", "ADT": "Atlantic Daylight Time", "ART": "Argentina Standard Time", "HNEG": "East Greenland Standard Time", "EST": "Eastern Standard Time", "SGT": "Singapore Standard Time", "GMT": "Greenwich Mean Time", "CHADT": "Chatham Daylight Time", "HNCU": "Cuba Standard Time", "ACWDT": "Australian Central Western Daylight Time", "NZDT": "New Zealand Daylight Time", "TMST": "Turkmenistan Summer Time", "AEDT": "Australian Eastern Daylight Time", "SAST": "South Africa Standard Time", "COST": "Colombia Summer Time", "GFT": "French Guiana Time", "AKDT": "Alaska Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "AWDT": "Australian Western Daylight Time", "IST": "India Standard Time", "ACST": "Australian Central Standard Time", "CAT": "Central Africa Time", "OEZ": "Eastern European Standard Time", "COT": "Colombia Standard Time", "EDT": "Eastern Daylight Time", "HECU": "Cuba Daylight Time", "TMT": "Turkmenistan Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "∅∅∅": "Azores Summer Time", "HEOG": "West Greenland Summer Time", "HEEG": "East Greenland Summer Time", "GYT": "Guyana Time", "HNPMX": "Mexican Pacific Standard Time", "PST": "Pacific Standard Time", "MYT": "Malaysia Time", "NZST": "New Zealand Standard Time", "WAT": "West Africa Standard Time", "CHAST": "Chatham Standard Time", "HNPM": "St. Pierre & Miquelon Standard Time", "MDT": "Macau Summer Time", "OESZ": "Eastern European Summer Time", "BOT": "Bolivia Time", "HAT": "Newfoundland Daylight Time", "BT": "Bhutan Time", "AWST": "Australian Western Standard Time", "HNT": "Newfoundland Standard Time", "ACDT": "Australian Central Daylight Time", "CST": "Central Standard Time", "CDT": "Central Daylight Time", "ARST": "Argentina Summer Time", "WESZ": "Western European Summer Time", "MST": "Macau Standard Time", "UYT": "Uruguay Standard Time", "LHST": "Lord Howe Standard Time", "LHDT": "Lord Howe Daylight Time", "WART": "Western Argentina Standard Time", "WARST": "Western Argentina Summer Time", "HKT": "Hong Kong Standard Time", "WEZ": "Western European Standard Time", "UYST": "Uruguay Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "HENOMX": "Northwest Mexico Daylight Time", "JDT": "Japan Daylight Time", "EAT": "East Africa Time", "CLT": "Chile Standard Time", "PDT": "Pacific Daylight Time", "CLST": "Chile Summer Time", "WIB": "Western Indonesia Time", "SRT": "Suriname Time", "WIT": "Eastern Indonesia Time", "MESZ": "Central European Summer Time", "HKST": "Hong Kong Summer Time", "AKST": "Alaska Standard Time", "ACWST": "Australian Central Western Standard Time", "HAST": "Hawaii-Aleutian Standard Time", "HNOG": "West Greenland Standard Time", "ECT": "Ecuador Time", "WITA": "Central Indonesia Time", "AEST": "Australian Eastern Standard Time", "WAST": "West Africa Summer Time", "ChST": "Chamorro Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "MEZ": "Central European Standard Time", "VET": "Venezuela Time", "JST": "Japan Standard Time"},
+ timezones: map[string]string{"AEDT": "Australian Eastern Daylight Time", "CLT": "Chile Standard Time", "EDT": "Eastern Daylight Time", "VET": "Venezuela Time", "HNPM": "St. Pierre & Miquelon Standard Time", "WITA": "Central Indonesia Time", "ARST": "Argentina Summer Time", "GFT": "French Guiana Time", "ACWST": "Australian Central Western Standard Time", "IST": "India Standard Time", "HNT": "Newfoundland Standard Time", "HAT": "Newfoundland Daylight Time", "ART": "Argentina Standard Time", "HECU": "Cuba Daylight Time", "PST": "Pacific Standard Time", "ACDT": "Australian Central Daylight Time", "MESZ": "Central European Summer Time", "WART": "Western Argentina Standard Time", "HEPM": "St. Pierre & Miquelon Daylight Time", "CHAST": "Chatham Standard Time", "ACWDT": "Australian Central Western Daylight Time", "CAT": "Central Africa Time", "EAT": "East Africa Time", "UYST": "Uruguay Summer Time", "AST": "Atlantic Standard Time", "MYT": "Malaysia Time", "HKST": "Hong Kong Summer Time", "LHDT": "Lord Howe Daylight Time", "CLST": "Chile Summer Time", "AWDT": "Australian Western Daylight Time", "WAST": "West Africa Summer Time", "BOT": "Bolivia Time", "WARST": "Western Argentina Summer Time", "HAST": "Hawaii-Aleutian Standard Time", "HNOG": "West Greenland Standard Time", "COT": "Colombia Standard Time", "HNCU": "Cuba Standard Time", "CST": "Central Standard Time", "HNPMX": "Mexican Pacific Standard Time", "ADT": "Atlantic Daylight Time", "WAT": "West Africa Standard Time", "WIB": "Western Indonesia Time", "SGT": "Singapore Standard Time", "MEZ": "Central European Standard Time", "GYT": "Guyana Time", "CDT": "Central Daylight Time", "HEPMX": "Mexican Pacific Daylight Time", "SAST": "South Africa Standard Time", "JDT": "Japan Daylight Time", "NZDT": "New Zealand Daylight Time", "HEOG": "West Greenland Summer Time", "HEEG": "East Greenland Summer Time", "SRT": "Suriname Time", "OESZ": "Eastern European Summer Time", "COST": "Colombia Summer Time", "CHADT": "Chatham Daylight Time", "BT": "Bhutan Time", "AKST": "Alaska Standard Time", "TMT": "Turkmenistan Standard Time", "WESZ": "Western European Summer Time", "JST": "Japan Standard Time", "NZST": "New Zealand Standard Time", "ECT": "Ecuador Time", "WIT": "Eastern Indonesia Time", "ChST": "Chamorro Standard Time", "AEST": "Australian Eastern Standard Time", "AKDT": "Alaska Daylight Time", "EST": "Eastern Standard Time", "TMST": "Turkmenistan Summer Time", "HADT": "Hawaii-Aleutian Daylight Time", "PDT": "Pacific Daylight Time", "MST": "Mountain Standard Time", "ACST": "Australian Central Standard Time", "HNEG": "East Greenland Standard Time", "HKT": "Hong Kong Standard Time", "OEZ": "Eastern European Standard Time", "WEZ": "Western European Standard Time", "LHST": "Lord Howe Standard Time", "HNNOMX": "Northwest Mexico Standard Time", "GMT": "Greenwich Mean Time", "UYT": "Uruguay Standard Time", "∅∅∅": "Brasilia Summer Time", "AWST": "Australian Western Standard Time", "MDT": "Mountain Daylight Time", "HENOMX": "Northwest Mexico Daylight Time"},
}
}
@@ -114,8 +114,8 @@ func (en *en_DK) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
func (en *en_DK) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
n := math.Abs(num)
- nMod10 := math.Mod(n, 10)
nMod100 := math.Mod(n, 100)
+ nMod10 := math.Mod(n, 10)
if nMod10 == 1 && nMod100 != 11 {
return locales.PluralRuleOne
@@ -297,7 +297,7 @@ func (en *en_DK) FmtCurrency(num float64, v uint64, currency currency.Type) stri
s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
symbol := en.currencies[currency]
- l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3
+ l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
count := 0
inWhole := v == 0
b := make([]byte, 0, l)
@@ -322,10 +322,6 @@ func (en *en_DK) FmtCurrency(num float64, v uint64, currency currency.Type) stri
b = append(b, s[i])
}
- for j := len(symbol) - 1; j >= 0; j-- {
- b = append(b, symbol[j])
- }
-
if num < 0 {
b = append(b, en.minus[0])
}
@@ -346,6 +342,10 @@ func (en *en_DK) FmtCurrency(num float64, v uint64, currency currency.Type) stri
}
}
+ b = append(b, en.currencyPositiveSuffix...)
+
+ b = append(b, symbol...)
+
return string(b)
}
@@ -382,17 +382,7 @@ func (en *en_DK) FmtAccounting(num float64, v uint64, currency currency.Type) st
if num < 0 {
- for j := len(symbol) - 1; j >= 0; j-- {
- b = append(b, symbol[j])
- }
-
- b = append(b, en.currencyNegativePrefix[0])
-
- } else {
-
- for j := len(symbol) - 1; j >= 0; j-- {
- b = append(b, symbol[j])
- }
+ b = append(b, en.minus[0])
}
@@ -414,6 +404,11 @@ func (en *en_DK) FmtAccounting(num float64, v uint64, currency currency.Type) st
if num < 0 {
b = append(b, en.currencyNegativeSuffix...)
+ b = append(b, symbol...)
+ } else {
+
+ b = append(b, en.currencyPositiveSuffix...)
+ b = append(b, symbol...)
}
return string(b)
@@ -424,15 +419,25 @@ func (en *en_DK) FmtDateShort(t time.Time) string {
b := make([]byte, 0, 32)
- b = strconv.AppendInt(b, int64(t.Month()), 10)
- b = append(b, []byte{0x2f}...)
+ if t.Day() < 10 {
+ b = append(b, '0')
+ }
+
b = strconv.AppendInt(b, int64(t.Day()), 10)
b = append(b, []byte{0x2f}...)
- if t.Year() > 9 {
- b = append(b, strconv.Itoa(t.Year())[2:]...)
+ if t.Month() < 10 {
+ b = append(b, '0')
+ }
+
+ b = strconv.AppendInt(b, int64(t.Month()), 10)
+
+ b = append(b, []byte{0x2f}...)
+
+ if t.Year() > 0 {
+ b = strconv.AppendInt(b, int64(t.Year()), 10)
} else {
- b = append(b, strconv.Itoa(t.Year())[1:]...)
+ b = strconv.AppendInt(b, int64(-t.Year()), 10)
}
return string(b)
@@ -443,10 +448,10 @@ func (en *en_DK) FmtDateMedium(t time.Time) string {
b := make([]byte, 0, 32)
+ b = strconv.AppendInt(b, int64(t.Day()), 10)
+ b = append(b, []byte{0x20}...)
b = append(b, en.monthsAbbreviated[t.Month()]...)
b = append(b, []byte{0x20}...)
- b = strconv.AppendInt(b, int64(t.Day()), 10)
- b = append(b, []byte{0x2c, 0x20}...)
if t.Year() > 0 {
b = strconv.AppendInt(b, int64(t.Year()), 10)
@@ -462,10 +467,10 @@ func (en *en_DK) FmtDateLong(t time.Time) string {
b := make([]byte, 0, 32)
+ b = strconv.AppendInt(b, int64(t.Day()), 10)
+ b = append(b, []byte{0x20}...)
b = append(b, en.monthsWide[t.Month()]...)
b = append(b, []byte{0x20}...)
- b = strconv.AppendInt(b, int64(t.Day()), 10)
- b = append(b, []byte{0x2c, 0x20}...)
if t.Year() > 0 {
b = strconv.AppendInt(b, int64(t.Year()), 10)
@@ -483,10 +488,10 @@ func (en *en_DK) FmtDateFull(t time.Time) string {
b = append(b, en.daysWide[t.Weekday()]...)
b = append(b, []byte{0x2c, 0x20}...)
+ b = strconv.AppendInt(b, int64(t.Day()), 10)
+ b = append(b, []byte{0x20}...)
b = append(b, en.monthsWide[t.Month()]...)
b = append(b, []byte{0x20}...)
- b = strconv.AppendInt(b, int64(t.Day()), 10)
- b = append(b, []byte{0x2c, 0x20}...)
if t.Year() > 0 {
b = strconv.AppendInt(b, int64(t.Year()), 10)