OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / go-playground / locales / ee_GH / ee_GH.go
1 package ee_GH
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 ee_GH 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         currencyNegativePrefix string
26         currencyNegativeSuffix string
27         monthsAbbreviated      []string
28         monthsNarrow           []string
29         monthsWide             []string
30         daysAbbreviated        []string
31         daysNarrow             []string
32         daysShort              []string
33         daysWide               []string
34         periodsAbbreviated     []string
35         periodsNarrow          []string
36         periodsShort           []string
37         periodsWide            []string
38         erasAbbreviated        []string
39         erasNarrow             []string
40         erasWide               []string
41         timezones              map[string]string
42 }
43
44 // New returns a new instance of translator for the 'ee_GH' locale
45 func New() locales.Translator {
46         return &ee_GH{
47                 locale:                 "ee_GH",
48                 pluralsCardinal:        []locales.PluralRule{2, 6},
49                 pluralsOrdinal:         nil,
50                 pluralsRange:           nil,
51                 timeSeparator:          ":",
52                 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"},
53                 currencyNegativePrefix: "(",
54                 currencyNegativeSuffix: ")",
55                 monthsAbbreviated:      []string{"", "dzv", "dzd", "ted", "afɔ", "dam", "mas", "sia", "dea", "any", "kel", "ade", "dzm"},
56                 monthsNarrow:           []string{"", "d", "d", "t", "a", "d", "m", "s", "d", "a", "k", "a", "d"},
57                 monthsWide:             []string{"", "dzove", "dzodze", "tedoxe", "afɔfĩe", "dama", "masa", "siamlɔm", "deasiamime", "anyɔnyɔ", "kele", "adeɛmekpɔxe", "dzome"},
58                 daysAbbreviated:        []string{"kɔs", "dzo", "bla", "kuɖ", "yaw", "fiɖ", "mem"},
59                 daysNarrow:             []string{"k", "d", "b", "k", "y", "f", "m"},
60                 daysShort:              []string{"kɔs", "dzo", "bla", "kuɖ", "yaw", "fiɖ", "mem"},
61                 daysWide:               []string{"kɔsiɖa", "dzoɖa", "blaɖa", "kuɖa", "yawoɖa", "fiɖa", "memleɖa"},
62                 periodsAbbreviated:     []string{"ŋdi", "ɣetrɔ"},
63                 periodsNarrow:          []string{"ŋ", "ɣ"},
64                 periodsWide:            []string{"ŋdi", "ɣetrɔ"},
65                 erasAbbreviated:        []string{"hY", "Yŋ"},
66                 erasNarrow:             []string{"hY", "Yŋ"},
67                 erasWide:               []string{"Hafi Yesu Va Do ŋgɔ", "Yesu Ŋɔli"},
68                 timezones:              map[string]string{"MST": "Makau gaƒoƒoɖoanyime", "UYT": "Uruguai gaƒoƒoɖoanyime", "NZDT": "NZDT", "MESZ": "Titina Europe ŋkekeme gaƒoƒome", "HNOG": "Ɣetoɖoƒe Grinlanɖ gaƒoƒoɖoanyime", "SGT": "SGT", "PDT": "Pacific ŋkekme gaƒoƒome", "HECU": "Kuba ŋkekeme gaƒoƒome", "COT": "Kolombia gaƒoƒoɖoanyime", "BT": "BT", "CST": "Titina America gaƒoƒoɖoanyime", "CDT": "Titina America ŋkekeme gaƒoƒome", "MEZ": "Titina Europe gaƒoƒoɖoanyime", "WARST": "Ɣetoɖoƒe Argentina dzomeŋɔli gaƒoƒome", "HNT": "Niufaunɖlanɖ gaƒoƒoɖoanyime", "ACDT": "Titina Australia ŋkekeme gaƒoƒome", "HNCU": "Kuba gaƒoƒoɖoanyime", "WART": "Ɣetoɖoƒe Argentina gaƒoƒoɖoanyime", "OESZ": "Ɣedzeƒe Europe ŋkekeme gaƒoƒome", "AEDT": "Ɣedzeƒe Australia ŋkekeme gaƒoƒome", "ART": "Argentina gaƒoƒoɖoanyime", "SAST": "Anyiehe Africa gaƒoƒome", "EAT": "Ɣedzeƒe Africa gaƒoƒome", "AKDT": "Alaska ŋkekeme gaƒoƒome", "NZST": "NZST", "HAT": "Niufaunɖlanɖ ŋkekeme gaƒoƒome", "AEST": "Ɣedzeƒe Australia gaƒoƒoɖoanyime", "AST": "Atlantic gaƒoƒoɖoanyime", "ADT": "Atlantic ŋkekeme gaƒoƒome", "HKST": "Hɔng Kɔng dzomeŋɔli gaƒoƒome", "CLT": "Tsile gaƒoƒoɖoanyime", "COST": "Kolombia dzomeŋɔli gaƒoƒome", "UYST": "Uruguai dzomeŋɔli gaƒoƒome", "OEZ": "Ɣedzeƒe Europe gaƒoƒoɖoanyime", "CAT": "Titina Afrika gaƒoƒome", "CHADT": "CHADT", "AWST": "Ɣetoɖoƒe Australia gaƒoƒoɖoanyime", "ACWDT": "Australia ɣetoɖofe ŋkekeme gaƒoƒome", "HEOG": "Ɣetoɖoƒe Grinlanɖ dzomeŋɔli gaƒoƒome", "HKT": "Hɔng Kɔng gaƒoƒoɖoanyi me", "ECT": "Ikuedɔ dzomeŋɔli gaƒoƒome", "WESZ": "Ɣetoɖoƒe Europe ŋkekeme gaƒoƒome", "GFT": "Frentsi Guiana gaƒoƒome", "HENOMX": "HENOMX", "HNPMX": "HNPMX", "HEPM": "Saint Pierre kple Mikuelon ŋkekeme gaƒoƒome", "IST": "IST", "ACST": "Titina Australia gaƒoƒoɖoanyime", "SRT": "Suriname gaƒoƒome", "GMT": "Greenwich gaƒoƒome", "LHST": "LHST", "TMT": "Tɛkmenistan gaƒoƒoɖoanyime", "JDT": "Japan ŋkekeme gaƒoƒome", "HNPM": "Saint Pierre kple Mikuelon gaƒoƒoɖoanyime", "MYT": "MYT", "BOT": "Bolivia gaƒoƒome", "HNEG": "Ɣedzeƒe Grinlanɖ gaƒoƒoɖoanyime", "MDT": "Makau ŋkekeme gaƒoƒome", "HAST": "Hawaii-Aleutia gaƒoƒoɖoanyime", "TMST": "Tɛkmenistan dzomeŋɔli gaƒoƒome", "LHDT": "LHDT", "WAST": "Ɣetoɖoƒe Africa ŋkekeme gaƒoƒome", "EST": "Ɣedzeƒe America gaƒoƒoɖoanyime", "WEZ": "Ɣetoɖoƒe Europe gaƒoƒoɖoanyime", "HEPMX": "HEPMX", "EDT": "Ɣedzeƒe America ŋkekeme gaƒoƒome", "WIB": "WIB", "GYT": "Gayana gaƒoƒome", "ACWST": "Australia ɣetoɖofe gaƒoƒoɖoanyime", "HADT": "Hawaii-Aleutia ŋkekeme gaƒoƒome", "JST": "Japan gaƒoƒoɖanyime", "CLST": "Tsile dzomeŋɔli gaƒoƒome", "ChST": "ChST", "AWDT": "Ɣetoɖoƒe Australia ŋkekeme gaƒoƒome", "PST": "Pacific gaƒoƒoɖoanyime", "WIT": "WIT", "HNNOMX": "HNNOMX", "ARST": "Argentina dzomeŋɔli gaƒoƒome", "WAT": "Ɣetoɖoƒe Afrika gaƒoƒoɖoanyime", "HEEG": "Ɣedzeƒe Grinlanɖ dzomeŋɔli gaƒoƒome", "∅∅∅": "Amazon dzomeŋɔli gaƒoƒome", "AKST": "Alaska gaƒoƒoɖoanyime", "WITA": "WITA", "CHAST": "CHAST", "VET": "Venezuela gaƒoƒome"},
69         }
70 }
71
72 // Locale returns the current translators string locale
73 func (ee *ee_GH) Locale() string {
74         return ee.locale
75 }
76
77 // PluralsCardinal returns the list of cardinal plural rules associated with 'ee_GH'
78 func (ee *ee_GH) PluralsCardinal() []locales.PluralRule {
79         return ee.pluralsCardinal
80 }
81
82 // PluralsOrdinal returns the list of ordinal plural rules associated with 'ee_GH'
83 func (ee *ee_GH) PluralsOrdinal() []locales.PluralRule {
84         return ee.pluralsOrdinal
85 }
86
87 // PluralsRange returns the list of range plural rules associated with 'ee_GH'
88 func (ee *ee_GH) PluralsRange() []locales.PluralRule {
89         return ee.pluralsRange
90 }
91
92 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'ee_GH'
93 func (ee *ee_GH) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
94
95         n := math.Abs(num)
96
97         if n == 1 {
98                 return locales.PluralRuleOne
99         }
100
101         return locales.PluralRuleOther
102 }
103
104 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'ee_GH'
105 func (ee *ee_GH) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
106         return locales.PluralRuleUnknown
107 }
108
109 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'ee_GH'
110 func (ee *ee_GH) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
111         return locales.PluralRuleUnknown
112 }
113
114 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
115 func (ee *ee_GH) MonthAbbreviated(month time.Month) string {
116         return ee.monthsAbbreviated[month]
117 }
118
119 // MonthsAbbreviated returns the locales abbreviated months
120 func (ee *ee_GH) MonthsAbbreviated() []string {
121         return ee.monthsAbbreviated[1:]
122 }
123
124 // MonthNarrow returns the locales narrow month given the 'month' provided
125 func (ee *ee_GH) MonthNarrow(month time.Month) string {
126         return ee.monthsNarrow[month]
127 }
128
129 // MonthsNarrow returns the locales narrow months
130 func (ee *ee_GH) MonthsNarrow() []string {
131         return ee.monthsNarrow[1:]
132 }
133
134 // MonthWide returns the locales wide month given the 'month' provided
135 func (ee *ee_GH) MonthWide(month time.Month) string {
136         return ee.monthsWide[month]
137 }
138
139 // MonthsWide returns the locales wide months
140 func (ee *ee_GH) MonthsWide() []string {
141         return ee.monthsWide[1:]
142 }
143
144 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
145 func (ee *ee_GH) WeekdayAbbreviated(weekday time.Weekday) string {
146         return ee.daysAbbreviated[weekday]
147 }
148
149 // WeekdaysAbbreviated returns the locales abbreviated weekdays
150 func (ee *ee_GH) WeekdaysAbbreviated() []string {
151         return ee.daysAbbreviated
152 }
153
154 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
155 func (ee *ee_GH) WeekdayNarrow(weekday time.Weekday) string {
156         return ee.daysNarrow[weekday]
157 }
158
159 // WeekdaysNarrow returns the locales narrow weekdays
160 func (ee *ee_GH) WeekdaysNarrow() []string {
161         return ee.daysNarrow
162 }
163
164 // WeekdayShort returns the locales short weekday given the 'weekday' provided
165 func (ee *ee_GH) WeekdayShort(weekday time.Weekday) string {
166         return ee.daysShort[weekday]
167 }
168
169 // WeekdaysShort returns the locales short weekdays
170 func (ee *ee_GH) WeekdaysShort() []string {
171         return ee.daysShort
172 }
173
174 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
175 func (ee *ee_GH) WeekdayWide(weekday time.Weekday) string {
176         return ee.daysWide[weekday]
177 }
178
179 // WeekdaysWide returns the locales wide weekdays
180 func (ee *ee_GH) WeekdaysWide() []string {
181         return ee.daysWide
182 }
183
184 // Decimal returns the decimal point of number
185 func (ee *ee_GH) Decimal() string {
186         return ee.decimal
187 }
188
189 // Group returns the group of number
190 func (ee *ee_GH) Group() string {
191         return ee.group
192 }
193
194 // Group returns the minus sign of number
195 func (ee *ee_GH) Minus() string {
196         return ee.minus
197 }
198
199 // FmtNumber returns 'num' with digits/precision of 'v' for 'ee_GH' and handles both Whole and Real numbers based on 'v'
200 func (ee *ee_GH) FmtNumber(num float64, v uint64) string {
201
202         return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
203 }
204
205 // FmtPercent returns 'num' with digits/precision of 'v' for 'ee_GH' and handles both Whole and Real numbers based on 'v'
206 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
207 func (ee *ee_GH) FmtPercent(num float64, v uint64) string {
208         return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
209 }
210
211 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ee_GH'
212 func (ee *ee_GH) FmtCurrency(num float64, v uint64, currency currency.Type) string {
213
214         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
215         symbol := ee.currencies[currency]
216         l := len(s) + len(symbol) + 0
217         count := 0
218         inWhole := v == 0
219         b := make([]byte, 0, l)
220
221         for i := len(s) - 1; i >= 0; i-- {
222
223                 if s[i] == '.' {
224                         b = append(b, ee.decimal[0])
225                         inWhole = true
226                         continue
227                 }
228
229                 if inWhole {
230                         if count == 3 {
231                                 b = append(b, ee.group[0])
232                                 count = 1
233                         } else {
234                                 count++
235                         }
236                 }
237
238                 b = append(b, s[i])
239         }
240
241         for j := len(symbol) - 1; j >= 0; j-- {
242                 b = append(b, symbol[j])
243         }
244
245         if num < 0 {
246                 b = append(b, ee.minus[0])
247         }
248
249         // reverse
250         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
251                 b[i], b[j] = b[j], b[i]
252         }
253
254         if int(v) < 2 {
255
256                 if v == 0 {
257                         b = append(b, ee.decimal...)
258                 }
259
260                 for i := 0; i < 2-int(v); i++ {
261                         b = append(b, '0')
262                 }
263         }
264
265         return string(b)
266 }
267
268 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ee_GH'
269 // in accounting notation.
270 func (ee *ee_GH) FmtAccounting(num float64, v uint64, currency currency.Type) string {
271
272         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
273         symbol := ee.currencies[currency]
274         l := len(s) + len(symbol) + 2
275         count := 0
276         inWhole := v == 0
277         b := make([]byte, 0, l)
278
279         for i := len(s) - 1; i >= 0; i-- {
280
281                 if s[i] == '.' {
282                         b = append(b, ee.decimal[0])
283                         inWhole = true
284                         continue
285                 }
286
287                 if inWhole {
288                         if count == 3 {
289                                 b = append(b, ee.group[0])
290                                 count = 1
291                         } else {
292                                 count++
293                         }
294                 }
295
296                 b = append(b, s[i])
297         }
298
299         if num < 0 {
300
301                 for j := len(symbol) - 1; j >= 0; j-- {
302                         b = append(b, symbol[j])
303                 }
304
305                 b = append(b, ee.currencyNegativePrefix[0])
306
307         } else {
308
309                 for j := len(symbol) - 1; j >= 0; j-- {
310                         b = append(b, symbol[j])
311                 }
312
313         }
314
315         // reverse
316         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
317                 b[i], b[j] = b[j], b[i]
318         }
319
320         if int(v) < 2 {
321
322                 if v == 0 {
323                         b = append(b, ee.decimal...)
324                 }
325
326                 for i := 0; i < 2-int(v); i++ {
327                         b = append(b, '0')
328                 }
329         }
330
331         if num < 0 {
332                 b = append(b, ee.currencyNegativeSuffix...)
333         }
334
335         return string(b)
336 }
337
338 // FmtDateShort returns the short date representation of 't' for 'ee_GH'
339 func (ee *ee_GH) FmtDateShort(t time.Time) string {
340
341         b := make([]byte, 0, 32)
342
343         b = strconv.AppendInt(b, int64(t.Month()), 10)
344         b = append(b, []byte{0x2f}...)
345         b = strconv.AppendInt(b, int64(t.Day()), 10)
346         b = append(b, []byte{0x2f}...)
347
348         if t.Year() > 9 {
349                 b = append(b, strconv.Itoa(t.Year())[2:]...)
350         } else {
351                 b = append(b, strconv.Itoa(t.Year())[1:]...)
352         }
353
354         return string(b)
355 }
356
357 // FmtDateMedium returns the medium date representation of 't' for 'ee_GH'
358 func (ee *ee_GH) FmtDateMedium(t time.Time) string {
359
360         b := make([]byte, 0, 32)
361
362         b = append(b, ee.monthsAbbreviated[t.Month()]...)
363         b = append(b, []byte{0x20}...)
364         b = strconv.AppendInt(b, int64(t.Day()), 10)
365         b = append(b, []byte{0x20, 0x6c, 0x69, 0x61}...)
366         b = append(b, []byte{0x2c, 0x20}...)
367
368         if t.Year() > 0 {
369                 b = strconv.AppendInt(b, int64(t.Year()), 10)
370         } else {
371                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
372         }
373
374         return string(b)
375 }
376
377 // FmtDateLong returns the long date representation of 't' for 'ee_GH'
378 func (ee *ee_GH) FmtDateLong(t time.Time) string {
379
380         b := make([]byte, 0, 32)
381
382         b = append(b, ee.monthsWide[t.Month()]...)
383         b = append(b, []byte{0x20}...)
384         b = strconv.AppendInt(b, int64(t.Day()), 10)
385         b = append(b, []byte{0x20, 0x6c, 0x69, 0x61}...)
386         b = append(b, []byte{0x20}...)
387
388         if t.Year() > 0 {
389                 b = strconv.AppendInt(b, int64(t.Year()), 10)
390         } else {
391                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
392         }
393
394         return string(b)
395 }
396
397 // FmtDateFull returns the full date representation of 't' for 'ee_GH'
398 func (ee *ee_GH) FmtDateFull(t time.Time) string {
399
400         b := make([]byte, 0, 32)
401
402         b = append(b, ee.daysWide[t.Weekday()]...)
403         b = append(b, []byte{0x2c, 0x20}...)
404         b = append(b, ee.monthsWide[t.Month()]...)
405         b = append(b, []byte{0x20}...)
406         b = strconv.AppendInt(b, int64(t.Day()), 10)
407         b = append(b, []byte{0x20, 0x6c, 0x69, 0x61}...)
408         b = append(b, []byte{0x20}...)
409
410         if t.Year() > 0 {
411                 b = strconv.AppendInt(b, int64(t.Year()), 10)
412         } else {
413                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
414         }
415
416         return string(b)
417 }
418
419 // FmtTimeShort returns the short time representation of 't' for 'ee_GH'
420 func (ee *ee_GH) FmtTimeShort(t time.Time) string {
421
422         b := make([]byte, 0, 32)
423
424         if t.Hour() < 12 {
425                 b = append(b, ee.periodsAbbreviated[0]...)
426         } else {
427                 b = append(b, ee.periodsAbbreviated[1]...)
428         }
429
430         b = append(b, []byte{0x20, 0x67, 0x61}...)
431         b = append(b, []byte{0x20}...)
432
433         h := t.Hour()
434
435         if h > 12 {
436                 h -= 12
437         }
438
439         b = strconv.AppendInt(b, int64(h), 10)
440         b = append(b, ee.timeSeparator...)
441
442         if t.Minute() < 10 {
443                 b = append(b, '0')
444         }
445
446         b = strconv.AppendInt(b, int64(t.Minute()), 10)
447
448         return string(b)
449 }
450
451 // FmtTimeMedium returns the medium time representation of 't' for 'ee_GH'
452 func (ee *ee_GH) FmtTimeMedium(t time.Time) string {
453
454         b := make([]byte, 0, 32)
455
456         if t.Hour() < 12 {
457                 b = append(b, ee.periodsAbbreviated[0]...)
458         } else {
459                 b = append(b, ee.periodsAbbreviated[1]...)
460         }
461
462         b = append(b, []byte{0x20, 0x67, 0x61}...)
463         b = append(b, []byte{0x20}...)
464
465         h := t.Hour()
466
467         if h > 12 {
468                 h -= 12
469         }
470
471         b = strconv.AppendInt(b, int64(h), 10)
472         b = append(b, ee.timeSeparator...)
473
474         if t.Minute() < 10 {
475                 b = append(b, '0')
476         }
477
478         b = strconv.AppendInt(b, int64(t.Minute()), 10)
479         b = append(b, ee.timeSeparator...)
480
481         if t.Second() < 10 {
482                 b = append(b, '0')
483         }
484
485         b = strconv.AppendInt(b, int64(t.Second()), 10)
486
487         return string(b)
488 }
489
490 // FmtTimeLong returns the long time representation of 't' for 'ee_GH'
491 func (ee *ee_GH) FmtTimeLong(t time.Time) string {
492
493         b := make([]byte, 0, 32)
494
495         if t.Hour() < 12 {
496                 b = append(b, ee.periodsAbbreviated[0]...)
497         } else {
498                 b = append(b, ee.periodsAbbreviated[1]...)
499         }
500
501         b = append(b, []byte{0x20, 0x67, 0x61}...)
502         b = append(b, []byte{0x20}...)
503
504         h := t.Hour()
505
506         if h > 12 {
507                 h -= 12
508         }
509
510         b = strconv.AppendInt(b, int64(h), 10)
511         b = append(b, ee.timeSeparator...)
512
513         if t.Minute() < 10 {
514                 b = append(b, '0')
515         }
516
517         b = strconv.AppendInt(b, int64(t.Minute()), 10)
518         b = append(b, ee.timeSeparator...)
519
520         if t.Second() < 10 {
521                 b = append(b, '0')
522         }
523
524         b = strconv.AppendInt(b, int64(t.Second()), 10)
525         b = append(b, []byte{0x20}...)
526
527         tz, _ := t.Zone()
528         b = append(b, tz...)
529
530         return string(b)
531 }
532
533 // FmtTimeFull returns the full time representation of 't' for 'ee_GH'
534 func (ee *ee_GH) FmtTimeFull(t time.Time) string {
535
536         b := make([]byte, 0, 32)
537
538         if t.Hour() < 12 {
539                 b = append(b, ee.periodsAbbreviated[0]...)
540         } else {
541                 b = append(b, ee.periodsAbbreviated[1]...)
542         }
543
544         b = append(b, []byte{0x20, 0x67, 0x61}...)
545         b = append(b, []byte{0x20}...)
546
547         h := t.Hour()
548
549         if h > 12 {
550                 h -= 12
551         }
552
553         b = strconv.AppendInt(b, int64(h), 10)
554         b = append(b, ee.timeSeparator...)
555
556         if t.Minute() < 10 {
557                 b = append(b, '0')
558         }
559
560         b = strconv.AppendInt(b, int64(t.Minute()), 10)
561         b = append(b, ee.timeSeparator...)
562
563         if t.Second() < 10 {
564                 b = append(b, '0')
565         }
566
567         b = strconv.AppendInt(b, int64(t.Second()), 10)
568         b = append(b, []byte{0x20}...)
569
570         tz, _ := t.Zone()
571
572         if btz, ok := ee.timezones[tz]; ok {
573                 b = append(b, btz...)
574         } else {
575                 b = append(b, tz...)
576         }
577
578         return string(b)
579 }