8 "github.com/go-playground/locales"
9 "github.com/go-playground/locales/currency"
14 pluralsCardinal []locales.PluralRule
15 pluralsOrdinal []locales.PluralRule
16 pluralsRange []locales.PluralRule
25 currencies []string // idx = enum of currency code
26 currencyPositiveSuffix string
27 currencyNegativeSuffix string
28 monthsAbbreviated []string
31 daysAbbreviated []string
35 periodsAbbreviated []string
36 periodsNarrow []string
39 erasAbbreviated []string
42 timezones map[string]string
45 // New returns a new instance of translator for the 'lt' locale
46 func New() locales.Translator {
49 pluralsCardinal: []locales.PluralRule{2, 4, 5, 6},
50 pluralsOrdinal: []locales.PluralRule{6},
51 pluralsRange: []locales.PluralRule{2, 4, 5, 6},
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", "€", "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"},
61 currencyPositiveSuffix: " ",
62 currencyNegativeSuffix: " ",
63 monthsAbbreviated: []string{"", "saus.", "vas.", "kov.", "bal.", "geg.", "birž.", "liep.", "rugp.", "rugs.", "spal.", "lapkr.", "gruod."},
64 monthsNarrow: []string{"", "S", "V", "K", "B", "G", "B", "L", "R", "R", "S", "L", "G"},
65 monthsWide: []string{"", "sausio", "vasario", "kovo", "balandžio", "gegužės", "birželio", "liepos", "rugpjūčio", "rugsėjo", "spalio", "lapkričio", "gruodžio"},
66 daysAbbreviated: []string{"sk", "pr", "an", "tr", "kt", "pn", "št"},
67 daysNarrow: []string{"S", "P", "A", "T", "K", "P", "Š"},
68 daysShort: []string{"Sk", "Pr", "An", "Tr", "Kt", "Pn", "Št"},
69 daysWide: []string{"sekmadienis", "pirmadienis", "antradienis", "trečiadienis", "ketvirtadienis", "penktadienis", "šeštadienis"},
70 periodsAbbreviated: []string{"priešpiet", "popiet"},
71 periodsNarrow: []string{"pr. p.", "pop."},
72 periodsWide: []string{"priešpiet", "popiet"},
73 erasAbbreviated: []string{"pr. Kr.", "po Kr."},
74 erasNarrow: []string{"pr. Kr.", "po Kr."},
75 erasWide: []string{"prieš Kristų", "po Kristaus"},
76 timezones: map[string]string{"MYT": "Malaizijos laikas", "HENOMX": "Šiaurės Vakarų Meksikos vasaros laikas", "HKT": "Honkongo žiemos laikas", "SGT": "Singapūro laikas", "PDT": "Šiaurės Amerikos Ramiojo vandenyno vasaros laikas", "IST": "Indijos laikas", "HEOG": "Grenlandijos vakarų vasaros laikas", "EAT": "Rytų Afrikos laikas", "WAST": "Vakarų Afrikos vasaros laikas", "ACDT": "Centrinės Australijos vasaros laikas", "ChST": "Čamoro laikas", "UYST": "Urugvajaus vasaros laikas", "WITA": "Centrinės Indonezijos laikas", "CHAST": "Čatamo žiemos laikas", "HNCU": "Kubos žiemos laikas", "OEZ": "Rytų Europos žiemos laikas", "LHDT": "Lordo Hau vasaros laikas", "ART": "Argentinos žiemos laikas", "HEEG": "Grenlandijos rytų vasaros laikas", "EST": "Šiaurės Amerikos rytų žiemos laikas", "GMT": "Grinvičo laikas", "HEPMX": "Meksikos Ramiojo vandenyno vasaros laikas", "CAT": "Centrinės Afrikos laikas", "MST": "Makau žiemos laikas", "MEZ": "Vidurio Europos žiemos laikas", "SAST": "Pietų Afrikos laikas", "HEPM": "Sen Pjero ir Mikelono vasaros laikas", "TMT": "Turkmėnistano žiemos laikas", "MESZ": "Vidurio Europos vasaros laikas", "HNEG": "Grenlandijos rytų žiemos laikas", "HAST": "Havajų–Aleutų žiemos laikas", "ARST": "Argentinos vasaros laikas", "HADT": "Havajų–Aleutų vasaros laikas", "NZDT": "Naujosios Zelandijos vasaros laikas", "WAT": "Vakarų Afrikos žiemos laikas", "GYT": "Gajanos laikas", "WEZ": "Vakarų Europos žiemos laikas", "BT": "Butano laikas", "CDT": "Šiaurės Amerikos centro vasaros laikas", "WIT": "Rytų Indonezijos laikas", "WARST": "Vakarų Argentinos vasaros laikas", "HNNOMX": "Šiaurės Vakarų Meksikos žiemos laikas", "HAT": "Niufaundlendo vasaros laikas", "AWDT": "Vakarų Australijos vasaros laikas", "HNOG": "Grenlandijos vakarų žiemos laikas", "HKST": "Honkongo vasaros laikas", "CLST": "Čilės vasaros laikas", "BOT": "Bolivijos laikas", "TMST": "Turkmėnistano vasaros laikas", "JDT": "Japonijos vasaros laikas", "COST": "Kolumbijos vasaros laikas", "HNPMX": "Meksikos Ramiojo vandenyno žiemos laikas", "HNPM": "Sen Pjero ir Mikelono žiemos laikas", "CHADT": "Čatamo vasaros laikas", "CST": "Šiaurės Amerikos centro žiemos laikas", "ADT": "Atlanto vasaros laikas", "SRT": "Surinamo laikas", "AWST": "Vakarų Australijos žiemos laikas", "CLT": "Čilės žiemos laikas", "AKST": "Aliaskos žiemos laikas", "WESZ": "Vakarų Europos vasaros laikas", "WIB": "Vakarų Indonezijos laikas", "PST": "Šiaurės Amerikos Ramiojo vandenyno žiemos laikas", "HECU": "Kubos vasaros laikas", "OESZ": "Rytų Europos vasaros laikas", "AEDT": "Rytų Australijos vasaros laikas", "ACST": "Centrinės Australijos žiemos laikas", "ECT": "Ekvadoro laikas", "MDT": "Makau vasaros laikas", "ACWDT": "Centrinės vakarų Australijos vasaros laikas", "VET": "Venesuelos laikas", "JST": "Japonijos žiemos laikas", "COT": "Kolumbijos žiemos laikas", "EDT": "Šiaurės Amerikos rytų vasaros laikas", "∅∅∅": "Amazonės vasaros laikas", "AKDT": "Aliaskos vasaros laikas", "WART": "Vakarų Argentinos žiemos laikas", "AST": "Atlanto žiemos laikas", "AEST": "Rytų Australijos žiemos laikas", "GFT": "Prancūzijos Gvianos laikas", "HNT": "Niufaundlendo žiemos laikas", "ACWST": "Centrinės vakarų Australijos žiemos laikas", "UYT": "Urugvajaus žiemos laikas", "NZST": "Naujosios Zelandijos žiemos laikas", "LHST": "Lordo Hau žiemos laikas"},
80 // Locale returns the current translators string locale
81 func (lt *lt) Locale() string {
85 // PluralsCardinal returns the list of cardinal plural rules associated with 'lt'
86 func (lt *lt) PluralsCardinal() []locales.PluralRule {
87 return lt.pluralsCardinal
90 // PluralsOrdinal returns the list of ordinal plural rules associated with 'lt'
91 func (lt *lt) PluralsOrdinal() []locales.PluralRule {
92 return lt.pluralsOrdinal
95 // PluralsRange returns the list of range plural rules associated with 'lt'
96 func (lt *lt) PluralsRange() []locales.PluralRule {
97 return lt.pluralsRange
100 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'lt'
101 func (lt *lt) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
105 nMod10 := math.Mod(n, 10)
106 nMod100 := math.Mod(n, 100)
108 if nMod10 == 1 && (nMod100 < 11 || nMod100 > 19) {
109 return locales.PluralRuleOne
110 } else if nMod10 >= 2 && nMod10 <= 9 && (nMod100 < 11 || nMod100 > 19) {
111 return locales.PluralRuleFew
113 return locales.PluralRuleMany
116 return locales.PluralRuleOther
119 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'lt'
120 func (lt *lt) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
121 return locales.PluralRuleOther
124 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'lt'
125 func (lt *lt) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
127 start := lt.CardinalPluralRule(num1, v1)
128 end := lt.CardinalPluralRule(num2, v2)
130 if start == locales.PluralRuleOne && end == locales.PluralRuleOne {
131 return locales.PluralRuleOne
132 } else if start == locales.PluralRuleOne && end == locales.PluralRuleFew {
133 return locales.PluralRuleFew
134 } else if start == locales.PluralRuleOne && end == locales.PluralRuleMany {
135 return locales.PluralRuleMany
136 } else if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
137 return locales.PluralRuleOther
138 } else if start == locales.PluralRuleFew && end == locales.PluralRuleOne {
139 return locales.PluralRuleOne
140 } else if start == locales.PluralRuleFew && end == locales.PluralRuleFew {
141 return locales.PluralRuleFew
142 } else if start == locales.PluralRuleFew && end == locales.PluralRuleMany {
143 return locales.PluralRuleMany
144 } else if start == locales.PluralRuleFew && end == locales.PluralRuleOther {
145 return locales.PluralRuleOther
146 } else if start == locales.PluralRuleMany && end == locales.PluralRuleOne {
147 return locales.PluralRuleOne
148 } else if start == locales.PluralRuleMany && end == locales.PluralRuleFew {
149 return locales.PluralRuleFew
150 } else if start == locales.PluralRuleMany && end == locales.PluralRuleMany {
151 return locales.PluralRuleMany
152 } else if start == locales.PluralRuleMany && end == locales.PluralRuleOther {
153 return locales.PluralRuleOther
154 } else if start == locales.PluralRuleOther && end == locales.PluralRuleOne {
155 return locales.PluralRuleOne
156 } else if start == locales.PluralRuleOther && end == locales.PluralRuleFew {
157 return locales.PluralRuleFew
158 } else if start == locales.PluralRuleOther && end == locales.PluralRuleMany {
159 return locales.PluralRuleMany
162 return locales.PluralRuleOther
166 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
167 func (lt *lt) MonthAbbreviated(month time.Month) string {
168 return lt.monthsAbbreviated[month]
171 // MonthsAbbreviated returns the locales abbreviated months
172 func (lt *lt) MonthsAbbreviated() []string {
173 return lt.monthsAbbreviated[1:]
176 // MonthNarrow returns the locales narrow month given the 'month' provided
177 func (lt *lt) MonthNarrow(month time.Month) string {
178 return lt.monthsNarrow[month]
181 // MonthsNarrow returns the locales narrow months
182 func (lt *lt) MonthsNarrow() []string {
183 return lt.monthsNarrow[1:]
186 // MonthWide returns the locales wide month given the 'month' provided
187 func (lt *lt) MonthWide(month time.Month) string {
188 return lt.monthsWide[month]
191 // MonthsWide returns the locales wide months
192 func (lt *lt) MonthsWide() []string {
193 return lt.monthsWide[1:]
196 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
197 func (lt *lt) WeekdayAbbreviated(weekday time.Weekday) string {
198 return lt.daysAbbreviated[weekday]
201 // WeekdaysAbbreviated returns the locales abbreviated weekdays
202 func (lt *lt) WeekdaysAbbreviated() []string {
203 return lt.daysAbbreviated
206 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
207 func (lt *lt) WeekdayNarrow(weekday time.Weekday) string {
208 return lt.daysNarrow[weekday]
211 // WeekdaysNarrow returns the locales narrow weekdays
212 func (lt *lt) WeekdaysNarrow() []string {
216 // WeekdayShort returns the locales short weekday given the 'weekday' provided
217 func (lt *lt) WeekdayShort(weekday time.Weekday) string {
218 return lt.daysShort[weekday]
221 // WeekdaysShort returns the locales short weekdays
222 func (lt *lt) WeekdaysShort() []string {
226 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
227 func (lt *lt) WeekdayWide(weekday time.Weekday) string {
228 return lt.daysWide[weekday]
231 // WeekdaysWide returns the locales wide weekdays
232 func (lt *lt) WeekdaysWide() []string {
236 // Decimal returns the decimal point of number
237 func (lt *lt) Decimal() string {
241 // Group returns the group of number
242 func (lt *lt) Group() string {
246 // Group returns the minus sign of number
247 func (lt *lt) Minus() string {
251 // FmtNumber returns 'num' with digits/precision of 'v' for 'lt' and handles both Whole and Real numbers based on 'v'
252 func (lt *lt) FmtNumber(num float64, v uint64) string {
254 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
255 l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3
258 b := make([]byte, 0, l)
260 for i := len(s) - 1; i >= 0; i-- {
263 b = append(b, lt.decimal[0])
270 for j := len(lt.group) - 1; j >= 0; j-- {
271 b = append(b, lt.group[j])
283 for j := len(lt.minus) - 1; j >= 0; j-- {
284 b = append(b, lt.minus[j])
289 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
290 b[i], b[j] = b[j], b[i]
296 // FmtPercent returns 'num' with digits/precision of 'v' for 'lt' and handles both Whole and Real numbers based on 'v'
297 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
298 func (lt *lt) FmtPercent(num float64, v uint64) string {
299 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
301 b := make([]byte, 0, l)
303 for i := len(s) - 1; i >= 0; i-- {
306 b = append(b, lt.decimal[0])
314 for j := len(lt.minus) - 1; j >= 0; j-- {
315 b = append(b, lt.minus[j])
320 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
321 b[i], b[j] = b[j], b[i]
324 b = append(b, lt.percentSuffix...)
326 b = append(b, lt.percent...)
331 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'lt'
332 func (lt *lt) FmtCurrency(num float64, v uint64, currency currency.Type) string {
334 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
335 symbol := lt.currencies[currency]
336 l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3
339 b := make([]byte, 0, l)
341 for i := len(s) - 1; i >= 0; i-- {
344 b = append(b, lt.decimal[0])
351 for j := len(lt.group) - 1; j >= 0; j-- {
352 b = append(b, lt.group[j])
364 for j := len(lt.minus) - 1; j >= 0; j-- {
365 b = append(b, lt.minus[j])
370 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
371 b[i], b[j] = b[j], b[i]
377 b = append(b, lt.decimal...)
380 for i := 0; i < 2-int(v); i++ {
385 b = append(b, lt.currencyPositiveSuffix...)
387 b = append(b, symbol...)
392 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'lt'
393 // in accounting notation.
394 func (lt *lt) FmtAccounting(num float64, v uint64, currency currency.Type) string {
396 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
397 symbol := lt.currencies[currency]
398 l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3
401 b := make([]byte, 0, l)
403 for i := len(s) - 1; i >= 0; i-- {
406 b = append(b, lt.decimal[0])
413 for j := len(lt.group) - 1; j >= 0; j-- {
414 b = append(b, lt.group[j])
427 for j := len(lt.minus) - 1; j >= 0; j-- {
428 b = append(b, lt.minus[j])
434 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
435 b[i], b[j] = b[j], b[i]
441 b = append(b, lt.decimal...)
444 for i := 0; i < 2-int(v); i++ {
450 b = append(b, lt.currencyNegativeSuffix...)
451 b = append(b, symbol...)
454 b = append(b, lt.currencyPositiveSuffix...)
455 b = append(b, symbol...)
461 // FmtDateShort returns the short date representation of 't' for 'lt'
462 func (lt *lt) FmtDateShort(t time.Time) string {
464 b := make([]byte, 0, 32)
467 b = strconv.AppendInt(b, int64(t.Year()), 10)
469 b = strconv.AppendInt(b, int64(-t.Year()), 10)
472 b = append(b, []byte{0x2d}...)
478 b = strconv.AppendInt(b, int64(t.Month()), 10)
480 b = append(b, []byte{0x2d}...)
486 b = strconv.AppendInt(b, int64(t.Day()), 10)
491 // FmtDateMedium returns the medium date representation of 't' for 'lt'
492 func (lt *lt) FmtDateMedium(t time.Time) string {
494 b := make([]byte, 0, 32)
497 b = strconv.AppendInt(b, int64(t.Year()), 10)
499 b = strconv.AppendInt(b, int64(-t.Year()), 10)
502 b = append(b, []byte{0x2d}...)
508 b = strconv.AppendInt(b, int64(t.Month()), 10)
510 b = append(b, []byte{0x2d}...)
516 b = strconv.AppendInt(b, int64(t.Day()), 10)
521 // FmtDateLong returns the long date representation of 't' for 'lt'
522 func (lt *lt) FmtDateLong(t time.Time) string {
524 b := make([]byte, 0, 32)
527 b = strconv.AppendInt(b, int64(t.Year()), 10)
529 b = strconv.AppendInt(b, int64(-t.Year()), 10)
532 b = append(b, []byte{0x20, 0x6d}...)
533 b = append(b, []byte{0x2e, 0x20}...)
534 b = append(b, lt.monthsWide[t.Month()]...)
535 b = append(b, []byte{0x20}...)
536 b = strconv.AppendInt(b, int64(t.Day()), 10)
537 b = append(b, []byte{0x20, 0x64}...)
538 b = append(b, []byte{0x2e}...)
543 // FmtDateFull returns the full date representation of 't' for 'lt'
544 func (lt *lt) FmtDateFull(t time.Time) string {
546 b := make([]byte, 0, 32)
549 b = strconv.AppendInt(b, int64(t.Year()), 10)
551 b = strconv.AppendInt(b, int64(-t.Year()), 10)
554 b = append(b, []byte{0x20, 0x6d}...)
555 b = append(b, []byte{0x2e, 0x20}...)
556 b = append(b, lt.monthsWide[t.Month()]...)
557 b = append(b, []byte{0x20}...)
558 b = strconv.AppendInt(b, int64(t.Day()), 10)
559 b = append(b, []byte{0x20, 0x64}...)
560 b = append(b, []byte{0x2e, 0x2c, 0x20}...)
561 b = append(b, lt.daysWide[t.Weekday()]...)
566 // FmtTimeShort returns the short time representation of 't' for 'lt'
567 func (lt *lt) FmtTimeShort(t time.Time) string {
569 b := make([]byte, 0, 32)
575 b = strconv.AppendInt(b, int64(t.Hour()), 10)
576 b = append(b, lt.timeSeparator...)
582 b = strconv.AppendInt(b, int64(t.Minute()), 10)
587 // FmtTimeMedium returns the medium time representation of 't' for 'lt'
588 func (lt *lt) FmtTimeMedium(t time.Time) string {
590 b := make([]byte, 0, 32)
596 b = strconv.AppendInt(b, int64(t.Hour()), 10)
597 b = append(b, lt.timeSeparator...)
603 b = strconv.AppendInt(b, int64(t.Minute()), 10)
604 b = append(b, lt.timeSeparator...)
610 b = strconv.AppendInt(b, int64(t.Second()), 10)
615 // FmtTimeLong returns the long time representation of 't' for 'lt'
616 func (lt *lt) FmtTimeLong(t time.Time) string {
618 b := make([]byte, 0, 32)
624 b = strconv.AppendInt(b, int64(t.Hour()), 10)
625 b = append(b, lt.timeSeparator...)
631 b = strconv.AppendInt(b, int64(t.Minute()), 10)
632 b = append(b, lt.timeSeparator...)
638 b = strconv.AppendInt(b, int64(t.Second()), 10)
639 b = append(b, []byte{0x20}...)
647 // FmtTimeFull returns the full time representation of 't' for 'lt'
648 func (lt *lt) FmtTimeFull(t time.Time) string {
650 b := make([]byte, 0, 32)
656 b = strconv.AppendInt(b, int64(t.Hour()), 10)
657 b = append(b, lt.timeSeparator...)
663 b = strconv.AppendInt(b, int64(t.Minute()), 10)
664 b = append(b, lt.timeSeparator...)
670 b = strconv.AppendInt(b, int64(t.Second()), 10)
671 b = append(b, []byte{0x20}...)
675 if btz, ok := lt.timezones[tz]; ok {
676 b = append(b, btz...)