OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / go-playground / locales / el_CY / el_CY.go
1 package el_CY
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 el_CY 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         currencyPositiveSuffix string
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 'el_CY' locale
46 func New() locales.Translator {
47         return &el_CY{
48                 locale:                 "el_CY",
49                 pluralsCardinal:        []locales.PluralRule{2, 6},
50                 pluralsOrdinal:         []locales.PluralRule{6},
51                 pluralsRange:           []locales.PluralRule{2, 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", "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"},
60                 currencyPositiveSuffix: " ",
61                 currencyNegativePrefix: "(",
62                 currencyNegativeSuffix: " )",
63                 monthsAbbreviated:      []string{"", "Ιαν", "Φεβ", "Μαρ", "Απρ", "Μαΐ", "Ιουν", "Ιουλ", "Αυγ", "Σεπ", "Οκτ", "Νοε", "Δεκ"},
64                 monthsNarrow:           []string{"", "Ι", "Φ", "Μ", "Α", "Μ", "Ι", "Ι", "Α", "Σ", "Ο", "Ν", "Δ"},
65                 monthsWide:             []string{"", "Ιανουαρίου", "Φεβρουαρίου", "Μαρτίου", "Απριλίου", "Μαΐου", "Ιουνίου", "Ιουλίου", "Αυγούστου", "Σεπτεμβρίου", "Οκτωβρίου", "Νοεμβρίου", "Δεκεμβρίου"},
66                 daysAbbreviated:        []string{"Κυρ", "Δευ", "Τρί", "Τετ", "Πέμ", "Παρ", "Σάβ"},
67                 daysNarrow:             []string{"Κ", "Δ", "Τ", "Τ", "Π", "Π", "Σ"},
68                 daysShort:              []string{"Κυ", "Δε", "Τρ", "Τε", "Πέ", "Πα", "Σά"},
69                 daysWide:               []string{"Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"},
70                 periodsAbbreviated:     []string{"π.μ.", "μ.μ."},
71                 periodsNarrow:          []string{"πμ", "μμ"},
72                 periodsWide:            []string{"π.μ.", "μ.μ."},
73                 erasAbbreviated:        []string{"π.Χ.", "μ.Χ."},
74                 erasNarrow:             []string{"", ""},
75                 erasWide:               []string{"προ Χριστού", "μετά Χριστόν"},
76                 timezones:              map[string]string{"CDT": "Κεντρική θερινή ώρα Βόρειας Αμερικής", "JST": "Χειμερινή ώρα Ιαπωνίας", "EST": "Ανατολική χειμερινή ώρα Βόρειας Αμερικής", "WEZ": "Χειμερινή ώρα Δυτικής Ευρώπης", "WESZ": "Θερινή ώρα Δυτικής Ευρώπης", "PDT": "Θερινή ώρα Βόρειας Αμερικής", "HENOMX": "Θερινή ώρα Βορειοδυτικού Μεξικού", "IST": "Ώρα Ινδίας", "WAT": "Χειμερινή ώρα Δυτικής Αφρικής", "UYST": "Θερινή ώρα Ουρουγουάης", "EAT": "Ώρα Ανατολικής Αφρικής", "∅∅∅": "Θερινή ώρα Περού", "BT": "Ώρα Μπουτάν", "BOT": "Ώρα Βολιβίας", "SRT": "Ώρα Σουρινάμ", "WIT": "Ώρα Ανατολικής Ινδονησίας", "HNNOMX": "Χειμερινή ώρα Βορειοδυτικού Μεξικού", "HEPMX": "Θερινή ώρα Ειρηνικού Μεξικού", "HECU": "Θερινή ώρα Κούβας", "HNOG": "Χειμερινή ώρα Δυτικής Γροιλανδίας", "COT": "Χειμερινή ώρα Κολομβίας", "CLST": "Θερινή ώρα Χιλής", "ACST": "Χειμερινή ώρα Κεντρικής Αυστραλίας", "PST": "Χειμερινή ώρα Βόρειας Αμερικής", "WART": "Χειμερινή ώρα Δυτικής Αργεντινής", "OESZ": "Θερινή ώρα Ανατολικής Ευρώπης", "HEEG": "Θερινή ώρα Ανατολικής Γροιλανδίας", "HKST": "Θερινή ώρα Χονγκ Κονγκ", "GYT": "Ώρα Γουιάνας", "MDT": "Θερινή ώρα Μακάο", "AWST": "Χειμερινή ώρα Δυτικής Αυστραλίας", "AEDT": "Θερινή ώρα Ανατολικής Αυστραλίας", "HNT": "Χειμερινή ώρα Νέας Γης", "HKT": "Χειμερινή ώρα Χονγκ Κονγκ", "HNCU": "Χειμερινή ώρα Κούβας", "ACWST": "Χειμερινή ώρα Κεντροδυτικής Αυστραλίας", "COST": "Θερινή ώρα Κολομβίας", "AKST": "Χειμερινή ώρα Αλάσκας", "AKDT": "Θερινή ώρα Αλάσκας", "ECT": "Ώρα Εκουαδόρ", "AWDT": "Θερινή ώρα Δυτικής Αυστραλίας", "OEZ": "Χειμερινή ώρα Ανατολικής Ευρώπης", "SGT": "Ώρα Σιγκαπούρης", "HNPM": "Χειμερινή ώρα Σαιντ Πιερ και Μικελόν", "HNEG": "Χειμερινή ώρα Ανατολικής Γροιλανδίας", "CAT": "Ώρα Κεντρικής Αφρικής", "GMT": "Μέση ώρα Γκρίνουιτς", "CHAST": "Χειμερινή ώρα Τσάθαμ", "WITA": "Ώρα Κεντρικής Ινδονησίας", "GFT": "Ώρα Γαλλικής Γουιάνας", "TMT": "Χειμερινή ώρα Τουρκμενιστάν", "MEZ": "Χειμερινή ώρα Κεντρικής Ευρώπης", "HAST": "Χειμερινή ώρα Χαβάης-Αλεούτιων νήσων", "NZDT": "Θερινή ώρα Νέας Ζηλανδίας", "JDT": "Θερινή ώρα Ιαπωνίας", "EDT": "Ανατολική θερινή ώρα Βόρειας Αμερικής", "TMST": "Θερινή ώρα Τουρκμενιστάν", "NZST": "Χειμερινή ώρα Νέας Ζηλανδίας", "ADT": "Θερινή ώρα Ατλαντικού", "ART": "Χειμερινή ώρα Αργεντινής", "SAST": "Χειμερινή ώρα Νότιας Αφρικής", "ACDT": "Θερινή ώρα Κεντρικής Αυστραλίας", "ChST": "Ώρα Τσαμόρο", "ACWDT": "Θερινή ώρα Κεντροδυτικής Αυστραλίας", "HEOG": "Θερινή ώρα Δυτικής Γροιλανδίας", "AST": "Χειμερινή ώρα Ατλαντικού", "HAT": "Θερινή ώρα Νέας Γης", "WARST": "Θερινή ώρα Δυτικής Αργεντινής", "LHST": "Χειμερινή ώρα Λορντ Χάου", "HNPMX": "Χειμερινή ώρα Ειρηνικού Μεξικού", "HEPM": "Θερινή ώρα Σαιντ Πιερ και Μικελόν", "CST": "Κεντρική χειμερινή ώρα Βόρειας Αμερικής", "MST": "Χειμερινή ώρα Μακάο", "MYT": "Ώρα Μαλαισίας", "UYT": "Χειμερινή ώρα Ουρουγουάης", "LHDT": "Θερινή ώρα Λορντ Χάου", "AEST": "Χειμερινή ώρα Ανατολικής Αυστραλίας", "ARST": "Θερινή ώρα Αργεντινής", "CLT": "Χειμερινή ώρα Χιλής", "WIB": "Ώρα Δυτικής Ινδονησίας", "CHADT": "Θερινή ώρα Τσάθαμ", "MESZ": "Θερινή ώρα Κεντρικής Ευρώπης", "HADT": "Θερινή ώρα Χαβάης-Αλεούτιων νήσων", "VET": "Ώρα Βενεζουέλας", "WAST": "Θερινή ώρα Δυτικής Αφρικής"},
77         }
78 }
79
80 // Locale returns the current translators string locale
81 func (el *el_CY) Locale() string {
82         return el.locale
83 }
84
85 // PluralsCardinal returns the list of cardinal plural rules associated with 'el_CY'
86 func (el *el_CY) PluralsCardinal() []locales.PluralRule {
87         return el.pluralsCardinal
88 }
89
90 // PluralsOrdinal returns the list of ordinal plural rules associated with 'el_CY'
91 func (el *el_CY) PluralsOrdinal() []locales.PluralRule {
92         return el.pluralsOrdinal
93 }
94
95 // PluralsRange returns the list of range plural rules associated with 'el_CY'
96 func (el *el_CY) PluralsRange() []locales.PluralRule {
97         return el.pluralsRange
98 }
99
100 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'el_CY'
101 func (el *el_CY) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
102
103         n := math.Abs(num)
104
105         if n == 1 {
106                 return locales.PluralRuleOne
107         }
108
109         return locales.PluralRuleOther
110 }
111
112 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'el_CY'
113 func (el *el_CY) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
114         return locales.PluralRuleOther
115 }
116
117 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'el_CY'
118 func (el *el_CY) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
119
120         start := el.CardinalPluralRule(num1, v1)
121         end := el.CardinalPluralRule(num2, v2)
122
123         if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
124                 return locales.PluralRuleOther
125         } else if start == locales.PluralRuleOther && end == locales.PluralRuleOne {
126                 return locales.PluralRuleOne
127         }
128
129         return locales.PluralRuleOther
130
131 }
132
133 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
134 func (el *el_CY) MonthAbbreviated(month time.Month) string {
135         return el.monthsAbbreviated[month]
136 }
137
138 // MonthsAbbreviated returns the locales abbreviated months
139 func (el *el_CY) MonthsAbbreviated() []string {
140         return el.monthsAbbreviated[1:]
141 }
142
143 // MonthNarrow returns the locales narrow month given the 'month' provided
144 func (el *el_CY) MonthNarrow(month time.Month) string {
145         return el.monthsNarrow[month]
146 }
147
148 // MonthsNarrow returns the locales narrow months
149 func (el *el_CY) MonthsNarrow() []string {
150         return el.monthsNarrow[1:]
151 }
152
153 // MonthWide returns the locales wide month given the 'month' provided
154 func (el *el_CY) MonthWide(month time.Month) string {
155         return el.monthsWide[month]
156 }
157
158 // MonthsWide returns the locales wide months
159 func (el *el_CY) MonthsWide() []string {
160         return el.monthsWide[1:]
161 }
162
163 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
164 func (el *el_CY) WeekdayAbbreviated(weekday time.Weekday) string {
165         return el.daysAbbreviated[weekday]
166 }
167
168 // WeekdaysAbbreviated returns the locales abbreviated weekdays
169 func (el *el_CY) WeekdaysAbbreviated() []string {
170         return el.daysAbbreviated
171 }
172
173 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
174 func (el *el_CY) WeekdayNarrow(weekday time.Weekday) string {
175         return el.daysNarrow[weekday]
176 }
177
178 // WeekdaysNarrow returns the locales narrow weekdays
179 func (el *el_CY) WeekdaysNarrow() []string {
180         return el.daysNarrow
181 }
182
183 // WeekdayShort returns the locales short weekday given the 'weekday' provided
184 func (el *el_CY) WeekdayShort(weekday time.Weekday) string {
185         return el.daysShort[weekday]
186 }
187
188 // WeekdaysShort returns the locales short weekdays
189 func (el *el_CY) WeekdaysShort() []string {
190         return el.daysShort
191 }
192
193 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
194 func (el *el_CY) WeekdayWide(weekday time.Weekday) string {
195         return el.daysWide[weekday]
196 }
197
198 // WeekdaysWide returns the locales wide weekdays
199 func (el *el_CY) WeekdaysWide() []string {
200         return el.daysWide
201 }
202
203 // Decimal returns the decimal point of number
204 func (el *el_CY) Decimal() string {
205         return el.decimal
206 }
207
208 // Group returns the group of number
209 func (el *el_CY) Group() string {
210         return el.group
211 }
212
213 // Group returns the minus sign of number
214 func (el *el_CY) Minus() string {
215         return el.minus
216 }
217
218 // FmtNumber returns 'num' with digits/precision of 'v' for 'el_CY' and handles both Whole and Real numbers based on 'v'
219 func (el *el_CY) FmtNumber(num float64, v uint64) string {
220
221         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
222         l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3
223         count := 0
224         inWhole := v == 0
225         b := make([]byte, 0, l)
226
227         for i := len(s) - 1; i >= 0; i-- {
228
229                 if s[i] == '.' {
230                         b = append(b, el.decimal[0])
231                         inWhole = true
232                         continue
233                 }
234
235                 if inWhole {
236                         if count == 3 {
237                                 b = append(b, el.group[0])
238                                 count = 1
239                         } else {
240                                 count++
241                         }
242                 }
243
244                 b = append(b, s[i])
245         }
246
247         if num < 0 {
248                 b = append(b, el.minus[0])
249         }
250
251         // reverse
252         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
253                 b[i], b[j] = b[j], b[i]
254         }
255
256         return string(b)
257 }
258
259 // FmtPercent returns 'num' with digits/precision of 'v' for 'el_CY' and handles both Whole and Real numbers based on 'v'
260 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
261 func (el *el_CY) FmtPercent(num float64, v uint64) string {
262         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
263         l := len(s) + 3
264         b := make([]byte, 0, l)
265
266         for i := len(s) - 1; i >= 0; i-- {
267
268                 if s[i] == '.' {
269                         b = append(b, el.decimal[0])
270                         continue
271                 }
272
273                 b = append(b, s[i])
274         }
275
276         if num < 0 {
277                 b = append(b, el.minus[0])
278         }
279
280         // reverse
281         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
282                 b[i], b[j] = b[j], b[i]
283         }
284
285         b = append(b, el.percent...)
286
287         return string(b)
288 }
289
290 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'el_CY'
291 func (el *el_CY) FmtCurrency(num float64, v uint64, currency currency.Type) string {
292
293         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
294         symbol := el.currencies[currency]
295         l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
296         count := 0
297         inWhole := v == 0
298         b := make([]byte, 0, l)
299
300         for i := len(s) - 1; i >= 0; i-- {
301
302                 if s[i] == '.' {
303                         b = append(b, el.decimal[0])
304                         inWhole = true
305                         continue
306                 }
307
308                 if inWhole {
309                         if count == 3 {
310                                 b = append(b, el.group[0])
311                                 count = 1
312                         } else {
313                                 count++
314                         }
315                 }
316
317                 b = append(b, s[i])
318         }
319
320         if num < 0 {
321                 b = append(b, el.minus[0])
322         }
323
324         // reverse
325         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
326                 b[i], b[j] = b[j], b[i]
327         }
328
329         if int(v) < 2 {
330
331                 if v == 0 {
332                         b = append(b, el.decimal...)
333                 }
334
335                 for i := 0; i < 2-int(v); i++ {
336                         b = append(b, '0')
337                 }
338         }
339
340         b = append(b, el.currencyPositiveSuffix...)
341
342         b = append(b, symbol...)
343
344         return string(b)
345 }
346
347 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'el_CY'
348 // in accounting notation.
349 func (el *el_CY) FmtAccounting(num float64, v uint64, currency currency.Type) string {
350
351         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
352         symbol := el.currencies[currency]
353         l := len(s) + len(symbol) + 6 + 1*len(s[:len(s)-int(v)-1])/3
354         count := 0
355         inWhole := v == 0
356         b := make([]byte, 0, l)
357
358         for i := len(s) - 1; i >= 0; i-- {
359
360                 if s[i] == '.' {
361                         b = append(b, el.decimal[0])
362                         inWhole = true
363                         continue
364                 }
365
366                 if inWhole {
367                         if count == 3 {
368                                 b = append(b, el.group[0])
369                                 count = 1
370                         } else {
371                                 count++
372                         }
373                 }
374
375                 b = append(b, s[i])
376         }
377
378         if num < 0 {
379
380                 b = append(b, el.currencyNegativePrefix[0])
381
382         }
383
384         // reverse
385         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
386                 b[i], b[j] = b[j], b[i]
387         }
388
389         if int(v) < 2 {
390
391                 if v == 0 {
392                         b = append(b, el.decimal...)
393                 }
394
395                 for i := 0; i < 2-int(v); i++ {
396                         b = append(b, '0')
397                 }
398         }
399
400         if num < 0 {
401                 b = append(b, el.currencyNegativeSuffix...)
402                 b = append(b, symbol...)
403         } else {
404
405                 b = append(b, el.currencyPositiveSuffix...)
406                 b = append(b, symbol...)
407         }
408
409         return string(b)
410 }
411
412 // FmtDateShort returns the short date representation of 't' for 'el_CY'
413 func (el *el_CY) FmtDateShort(t time.Time) string {
414
415         b := make([]byte, 0, 32)
416
417         b = strconv.AppendInt(b, int64(t.Day()), 10)
418         b = append(b, []byte{0x2f}...)
419         b = strconv.AppendInt(b, int64(t.Month()), 10)
420         b = append(b, []byte{0x2f}...)
421
422         if t.Year() > 9 {
423                 b = append(b, strconv.Itoa(t.Year())[2:]...)
424         } else {
425                 b = append(b, strconv.Itoa(t.Year())[1:]...)
426         }
427
428         return string(b)
429 }
430
431 // FmtDateMedium returns the medium date representation of 't' for 'el_CY'
432 func (el *el_CY) FmtDateMedium(t time.Time) string {
433
434         b := make([]byte, 0, 32)
435
436         b = strconv.AppendInt(b, int64(t.Day()), 10)
437         b = append(b, []byte{0x20}...)
438         b = append(b, el.monthsAbbreviated[t.Month()]...)
439         b = append(b, []byte{0x20}...)
440
441         if t.Year() > 0 {
442                 b = strconv.AppendInt(b, int64(t.Year()), 10)
443         } else {
444                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
445         }
446
447         return string(b)
448 }
449
450 // FmtDateLong returns the long date representation of 't' for 'el_CY'
451 func (el *el_CY) FmtDateLong(t time.Time) string {
452
453         b := make([]byte, 0, 32)
454
455         b = strconv.AppendInt(b, int64(t.Day()), 10)
456         b = append(b, []byte{0x20}...)
457         b = append(b, el.monthsWide[t.Month()]...)
458         b = append(b, []byte{0x20}...)
459
460         if t.Year() > 0 {
461                 b = strconv.AppendInt(b, int64(t.Year()), 10)
462         } else {
463                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
464         }
465
466         return string(b)
467 }
468
469 // FmtDateFull returns the full date representation of 't' for 'el_CY'
470 func (el *el_CY) FmtDateFull(t time.Time) string {
471
472         b := make([]byte, 0, 32)
473
474         b = append(b, el.daysWide[t.Weekday()]...)
475         b = append(b, []byte{0x2c, 0x20}...)
476         b = strconv.AppendInt(b, int64(t.Day()), 10)
477         b = append(b, []byte{0x20}...)
478         b = append(b, el.monthsWide[t.Month()]...)
479         b = append(b, []byte{0x20}...)
480
481         if t.Year() > 0 {
482                 b = strconv.AppendInt(b, int64(t.Year()), 10)
483         } else {
484                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
485         }
486
487         return string(b)
488 }
489
490 // FmtTimeShort returns the short time representation of 't' for 'el_CY'
491 func (el *el_CY) FmtTimeShort(t time.Time) string {
492
493         b := make([]byte, 0, 32)
494
495         h := t.Hour()
496
497         if h > 12 {
498                 h -= 12
499         }
500
501         b = strconv.AppendInt(b, int64(h), 10)
502         b = append(b, el.timeSeparator...)
503
504         if t.Minute() < 10 {
505                 b = append(b, '0')
506         }
507
508         b = strconv.AppendInt(b, int64(t.Minute()), 10)
509         b = append(b, []byte{0x20}...)
510
511         if t.Hour() < 12 {
512                 b = append(b, el.periodsAbbreviated[0]...)
513         } else {
514                 b = append(b, el.periodsAbbreviated[1]...)
515         }
516
517         return string(b)
518 }
519
520 // FmtTimeMedium returns the medium time representation of 't' for 'el_CY'
521 func (el *el_CY) FmtTimeMedium(t time.Time) string {
522
523         b := make([]byte, 0, 32)
524
525         h := t.Hour()
526
527         if h > 12 {
528                 h -= 12
529         }
530
531         b = strconv.AppendInt(b, int64(h), 10)
532         b = append(b, el.timeSeparator...)
533
534         if t.Minute() < 10 {
535                 b = append(b, '0')
536         }
537
538         b = strconv.AppendInt(b, int64(t.Minute()), 10)
539         b = append(b, el.timeSeparator...)
540
541         if t.Second() < 10 {
542                 b = append(b, '0')
543         }
544
545         b = strconv.AppendInt(b, int64(t.Second()), 10)
546         b = append(b, []byte{0x20}...)
547
548         if t.Hour() < 12 {
549                 b = append(b, el.periodsAbbreviated[0]...)
550         } else {
551                 b = append(b, el.periodsAbbreviated[1]...)
552         }
553
554         return string(b)
555 }
556
557 // FmtTimeLong returns the long time representation of 't' for 'el_CY'
558 func (el *el_CY) FmtTimeLong(t time.Time) string {
559
560         b := make([]byte, 0, 32)
561
562         h := t.Hour()
563
564         if h > 12 {
565                 h -= 12
566         }
567
568         b = strconv.AppendInt(b, int64(h), 10)
569         b = append(b, el.timeSeparator...)
570
571         if t.Minute() < 10 {
572                 b = append(b, '0')
573         }
574
575         b = strconv.AppendInt(b, int64(t.Minute()), 10)
576         b = append(b, el.timeSeparator...)
577
578         if t.Second() < 10 {
579                 b = append(b, '0')
580         }
581
582         b = strconv.AppendInt(b, int64(t.Second()), 10)
583         b = append(b, []byte{0x20}...)
584
585         if t.Hour() < 12 {
586                 b = append(b, el.periodsAbbreviated[0]...)
587         } else {
588                 b = append(b, el.periodsAbbreviated[1]...)
589         }
590
591         b = append(b, []byte{0x20}...)
592
593         tz, _ := t.Zone()
594         b = append(b, tz...)
595
596         return string(b)
597 }
598
599 // FmtTimeFull returns the full time representation of 't' for 'el_CY'
600 func (el *el_CY) FmtTimeFull(t time.Time) string {
601
602         b := make([]byte, 0, 32)
603
604         h := t.Hour()
605
606         if h > 12 {
607                 h -= 12
608         }
609
610         b = strconv.AppendInt(b, int64(h), 10)
611         b = append(b, el.timeSeparator...)
612
613         if t.Minute() < 10 {
614                 b = append(b, '0')
615         }
616
617         b = strconv.AppendInt(b, int64(t.Minute()), 10)
618         b = append(b, el.timeSeparator...)
619
620         if t.Second() < 10 {
621                 b = append(b, '0')
622         }
623
624         b = strconv.AppendInt(b, int64(t.Second()), 10)
625         b = append(b, []byte{0x20}...)
626
627         if t.Hour() < 12 {
628                 b = append(b, el.periodsAbbreviated[0]...)
629         } else {
630                 b = append(b, el.periodsAbbreviated[1]...)
631         }
632
633         b = append(b, []byte{0x20}...)
634
635         tz, _ := t.Zone()
636
637         if btz, ok := el.timezones[tz]; ok {
638                 b = append(b, btz...)
639         } else {
640                 b = append(b, tz...)
641         }
642
643         return string(b)
644 }