OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / go-playground / locales / en_DK / en_DK.go
1 package en_DK
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 en_DK 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         percentSuffix          string
22         perMille               string
23         timeSeparator          string
24         inifinity              string
25         currencies             []string // idx = enum of currency code
26         currencyNegativePrefix string
27         currencyNegativeSuffix string
28         monthsAbbreviated      []string
29         monthsNarrow           []string
30         monthsWide             []string
31         daysAbbreviated        []string
32         daysNarrow             []string
33         daysShort              []string
34         daysWide               []string
35         periodsAbbreviated     []string
36         periodsNarrow          []string
37         periodsShort           []string
38         periodsWide            []string
39         erasAbbreviated        []string
40         erasNarrow             []string
41         erasWide               []string
42         timezones              map[string]string
43 }
44
45 // New returns a new instance of translator for the 'en_DK' locale
46 func New() locales.Translator {
47         return &en_DK{
48                 locale:                 "en_DK",
49                 pluralsCardinal:        []locales.PluralRule{2, 6},
50                 pluralsOrdinal:         []locales.PluralRule{2, 3, 4, 6},
51                 pluralsRange:           []locales.PluralRule{6},
52                 decimal:                ".",
53                 group:                  ",",
54                 minus:                  "-",
55                 percent:                "%",
56                 perMille:               "‰",
57                 timeSeparator:          ".",
58                 inifinity:              "∞",
59                 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"},
60                 percentSuffix:          " ",
61                 currencyNegativePrefix: "(",
62                 currencyNegativeSuffix: ")",
63                 monthsAbbreviated:      []string{"", "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"},
64                 monthsNarrow:           []string{"", "J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"},
65                 monthsWide:             []string{"", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"},
66                 daysAbbreviated:        []string{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"},
67                 daysNarrow:             []string{"S", "M", "T", "W", "T", "F", "S"},
68                 daysShort:              []string{"Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"},
69                 daysWide:               []string{"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"},
70                 periodsAbbreviated:     []string{"am", "pm"},
71                 periodsNarrow:          []string{"a", "p"},
72                 periodsWide:            []string{"am", "pm"},
73                 erasAbbreviated:        []string{"BC", "AD"},
74                 erasNarrow:             []string{"B", "A"},
75                 erasWide:               []string{"Before Christ", "Anno Domini"},
76                 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"},
77         }
78 }
79
80 // Locale returns the current translators string locale
81 func (en *en_DK) Locale() string {
82         return en.locale
83 }
84
85 // PluralsCardinal returns the list of cardinal plural rules associated with 'en_DK'
86 func (en *en_DK) PluralsCardinal() []locales.PluralRule {
87         return en.pluralsCardinal
88 }
89
90 // PluralsOrdinal returns the list of ordinal plural rules associated with 'en_DK'
91 func (en *en_DK) PluralsOrdinal() []locales.PluralRule {
92         return en.pluralsOrdinal
93 }
94
95 // PluralsRange returns the list of range plural rules associated with 'en_DK'
96 func (en *en_DK) PluralsRange() []locales.PluralRule {
97         return en.pluralsRange
98 }
99
100 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'en_DK'
101 func (en *en_DK) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
102
103         n := math.Abs(num)
104         i := int64(n)
105
106         if i == 1 && v == 0 {
107                 return locales.PluralRuleOne
108         }
109
110         return locales.PluralRuleOther
111 }
112
113 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'en_DK'
114 func (en *en_DK) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
115
116         n := math.Abs(num)
117         nMod10 := math.Mod(n, 10)
118         nMod100 := math.Mod(n, 100)
119
120         if nMod10 == 1 && nMod100 != 11 {
121                 return locales.PluralRuleOne
122         } else if nMod10 == 2 && nMod100 != 12 {
123                 return locales.PluralRuleTwo
124         } else if nMod10 == 3 && nMod100 != 13 {
125                 return locales.PluralRuleFew
126         }
127
128         return locales.PluralRuleOther
129 }
130
131 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'en_DK'
132 func (en *en_DK) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
133         return locales.PluralRuleOther
134 }
135
136 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
137 func (en *en_DK) MonthAbbreviated(month time.Month) string {
138         return en.monthsAbbreviated[month]
139 }
140
141 // MonthsAbbreviated returns the locales abbreviated months
142 func (en *en_DK) MonthsAbbreviated() []string {
143         return en.monthsAbbreviated[1:]
144 }
145
146 // MonthNarrow returns the locales narrow month given the 'month' provided
147 func (en *en_DK) MonthNarrow(month time.Month) string {
148         return en.monthsNarrow[month]
149 }
150
151 // MonthsNarrow returns the locales narrow months
152 func (en *en_DK) MonthsNarrow() []string {
153         return en.monthsNarrow[1:]
154 }
155
156 // MonthWide returns the locales wide month given the 'month' provided
157 func (en *en_DK) MonthWide(month time.Month) string {
158         return en.monthsWide[month]
159 }
160
161 // MonthsWide returns the locales wide months
162 func (en *en_DK) MonthsWide() []string {
163         return en.monthsWide[1:]
164 }
165
166 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
167 func (en *en_DK) WeekdayAbbreviated(weekday time.Weekday) string {
168         return en.daysAbbreviated[weekday]
169 }
170
171 // WeekdaysAbbreviated returns the locales abbreviated weekdays
172 func (en *en_DK) WeekdaysAbbreviated() []string {
173         return en.daysAbbreviated
174 }
175
176 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
177 func (en *en_DK) WeekdayNarrow(weekday time.Weekday) string {
178         return en.daysNarrow[weekday]
179 }
180
181 // WeekdaysNarrow returns the locales narrow weekdays
182 func (en *en_DK) WeekdaysNarrow() []string {
183         return en.daysNarrow
184 }
185
186 // WeekdayShort returns the locales short weekday given the 'weekday' provided
187 func (en *en_DK) WeekdayShort(weekday time.Weekday) string {
188         return en.daysShort[weekday]
189 }
190
191 // WeekdaysShort returns the locales short weekdays
192 func (en *en_DK) WeekdaysShort() []string {
193         return en.daysShort
194 }
195
196 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
197 func (en *en_DK) WeekdayWide(weekday time.Weekday) string {
198         return en.daysWide[weekday]
199 }
200
201 // WeekdaysWide returns the locales wide weekdays
202 func (en *en_DK) WeekdaysWide() []string {
203         return en.daysWide
204 }
205
206 // Decimal returns the decimal point of number
207 func (en *en_DK) Decimal() string {
208         return en.decimal
209 }
210
211 // Group returns the group of number
212 func (en *en_DK) Group() string {
213         return en.group
214 }
215
216 // Group returns the minus sign of number
217 func (en *en_DK) Minus() string {
218         return en.minus
219 }
220
221 // FmtNumber returns 'num' with digits/precision of 'v' for 'en_DK' and handles both Whole and Real numbers based on 'v'
222 func (en *en_DK) FmtNumber(num float64, v uint64) string {
223
224         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
225         l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3
226         count := 0
227         inWhole := v == 0
228         b := make([]byte, 0, l)
229
230         for i := len(s) - 1; i >= 0; i-- {
231
232                 if s[i] == '.' {
233                         b = append(b, en.decimal[0])
234                         inWhole = true
235                         continue
236                 }
237
238                 if inWhole {
239                         if count == 3 {
240                                 b = append(b, en.group[0])
241                                 count = 1
242                         } else {
243                                 count++
244                         }
245                 }
246
247                 b = append(b, s[i])
248         }
249
250         if num < 0 {
251                 b = append(b, en.minus[0])
252         }
253
254         // reverse
255         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
256                 b[i], b[j] = b[j], b[i]
257         }
258
259         return string(b)
260 }
261
262 // FmtPercent returns 'num' with digits/precision of 'v' for 'en_DK' and handles both Whole and Real numbers based on 'v'
263 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
264 func (en *en_DK) FmtPercent(num float64, v uint64) string {
265         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
266         l := len(s) + 5
267         b := make([]byte, 0, l)
268
269         for i := len(s) - 1; i >= 0; i-- {
270
271                 if s[i] == '.' {
272                         b = append(b, en.decimal[0])
273                         continue
274                 }
275
276                 b = append(b, s[i])
277         }
278
279         if num < 0 {
280                 b = append(b, en.minus[0])
281         }
282
283         // reverse
284         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
285                 b[i], b[j] = b[j], b[i]
286         }
287
288         b = append(b, en.percentSuffix...)
289
290         b = append(b, en.percent...)
291
292         return string(b)
293 }
294
295 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'en_DK'
296 func (en *en_DK) FmtCurrency(num float64, v uint64, currency currency.Type) string {
297
298         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
299         symbol := en.currencies[currency]
300         l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3
301         count := 0
302         inWhole := v == 0
303         b := make([]byte, 0, l)
304
305         for i := len(s) - 1; i >= 0; i-- {
306
307                 if s[i] == '.' {
308                         b = append(b, en.decimal[0])
309                         inWhole = true
310                         continue
311                 }
312
313                 if inWhole {
314                         if count == 3 {
315                                 b = append(b, en.group[0])
316                                 count = 1
317                         } else {
318                                 count++
319                         }
320                 }
321
322                 b = append(b, s[i])
323         }
324
325         for j := len(symbol) - 1; j >= 0; j-- {
326                 b = append(b, symbol[j])
327         }
328
329         if num < 0 {
330                 b = append(b, en.minus[0])
331         }
332
333         // reverse
334         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
335                 b[i], b[j] = b[j], b[i]
336         }
337
338         if int(v) < 2 {
339
340                 if v == 0 {
341                         b = append(b, en.decimal...)
342                 }
343
344                 for i := 0; i < 2-int(v); i++ {
345                         b = append(b, '0')
346                 }
347         }
348
349         return string(b)
350 }
351
352 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'en_DK'
353 // in accounting notation.
354 func (en *en_DK) FmtAccounting(num float64, v uint64, currency currency.Type) string {
355
356         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
357         symbol := en.currencies[currency]
358         l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
359         count := 0
360         inWhole := v == 0
361         b := make([]byte, 0, l)
362
363         for i := len(s) - 1; i >= 0; i-- {
364
365                 if s[i] == '.' {
366                         b = append(b, en.decimal[0])
367                         inWhole = true
368                         continue
369                 }
370
371                 if inWhole {
372                         if count == 3 {
373                                 b = append(b, en.group[0])
374                                 count = 1
375                         } else {
376                                 count++
377                         }
378                 }
379
380                 b = append(b, s[i])
381         }
382
383         if num < 0 {
384
385                 for j := len(symbol) - 1; j >= 0; j-- {
386                         b = append(b, symbol[j])
387                 }
388
389                 b = append(b, en.currencyNegativePrefix[0])
390
391         } else {
392
393                 for j := len(symbol) - 1; j >= 0; j-- {
394                         b = append(b, symbol[j])
395                 }
396
397         }
398
399         // reverse
400         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
401                 b[i], b[j] = b[j], b[i]
402         }
403
404         if int(v) < 2 {
405
406                 if v == 0 {
407                         b = append(b, en.decimal...)
408                 }
409
410                 for i := 0; i < 2-int(v); i++ {
411                         b = append(b, '0')
412                 }
413         }
414
415         if num < 0 {
416                 b = append(b, en.currencyNegativeSuffix...)
417         }
418
419         return string(b)
420 }
421
422 // FmtDateShort returns the short date representation of 't' for 'en_DK'
423 func (en *en_DK) FmtDateShort(t time.Time) string {
424
425         b := make([]byte, 0, 32)
426
427         b = strconv.AppendInt(b, int64(t.Month()), 10)
428         b = append(b, []byte{0x2f}...)
429         b = strconv.AppendInt(b, int64(t.Day()), 10)
430         b = append(b, []byte{0x2f}...)
431
432         if t.Year() > 9 {
433                 b = append(b, strconv.Itoa(t.Year())[2:]...)
434         } else {
435                 b = append(b, strconv.Itoa(t.Year())[1:]...)
436         }
437
438         return string(b)
439 }
440
441 // FmtDateMedium returns the medium date representation of 't' for 'en_DK'
442 func (en *en_DK) FmtDateMedium(t time.Time) string {
443
444         b := make([]byte, 0, 32)
445
446         b = append(b, en.monthsAbbreviated[t.Month()]...)
447         b = append(b, []byte{0x20}...)
448         b = strconv.AppendInt(b, int64(t.Day()), 10)
449         b = append(b, []byte{0x2c, 0x20}...)
450
451         if t.Year() > 0 {
452                 b = strconv.AppendInt(b, int64(t.Year()), 10)
453         } else {
454                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
455         }
456
457         return string(b)
458 }
459
460 // FmtDateLong returns the long date representation of 't' for 'en_DK'
461 func (en *en_DK) FmtDateLong(t time.Time) string {
462
463         b := make([]byte, 0, 32)
464
465         b = append(b, en.monthsWide[t.Month()]...)
466         b = append(b, []byte{0x20}...)
467         b = strconv.AppendInt(b, int64(t.Day()), 10)
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 // FmtDateFull returns the full date representation of 't' for 'en_DK'
480 func (en *en_DK) FmtDateFull(t time.Time) string {
481
482         b := make([]byte, 0, 32)
483
484         b = append(b, en.daysWide[t.Weekday()]...)
485         b = append(b, []byte{0x2c, 0x20}...)
486         b = append(b, en.monthsWide[t.Month()]...)
487         b = append(b, []byte{0x20}...)
488         b = strconv.AppendInt(b, int64(t.Day()), 10)
489         b = append(b, []byte{0x2c, 0x20}...)
490
491         if t.Year() > 0 {
492                 b = strconv.AppendInt(b, int64(t.Year()), 10)
493         } else {
494                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
495         }
496
497         return string(b)
498 }
499
500 // FmtTimeShort returns the short time representation of 't' for 'en_DK'
501 func (en *en_DK) FmtTimeShort(t time.Time) string {
502
503         b := make([]byte, 0, 32)
504
505         if t.Hour() < 10 {
506                 b = append(b, '0')
507         }
508
509         b = strconv.AppendInt(b, int64(t.Hour()), 10)
510         b = append(b, []byte{0x2e}...)
511
512         if t.Minute() < 10 {
513                 b = append(b, '0')
514         }
515
516         b = strconv.AppendInt(b, int64(t.Minute()), 10)
517
518         return string(b)
519 }
520
521 // FmtTimeMedium returns the medium time representation of 't' for 'en_DK'
522 func (en *en_DK) FmtTimeMedium(t time.Time) string {
523
524         b := make([]byte, 0, 32)
525
526         if t.Hour() < 10 {
527                 b = append(b, '0')
528         }
529
530         b = strconv.AppendInt(b, int64(t.Hour()), 10)
531         b = append(b, []byte{0x2e}...)
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{0x2e}...)
539
540         if t.Second() < 10 {
541                 b = append(b, '0')
542         }
543
544         b = strconv.AppendInt(b, int64(t.Second()), 10)
545
546         return string(b)
547 }
548
549 // FmtTimeLong returns the long time representation of 't' for 'en_DK'
550 func (en *en_DK) FmtTimeLong(t time.Time) string {
551
552         b := make([]byte, 0, 32)
553
554         if t.Hour() < 10 {
555                 b = append(b, '0')
556         }
557
558         b = strconv.AppendInt(b, int64(t.Hour()), 10)
559         b = append(b, []byte{0x2e}...)
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, []byte{0x2e}...)
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         tz, _ := t.Zone()
576         b = append(b, tz...)
577
578         return string(b)
579 }
580
581 // FmtTimeFull returns the full time representation of 't' for 'en_DK'
582 func (en *en_DK) FmtTimeFull(t time.Time) string {
583
584         b := make([]byte, 0, 32)
585
586         if t.Hour() < 10 {
587                 b = append(b, '0')
588         }
589
590         b = strconv.AppendInt(b, int64(t.Hour()), 10)
591         b = append(b, []byte{0x2e}...)
592
593         if t.Minute() < 10 {
594                 b = append(b, '0')
595         }
596
597         b = strconv.AppendInt(b, int64(t.Minute()), 10)
598         b = append(b, []byte{0x2e}...)
599
600         if t.Second() < 10 {
601                 b = append(b, '0')
602         }
603
604         b = strconv.AppendInt(b, int64(t.Second()), 10)
605         b = append(b, []byte{0x20}...)
606
607         tz, _ := t.Zone()
608
609         if btz, ok := en.timezones[tz]; ok {
610                 b = append(b, btz...)
611         } else {
612                 b = append(b, tz...)
613         }
614
615         return string(b)
616 }