OSDN Git Service

new repo
[bytom/vapor.git] / vendor / github.com / go-playground / locales / ta_LK / ta_LK.go
1 package ta_LK
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 ta_LK 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 'ta_LK' locale
45 func New() locales.Translator {
46         return &ta_LK{
47                 locale:                 "ta_LK",
48                 pluralsCardinal:        []locales.PluralRule{2, 6},
49                 pluralsOrdinal:         []locales.PluralRule{6},
50                 pluralsRange:           []locales.PluralRule{2, 6},
51                 decimal:                ".",
52                 group:                  ",",
53                 minus:                  "-",
54                 percent:                "%",
55                 perMille:               "‰",
56                 timeSeparator:          ":",
57                 inifinity:              "∞",
58                 currencies:             []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "Rs.", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"},
59                 currencyNegativePrefix: "(",
60                 currencyNegativeSuffix: ")",
61                 monthsAbbreviated:      []string{"", "ஜன.", "பிப்.", "மார்.", "ஏப்.", "மே", "ஜூன்", "ஜூலை", "ஆக.", "செப்.", "அக்.", "நவ.", "டிச."},
62                 monthsNarrow:           []string{"", "ஜ", "பி", "மா", "ஏ", "மே", "ஜூ", "ஜூ", "ஆ", "செ", "அ", "ந", "டி"},
63                 monthsWide:             []string{"", "ஜனவரி", "பிப்ரவரி", "மார்ச்", "ஏப்ரல்", "மே", "ஜூன்", "ஜூலை", "ஆகஸ்ட்", "செப்டம்பர்", "அக்டோபர்", "நவம்பர்", "டிசம்பர்"},
64                 daysAbbreviated:        []string{"ஞாயி.", "திங்.", "செவ்.", "புத.", "வியா.", "வெள்.", "சனி"},
65                 daysNarrow:             []string{"ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"},
66                 daysShort:              []string{"ஞா", "தி", "செ", "பு", "வி", "வெ", "ச"},
67                 daysWide:               []string{"ஞாயிறு", "திங்கள்", "செவ்வாய்", "புதன்", "வியாழன்", "வெள்ளி", "சனி"},
68                 periodsAbbreviated:     []string{"முற்பகல்", "பிற்பகல்"},
69                 periodsNarrow:          []string{"மு.ப", "பி.ப"},
70                 periodsWide:            []string{"முற்பகல்", "பிற்பகல்"},
71                 erasAbbreviated:        []string{"கி.மு.", "கி.பி."},
72                 erasNarrow:             []string{"", ""},
73                 erasWide:               []string{"கிறிஸ்துவுக்கு முன்", "அன்னோ டோமினி"},
74                 timezones:              map[string]string{"ACWST": "ஆஸ்திரேலியன் மத்திய மேற்கத்திய நிலையான நேரம்", "HENOMX": "வடமேற்கு மெக்ஸிகோ பகலொளி நேரம்", "WITA": "மத்திய இந்தோனேசிய நேரம்", "OESZ": "கிழக்கத்திய ஐரோப்பிய கோடை நேரம்", "ACDT": "ஆஸ்திரேலியன் மத்திய பகலொளி நேரம்", "CAT": "மத்திய ஆப்பிரிக்க நேரம்", "BT": "பூடான் நேரம்", "AWDT": "ஆஸ்திரேலியன் மேற்கத்திய பகலொளி நேரம்", "AST": "அட்லாண்டிக் நிலையான நேரம்", "AWST": "ஆஸ்திரேலியன் மேற்கத்திய நிலையான நேரம்", "UYST": "உருகுவே கோடை நேரம்", "GMT": "கிரீன்விச் சராசரி நேரம்", "PDT": "பசிபிக் பகலொளி நேரம்", "BOT": "பொலிவியா நேரம்", "MST": "மக்காவ் தர நேரம்", "EDT": "கிழக்கத்திய பகலொளி நேரம்", "AKST": "அலாஸ்கா நிலையான நேரம்", "UYT": "உருகுவே நிலையான நேரம்", "ECT": "ஈக்வடார் நேரம்", "AKDT": "அலாஸ்கா பகலொளி நேரம்", "TMST": "துர்க்மெனிஸ்தான் கோடை நேரம்", "OEZ": "கிழக்கத்திய ஐரோப்பிய நிலையான நேரம்", "JST": "ஜப்பான் நிலையான நேரம்", "HKST": "ஹாங்காங் கோடை நேரம்", "WEZ": "மேற்கத்திய ஐரோப்பிய நிலையான நேரம்", "CST": "மத்திய நிலையான நேரம்", "HAST": "ஹவாய்-அலேஷியன் நிலையான நேரம்", "GYT": "கயானா நேரம்", "HNCU": "கியூபா நிலையான நேரம்", "PST": "பசிபிக் நிலையான நேரம்", "EAT": "கிழக்கு ஆப்பிரிக்க நேரம்", "HNNOMX": "வடமேற்கு மெக்ஸிகோ நிலையான நேரம்", "COST": "கொலம்பியா கோடை நேரம்", "CHAST": "சத்தாம் நிலையான நேரம்", "TMT": "துர்க்மெனிஸ்தான் நிலையான நேரம்", "WART": "மேற்கத்திய அர்ஜென்டினா நிலையான நேரம்", "ART": "அர்ஜென்டினா நிலையான நேரம்", "WAT": "மேற்கு ஆப்பிரிக்க நிலையான நேரம்", "WAST": "மேற்கு ஆப்பிரிக்க கோடை நேரம்", "WESZ": "மேற்கத்திய ஐரோப்பிய கோடை நேரம்", "SGT": "சிங்கப்பூர் நிலையான நேரம்", "HADT": "ஹவாய்-அலேஷியன் பகலொளி நேரம்", "VET": "வெனிசுலா நேரம்", "ChST": "சாமோரோ நிலையான நேரம்", "WIB": "மேற்கத்திய இந்தோனேசிய நேரம்", "AEST": "ஆஸ்திரேலியன் கிழக்கத்திய நிலையான நேரம்", "AEDT": "ஆஸ்திரேலியன் கிழக்கத்திய பகலொளி நேரம்", "HEEG": "கிழக்கு கிரீன்லாந்து கோடை நேரம்", "HECU": "கியூபா பகலொளி நேரம்", "WIT": "கிழக்கத்திய இந்தோனேசிய நேரம்", "NZST": "நியூசிலாந்து நிலையான நேரம்", "JDT": "ஜப்பான் பகலொளி நேரம்", "SRT": "சுரினாம் நேரம்", "NZDT": "நியூசிலாந்து பகலொளி நேரம்", "LHDT": "லார்ட் ஹோவ் பகலொளி நேரம்", "HAT": "நியூஃபவுண்ட்லாந்து பகலொளி நேரம்", "CHADT": "சத்தாம் பகலொளி நேரம்", "HEPM": "செயின்ட் பியரி & மிக்குயிலான் பகலொளி நேரம்", "MDT": "மக்காவ் கோடை நேரம்", "∅∅∅": "அமேசான் கோடை நேரம்", "MYT": "மலேஷிய நேரம்", "MEZ": "மத்திய ஐரோப்பிய நிலையான நேரம்", "CLT": "சிலி நிலையான நேரம்", "CDT": "மத்திய பகலொளி நேரம்", "WARST": "மேற்கத்திய அர்ஜென்டினா கோடை நேரம்", "ARST": "அர்ஜென்டினா கோடை நேரம்", "CLST": "சிலி கோடை நேரம்", "SAST": "தென் ஆப்பிரிக்க நிலையான நேரம்", "EST": "கிழக்கத்திய நிலையான நேரம்", "ACST": "ஆஸ்திரேலியன் மத்திய நிலையான நேரம்", "ACWDT": "ஆஸ்திரேலியன் மத்திய மேற்கத்திய பகலொளி நேரம்", "LHST": "லார்ட் ஹோவ் நிலையான நேரம்", "HKT": "ஹாங்காங் நிலையான நேரம்", "COT": "கொலம்பியா நிலையான நேரம்", "GFT": "ஃபிரஞ்சு கயானா நேரம்", "HNT": "நியூஃபவுண்ட்லாந்து நிலையான நேரம்", "HNOG": "மேற்கு கிரீன்லாந்து நிலையான நேரம்", "HEOG": "மேற்கு கிரீன்லாந்து கோடை நேரம்", "ADT": "அட்லாண்டிக் பகலொளி நேரம்", "IST": "இந்திய நிலையான நேரம்", "HNEG": "கிழக்கு கிரீன்லாந்து நிலையான நேரம்", "HNPMX": "மெக்ஸிகன் பசிபிக் நிலையான நேரம்", "HEPMX": "மெக்ஸிகன் பசிபிக் பகலொளி நேரம்", "HNPM": "செயின்ட் பியரி & மிக்குயிலான் நிலையான நேரம்", "MESZ": "மத்திய ஐரோப்பிய கோடை நேரம்"},
75         }
76 }
77
78 // Locale returns the current translators string locale
79 func (ta *ta_LK) Locale() string {
80         return ta.locale
81 }
82
83 // PluralsCardinal returns the list of cardinal plural rules associated with 'ta_LK'
84 func (ta *ta_LK) PluralsCardinal() []locales.PluralRule {
85         return ta.pluralsCardinal
86 }
87
88 // PluralsOrdinal returns the list of ordinal plural rules associated with 'ta_LK'
89 func (ta *ta_LK) PluralsOrdinal() []locales.PluralRule {
90         return ta.pluralsOrdinal
91 }
92
93 // PluralsRange returns the list of range plural rules associated with 'ta_LK'
94 func (ta *ta_LK) PluralsRange() []locales.PluralRule {
95         return ta.pluralsRange
96 }
97
98 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'ta_LK'
99 func (ta *ta_LK) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
100
101         n := math.Abs(num)
102
103         if n == 1 {
104                 return locales.PluralRuleOne
105         }
106
107         return locales.PluralRuleOther
108 }
109
110 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'ta_LK'
111 func (ta *ta_LK) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
112         return locales.PluralRuleOther
113 }
114
115 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'ta_LK'
116 func (ta *ta_LK) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
117
118         start := ta.CardinalPluralRule(num1, v1)
119         end := ta.CardinalPluralRule(num2, v2)
120
121         if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
122                 return locales.PluralRuleOther
123         } else if start == locales.PluralRuleOther && end == locales.PluralRuleOne {
124                 return locales.PluralRuleOne
125         }
126
127         return locales.PluralRuleOther
128
129 }
130
131 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
132 func (ta *ta_LK) MonthAbbreviated(month time.Month) string {
133         return ta.monthsAbbreviated[month]
134 }
135
136 // MonthsAbbreviated returns the locales abbreviated months
137 func (ta *ta_LK) MonthsAbbreviated() []string {
138         return ta.monthsAbbreviated[1:]
139 }
140
141 // MonthNarrow returns the locales narrow month given the 'month' provided
142 func (ta *ta_LK) MonthNarrow(month time.Month) string {
143         return ta.monthsNarrow[month]
144 }
145
146 // MonthsNarrow returns the locales narrow months
147 func (ta *ta_LK) MonthsNarrow() []string {
148         return ta.monthsNarrow[1:]
149 }
150
151 // MonthWide returns the locales wide month given the 'month' provided
152 func (ta *ta_LK) MonthWide(month time.Month) string {
153         return ta.monthsWide[month]
154 }
155
156 // MonthsWide returns the locales wide months
157 func (ta *ta_LK) MonthsWide() []string {
158         return ta.monthsWide[1:]
159 }
160
161 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
162 func (ta *ta_LK) WeekdayAbbreviated(weekday time.Weekday) string {
163         return ta.daysAbbreviated[weekday]
164 }
165
166 // WeekdaysAbbreviated returns the locales abbreviated weekdays
167 func (ta *ta_LK) WeekdaysAbbreviated() []string {
168         return ta.daysAbbreviated
169 }
170
171 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
172 func (ta *ta_LK) WeekdayNarrow(weekday time.Weekday) string {
173         return ta.daysNarrow[weekday]
174 }
175
176 // WeekdaysNarrow returns the locales narrow weekdays
177 func (ta *ta_LK) WeekdaysNarrow() []string {
178         return ta.daysNarrow
179 }
180
181 // WeekdayShort returns the locales short weekday given the 'weekday' provided
182 func (ta *ta_LK) WeekdayShort(weekday time.Weekday) string {
183         return ta.daysShort[weekday]
184 }
185
186 // WeekdaysShort returns the locales short weekdays
187 func (ta *ta_LK) WeekdaysShort() []string {
188         return ta.daysShort
189 }
190
191 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
192 func (ta *ta_LK) WeekdayWide(weekday time.Weekday) string {
193         return ta.daysWide[weekday]
194 }
195
196 // WeekdaysWide returns the locales wide weekdays
197 func (ta *ta_LK) WeekdaysWide() []string {
198         return ta.daysWide
199 }
200
201 // Decimal returns the decimal point of number
202 func (ta *ta_LK) Decimal() string {
203         return ta.decimal
204 }
205
206 // Group returns the group of number
207 func (ta *ta_LK) Group() string {
208         return ta.group
209 }
210
211 // Group returns the minus sign of number
212 func (ta *ta_LK) Minus() string {
213         return ta.minus
214 }
215
216 // FmtNumber returns 'num' with digits/precision of 'v' for 'ta_LK' and handles both Whole and Real numbers based on 'v'
217 func (ta *ta_LK) FmtNumber(num float64, v uint64) string {
218
219         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
220         l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3
221         count := 0
222         inWhole := v == 0
223         inSecondary := false
224         groupThreshold := 3
225
226         b := make([]byte, 0, l)
227
228         for i := len(s) - 1; i >= 0; i-- {
229
230                 if s[i] == '.' {
231                         b = append(b, ta.decimal[0])
232                         inWhole = true
233                         continue
234                 }
235
236                 if inWhole {
237
238                         if count == groupThreshold {
239                                 b = append(b, ta.group[0])
240                                 count = 1
241
242                                 if !inSecondary {
243                                         inSecondary = true
244                                         groupThreshold = 2
245                                 }
246                         } else {
247                                 count++
248                         }
249                 }
250
251                 b = append(b, s[i])
252         }
253
254         if num < 0 {
255                 b = append(b, ta.minus[0])
256         }
257
258         // reverse
259         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
260                 b[i], b[j] = b[j], b[i]
261         }
262
263         return string(b)
264 }
265
266 // FmtPercent returns 'num' with digits/precision of 'v' for 'ta_LK' and handles both Whole and Real numbers based on 'v'
267 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
268 func (ta *ta_LK) FmtPercent(num float64, v uint64) string {
269         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
270         l := len(s) + 3
271         b := make([]byte, 0, l)
272
273         for i := len(s) - 1; i >= 0; i-- {
274
275                 if s[i] == '.' {
276                         b = append(b, ta.decimal[0])
277                         continue
278                 }
279
280                 b = append(b, s[i])
281         }
282
283         if num < 0 {
284                 b = append(b, ta.minus[0])
285         }
286
287         // reverse
288         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
289                 b[i], b[j] = b[j], b[i]
290         }
291
292         b = append(b, ta.percent...)
293
294         return string(b)
295 }
296
297 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ta_LK'
298 func (ta *ta_LK) FmtCurrency(num float64, v uint64, currency currency.Type) string {
299
300         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
301         symbol := ta.currencies[currency]
302         l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3
303         count := 0
304         inWhole := v == 0
305         b := make([]byte, 0, l)
306
307         for i := len(s) - 1; i >= 0; i-- {
308
309                 if s[i] == '.' {
310                         b = append(b, ta.decimal[0])
311                         inWhole = true
312                         continue
313                 }
314
315                 if inWhole {
316                         if count == 3 {
317                                 b = append(b, ta.group[0])
318                                 count = 1
319                         } else {
320                                 count++
321                         }
322                 }
323
324                 b = append(b, s[i])
325         }
326
327         for j := len(symbol) - 1; j >= 0; j-- {
328                 b = append(b, symbol[j])
329         }
330
331         if num < 0 {
332                 b = append(b, ta.minus[0])
333         }
334
335         // reverse
336         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
337                 b[i], b[j] = b[j], b[i]
338         }
339
340         if int(v) < 2 {
341
342                 if v == 0 {
343                         b = append(b, ta.decimal...)
344                 }
345
346                 for i := 0; i < 2-int(v); i++ {
347                         b = append(b, '0')
348                 }
349         }
350
351         return string(b)
352 }
353
354 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ta_LK'
355 // in accounting notation.
356 func (ta *ta_LK) FmtAccounting(num float64, v uint64, currency currency.Type) string {
357
358         s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
359         symbol := ta.currencies[currency]
360         l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
361         count := 0
362         inWhole := v == 0
363         b := make([]byte, 0, l)
364
365         for i := len(s) - 1; i >= 0; i-- {
366
367                 if s[i] == '.' {
368                         b = append(b, ta.decimal[0])
369                         inWhole = true
370                         continue
371                 }
372
373                 if inWhole {
374                         if count == 3 {
375                                 b = append(b, ta.group[0])
376                                 count = 1
377                         } else {
378                                 count++
379                         }
380                 }
381
382                 b = append(b, s[i])
383         }
384
385         if num < 0 {
386
387                 for j := len(symbol) - 1; j >= 0; j-- {
388                         b = append(b, symbol[j])
389                 }
390
391                 b = append(b, ta.currencyNegativePrefix[0])
392
393         } else {
394
395                 for j := len(symbol) - 1; j >= 0; j-- {
396                         b = append(b, symbol[j])
397                 }
398
399         }
400
401         // reverse
402         for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
403                 b[i], b[j] = b[j], b[i]
404         }
405
406         if int(v) < 2 {
407
408                 if v == 0 {
409                         b = append(b, ta.decimal...)
410                 }
411
412                 for i := 0; i < 2-int(v); i++ {
413                         b = append(b, '0')
414                 }
415         }
416
417         if num < 0 {
418                 b = append(b, ta.currencyNegativeSuffix...)
419         }
420
421         return string(b)
422 }
423
424 // FmtDateShort returns the short date representation of 't' for 'ta_LK'
425 func (ta *ta_LK) FmtDateShort(t time.Time) string {
426
427         b := make([]byte, 0, 32)
428
429         b = strconv.AppendInt(b, int64(t.Day()), 10)
430         b = append(b, []byte{0x2f}...)
431         b = strconv.AppendInt(b, int64(t.Month()), 10)
432         b = append(b, []byte{0x2f}...)
433
434         if t.Year() > 9 {
435                 b = append(b, strconv.Itoa(t.Year())[2:]...)
436         } else {
437                 b = append(b, strconv.Itoa(t.Year())[1:]...)
438         }
439
440         return string(b)
441 }
442
443 // FmtDateMedium returns the medium date representation of 't' for 'ta_LK'
444 func (ta *ta_LK) FmtDateMedium(t time.Time) string {
445
446         b := make([]byte, 0, 32)
447
448         b = strconv.AppendInt(b, int64(t.Day()), 10)
449         b = append(b, []byte{0x20}...)
450         b = append(b, ta.monthsAbbreviated[t.Month()]...)
451         b = append(b, []byte{0x2c, 0x20}...)
452
453         if t.Year() > 0 {
454                 b = strconv.AppendInt(b, int64(t.Year()), 10)
455         } else {
456                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
457         }
458
459         return string(b)
460 }
461
462 // FmtDateLong returns the long date representation of 't' for 'ta_LK'
463 func (ta *ta_LK) FmtDateLong(t time.Time) string {
464
465         b := make([]byte, 0, 32)
466
467         b = strconv.AppendInt(b, int64(t.Day()), 10)
468         b = append(b, []byte{0x20}...)
469         b = append(b, ta.monthsWide[t.Month()]...)
470         b = append(b, []byte{0x2c, 0x20}...)
471
472         if t.Year() > 0 {
473                 b = strconv.AppendInt(b, int64(t.Year()), 10)
474         } else {
475                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
476         }
477
478         return string(b)
479 }
480
481 // FmtDateFull returns the full date representation of 't' for 'ta_LK'
482 func (ta *ta_LK) FmtDateFull(t time.Time) string {
483
484         b := make([]byte, 0, 32)
485
486         b = append(b, ta.daysWide[t.Weekday()]...)
487         b = append(b, []byte{0x2c, 0x20}...)
488         b = strconv.AppendInt(b, int64(t.Day()), 10)
489         b = append(b, []byte{0x20}...)
490         b = append(b, ta.monthsWide[t.Month()]...)
491         b = append(b, []byte{0x2c, 0x20}...)
492
493         if t.Year() > 0 {
494                 b = strconv.AppendInt(b, int64(t.Year()), 10)
495         } else {
496                 b = strconv.AppendInt(b, int64(-t.Year()), 10)
497         }
498
499         return string(b)
500 }
501
502 // FmtTimeShort returns the short time representation of 't' for 'ta_LK'
503 func (ta *ta_LK) FmtTimeShort(t time.Time) string {
504
505         b := make([]byte, 0, 32)
506
507         if t.Hour() < 10 {
508                 b = append(b, '0')
509         }
510
511         b = strconv.AppendInt(b, int64(t.Hour()), 10)
512         b = append(b, ta.timeSeparator...)
513
514         if t.Minute() < 10 {
515                 b = append(b, '0')
516         }
517
518         b = strconv.AppendInt(b, int64(t.Minute()), 10)
519
520         return string(b)
521 }
522
523 // FmtTimeMedium returns the medium time representation of 't' for 'ta_LK'
524 func (ta *ta_LK) FmtTimeMedium(t time.Time) string {
525
526         b := make([]byte, 0, 32)
527
528         if t.Hour() < 10 {
529                 b = append(b, '0')
530         }
531
532         b = strconv.AppendInt(b, int64(t.Hour()), 10)
533         b = append(b, ta.timeSeparator...)
534
535         if t.Minute() < 10 {
536                 b = append(b, '0')
537         }
538
539         b = strconv.AppendInt(b, int64(t.Minute()), 10)
540         b = append(b, ta.timeSeparator...)
541
542         if t.Second() < 10 {
543                 b = append(b, '0')
544         }
545
546         b = strconv.AppendInt(b, int64(t.Second()), 10)
547
548         return string(b)
549 }
550
551 // FmtTimeLong returns the long time representation of 't' for 'ta_LK'
552 func (ta *ta_LK) FmtTimeLong(t time.Time) string {
553
554         b := make([]byte, 0, 32)
555
556         if t.Hour() < 10 {
557                 b = append(b, '0')
558         }
559
560         b = strconv.AppendInt(b, int64(t.Hour()), 10)
561         b = append(b, ta.timeSeparator...)
562
563         if t.Minute() < 10 {
564                 b = append(b, '0')
565         }
566
567         b = strconv.AppendInt(b, int64(t.Minute()), 10)
568         b = append(b, ta.timeSeparator...)
569
570         if t.Second() < 10 {
571                 b = append(b, '0')
572         }
573
574         b = strconv.AppendInt(b, int64(t.Second()), 10)
575         b = append(b, []byte{0x20}...)
576
577         tz, _ := t.Zone()
578         b = append(b, tz...)
579
580         return string(b)
581 }
582
583 // FmtTimeFull returns the full time representation of 't' for 'ta_LK'
584 func (ta *ta_LK) FmtTimeFull(t time.Time) string {
585
586         b := make([]byte, 0, 32)
587
588         if t.Hour() < 10 {
589                 b = append(b, '0')
590         }
591
592         b = strconv.AppendInt(b, int64(t.Hour()), 10)
593         b = append(b, ta.timeSeparator...)
594
595         if t.Minute() < 10 {
596                 b = append(b, '0')
597         }
598
599         b = strconv.AppendInt(b, int64(t.Minute()), 10)
600         b = append(b, ta.timeSeparator...)
601
602         if t.Second() < 10 {
603                 b = append(b, '0')
604         }
605
606         b = strconv.AppendInt(b, int64(t.Second()), 10)
607         b = append(b, []byte{0x20}...)
608
609         tz, _ := t.Zone()
610
611         if btz, ok := ta.timezones[tz]; ok {
612                 b = append(b, btz...)
613         } else {
614                 b = append(b, tz...)
615         }
616
617         return string(b)
618 }