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
24 currencies []string // idx = enum of currency code
25 currencyNegativePrefix string
26 currencyNegativeSuffix string
27 monthsAbbreviated []string
30 daysAbbreviated []string
34 periodsAbbreviated []string
35 periodsNarrow []string
38 erasAbbreviated []string
41 timezones map[string]string
44 // New returns a new instance of translator for the 'si' locale
45 func New() locales.Translator {
48 pluralsCardinal: []locales.PluralRule{2, 6},
49 pluralsOrdinal: []locales.PluralRule{6},
50 pluralsRange: []locales.PluralRule{2, 6},
58 currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "A$", "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", "R$", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CA$", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CN¥", "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", "£", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HK$", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "₪", "₹", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JP¥", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "₩", "KWD", "KYD", "KZT", "LAK", "LBP", "රු.", "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", "MX$", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZ$", "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", "฿", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "NT$", "TZS", "UAH", "UAK", "UGS", "UGX", "US$", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "₫", "VNN", "VUV", "WST", "FCFA", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "EC$", "XDR", "XEU", "XFO", "XFU", "සිෆ්එ", "XPD", "CFPF", "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{"", "ජන", "පෙබ", "මාර්තු", "අප්\u200dරේල්", "මැයි", "ජූනි", "ජූලි", "අගෝ", "සැප්", "ඔක්", "නොවැ", "දෙසැ"},
62 monthsNarrow: []string{"", "ජ", "පෙ", "මා", "අ", "මැ", "ජූ", "ජූ", "අ", "සැ", "ඔ", "නෙ", "දෙ"},
63 monthsWide: []string{"", "ජනවාරි", "පෙබරවාරි", "මාර්තු", "අප්\u200dරේල්", "මැයි", "ජූනි", "ජූලි", "අගෝස්තු", "සැප්තැම්බර්", "ඔක්තෝබර්", "නොවැම්බර්", "දෙසැම්බර්"},
64 daysAbbreviated: []string{"ඉරිදා", "සඳුදා", "අඟහ", "බදාදා", "බ්\u200dරහස්", "සිකු", "සෙන"},
65 daysNarrow: []string{"ඉ", "ස", "අ", "බ", "බ්\u200dර", "සි", "සෙ"},
66 daysShort: []string{"ඉරි", "සඳු", "අඟ", "බදා", "බ්\u200dරහ", "සිකු", "සෙන"},
67 daysWide: []string{"ඉරිදා", "සඳුදා", "අඟහරුවාදා", "බදාදා", "බ්\u200dරහස්පතින්දා", "සිකුරාදා", "සෙනසුරාදා"},
68 periodsAbbreviated: []string{"පෙ.ව.", "ප.ව."},
69 periodsNarrow: []string{"පෙ", "ප"},
70 periodsWide: []string{"පෙ.ව.", "ප.ව."},
71 erasAbbreviated: []string{"ක්\u200dරි.පූ.", "ක්\u200dරි.ව."},
72 erasNarrow: []string{"", ""},
73 erasWide: []string{"ක්\u200dරිස්තු පූර්ව", "ක්\u200dරිස්තු වර්ෂ"},
74 timezones: map[string]string{"OEZ": "නැගෙනහිර යුරෝපීය සම්මත වේලාව", "OESZ": "නැගෙනහිර යුරෝපීය ග්\u200dරීෂ්ම වේලාව", "ADT": "අත්ලාන්තික් දිවාආලෝක වේලාව", "CLT": "චිලී සම්මත වේලාව", "EST": "උතුරු ඇමරිකානු නැගෙනහිර සම්මත වේලාව", "HECU": "කියුබානු දිවාආලෝක වේලාව", "TMST": "ටර්ක්මෙනිස්තාන ග්\u200dරීෂ්ම වේලාව", "AEDT": "නැඟෙනහිර ඕස්ට්\u200dරේලියානු දහවල් වේලාව", "ARST": "ආර්ජන්ටිනා ග්\u200dරීෂ්ම කාලය", "∅∅∅": "ඇමර්සන් ග්\u200dරීෂ්ම කාලය", "MESZ": "මධ්\u200dයම යුරෝපීය ග්\u200dරීෂ්ම වේලාව", "LHST": "ලෝර්ඩ් හෝව් සම්මත වේලාව", "WARST": "බටහිර ආර්ජන්ටිනා ග්\u200dරීෂ්ම කාලය", "ACDT": "මධ්\u200dයම ඔස්ට්\u200dරේලියානු දහවල් වේලාව", "CAT": "මධ්\u200dයම අප්\u200dරිකානු වේලාව", "WIB": "බටහිර ඉන්දුනීසියානු වේලාව", "MST": "MST", "WAT": "බටහිර අප්\u200dරිකානු සම්මත වේලාව", "WAST": "බටහිර අප්\u200dරිකානු ග්\u200dරීෂ්ම කාලය", "CLST": "චිලී ග්\u200dරීෂ්ම කාලය", "EDT": "උතුරු ඇමරිකානු නැගෙනහිර දිවාආලෝක වේලාව", "WIT": "නැගෙනහිර ඉන්දුනීසියානු වේලාව", "NZDT": "නවසීලන්ත දිවා වේලාව", "HNOG": "බටහිර ග්\u200dරීන්ලන්ත සම්මත වේලාව", "AWDT": "බටහිර ඔස්ට්\u200dරේලියානු දහවල් වේලාව", "SRT": "සුරිනාම වේලාව", "ACWDT": "මධ්\u200dයම බටහිර ඔස්ට්\u200dරේලියානු දහවල් වේලාව", "LHDT": "ලෝර්ඩ් හෝව් දිවා වේලාව", "WEZ": "බටහිර යුරෝපීය සම්මත වේලාව", "HNPMX": "මෙක්සිකෝ පැසිෆික් සම්මත වේලාව", "BT": "භුතාන වේලාව", "CDT": "උතුරු ඇමරිකානු මධ්\u200dයම දිවාආලෝක වේලාව", "VET": "වෙනිසියුලා වේලාව", "SAST": "දකුණු අප්\u200dරිකානු වේලාව", "HNEG": "නැගෙනහිර ග්\u200dරීන්ලන්ත සම්මත වේලාව", "HEPM": "ශාන්ත පියරේ සහ මැකෝලන් දිවාආලෝක වේලාව", "AWST": "බටහිර ඕස්ට්\u200dරේලියානු සම්මත වේලාව", "WART": "බටහිර ආර්ජන්ටිනා සම්මත වේලාව", "HEOG": "බටහිර ග්\u200dරීන්ලන්ත ග්\u200dරීෂ්ම කාලය", "AKST": "ඇලස්කා සම්මත වේලාව", "ECT": "ඉක්වදෝර් වේලාව", "HADT": "හවායි-අලෙයුතියාන් දිවාආලෝක වේලාව", "JDT": "ජපාන දහවල් වේලාව", "IST": "ඉන්දියානු වේලාව", "HNT": "නිව්ෆවුන්ලන්ත සම්මත වේලාව", "ACST": "ඕස්ට්\u200dරේලියානු සම්මත වේලාව", "HEPMX": "මෙක්සිකෝ පැසිෆික් දිවාආලෝක වේලාව", "UYT": "උරුගුවේ සම්මත වේලාව", "HNNOMX": "වයඹ මෙක්සිකෝ සම්මත වේලාව", "HENOMX": "වයඹ මෙක්සිකෝ දිවාආලෝක වේලාව", "WITA": "මධ්\u200dයම ඉන්දුනීසියානු වේලාව", "AST": "අත්ලාන්තික් සම්මත වේලාව", "EAT": "නැගෙනහිර අප්\u200dරිකානු වේලාව", "CST": "උතුරු ඇමරිකානු මධ්\u200dයම සම්මත වේලාව", "MDT": "MDT", "TMT": "ටර්ක්මෙනිස්තාන සම්මත වේලාව", "AEST": "නැගෙනහිර ඕස්ට්\u200dරේලියානු සම්මත වේලාව", "HAT": "නිව්ෆවුන්ලන්ත දිවාආලෝක වේලාව", "GMT": "ග්\u200dරිනිච් මධ්\u200dයම වේලාව", "JST": "ජපාන සම්මත වේලාව", "CHADT": "චැතම් දිවා වේලාව", "BOT": "බොලිවියා වේලාව", "COST": "කොලොම්බියා ග්\u200dරීෂ්ම කාලය", "ChST": "චමොරෝ වේලාව", "MYT": "මැලේසියානු වේලාව", "HNPM": "ශාන්ත පියරේ සහ මැකෝලන් සම්මත වේලාව", "MEZ": "මධ්\u200dයම යුරෝපීය සම්මත වේලාව", "HAST": "හවායි-අලෙයුතියාන් සම්මත වේලාව", "ART": "ආර්ජන්ටිනා සම්මත වේලාව", "HKST": "හොංකොං ග්\u200dරීෂ්ම වේලාව", "SGT": "සිංගප්පුරු වේලාව", "PDT": "උතුරු ඇමරිකානු පැසිෆික් දිවාආලෝක වේලාව", "HNCU": "කියුබානු සම්මත වේලාව", "AKDT": "ඇලස්කා දිවාආලෝක වේලාව", "PST": "උතුරු ඇමරිකානු පැසිෆික් සම්මත වේලාව", "ACWST": "මධ්\u200dයම බටහිර ඔස්ට්\u200dරේලියානු සම්මත වේලාව", "HEEG": "නැගෙනහිර ග්\u200dරීන්ලන්ත ග්\u200dරීෂ්ම කාලය", "HKT": "හොංකොං සම්මත වේලාව", "GFT": "ප්\u200dරංශ ගයනා වේලාව", "WESZ": "බටහිර යුරෝපීය ග්\u200dරීෂ්ම වේලාව", "COT": "කොලොම්බියා සම්මත වේලාව", "GYT": "ගයනා වේලාව", "CHAST": "චැතම් සම්මත වේලාව", "NZST": "නවසීලන්ත සම්මත වේලාව", "UYST": "උරුගුවේ ග්\u200dරීෂ්ම කාලය"},
78 // Locale returns the current translators string locale
79 func (si *si) Locale() string {
83 // PluralsCardinal returns the list of cardinal plural rules associated with 'si'
84 func (si *si) PluralsCardinal() []locales.PluralRule {
85 return si.pluralsCardinal
88 // PluralsOrdinal returns the list of ordinal plural rules associated with 'si'
89 func (si *si) PluralsOrdinal() []locales.PluralRule {
90 return si.pluralsOrdinal
93 // PluralsRange returns the list of range plural rules associated with 'si'
94 func (si *si) PluralsRange() []locales.PluralRule {
95 return si.pluralsRange
98 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'si'
99 func (si *si) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
105 if (n == 0 || n == 1) || (i == 0 && f == 1) {
106 return locales.PluralRuleOne
109 return locales.PluralRuleOther
112 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'si'
113 func (si *si) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
114 return locales.PluralRuleOther
117 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'si'
118 func (si *si) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
120 start := si.CardinalPluralRule(num1, v1)
121 end := si.CardinalPluralRule(num2, v2)
123 if start == locales.PluralRuleOne && end == locales.PluralRuleOne {
124 return locales.PluralRuleOne
125 } else if start == locales.PluralRuleOne && end == locales.PluralRuleOther {
126 return locales.PluralRuleOther
127 } else if start == locales.PluralRuleOther && end == locales.PluralRuleOne {
128 return locales.PluralRuleOther
131 return locales.PluralRuleOther
135 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
136 func (si *si) MonthAbbreviated(month time.Month) string {
137 return si.monthsAbbreviated[month]
140 // MonthsAbbreviated returns the locales abbreviated months
141 func (si *si) MonthsAbbreviated() []string {
142 return si.monthsAbbreviated[1:]
145 // MonthNarrow returns the locales narrow month given the 'month' provided
146 func (si *si) MonthNarrow(month time.Month) string {
147 return si.monthsNarrow[month]
150 // MonthsNarrow returns the locales narrow months
151 func (si *si) MonthsNarrow() []string {
152 return si.monthsNarrow[1:]
155 // MonthWide returns the locales wide month given the 'month' provided
156 func (si *si) MonthWide(month time.Month) string {
157 return si.monthsWide[month]
160 // MonthsWide returns the locales wide months
161 func (si *si) MonthsWide() []string {
162 return si.monthsWide[1:]
165 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
166 func (si *si) WeekdayAbbreviated(weekday time.Weekday) string {
167 return si.daysAbbreviated[weekday]
170 // WeekdaysAbbreviated returns the locales abbreviated weekdays
171 func (si *si) WeekdaysAbbreviated() []string {
172 return si.daysAbbreviated
175 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
176 func (si *si) WeekdayNarrow(weekday time.Weekday) string {
177 return si.daysNarrow[weekday]
180 // WeekdaysNarrow returns the locales narrow weekdays
181 func (si *si) WeekdaysNarrow() []string {
185 // WeekdayShort returns the locales short weekday given the 'weekday' provided
186 func (si *si) WeekdayShort(weekday time.Weekday) string {
187 return si.daysShort[weekday]
190 // WeekdaysShort returns the locales short weekdays
191 func (si *si) WeekdaysShort() []string {
195 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
196 func (si *si) WeekdayWide(weekday time.Weekday) string {
197 return si.daysWide[weekday]
200 // WeekdaysWide returns the locales wide weekdays
201 func (si *si) WeekdaysWide() []string {
205 // Decimal returns the decimal point of number
206 func (si *si) Decimal() string {
210 // Group returns the group of number
211 func (si *si) Group() string {
215 // Group returns the minus sign of number
216 func (si *si) Minus() string {
220 // FmtNumber returns 'num' with digits/precision of 'v' for 'si' and handles both Whole and Real numbers based on 'v'
221 func (si *si) FmtNumber(num float64, v uint64) string {
223 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
224 l := len(s) + 2 + 1*len(s[:len(s)-int(v)-1])/3
227 b := make([]byte, 0, l)
229 for i := len(s) - 1; i >= 0; i-- {
232 b = append(b, si.decimal[0])
239 b = append(b, si.group[0])
250 b = append(b, si.minus[0])
254 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
255 b[i], b[j] = b[j], b[i]
261 // FmtPercent returns 'num' with digits/precision of 'v' for 'si' and handles both Whole and Real numbers based on 'v'
262 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
263 func (si *si) FmtPercent(num float64, v uint64) string {
264 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
266 b := make([]byte, 0, l)
268 for i := len(s) - 1; i >= 0; i-- {
271 b = append(b, si.decimal[0])
279 b = append(b, si.minus[0])
283 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
284 b[i], b[j] = b[j], b[i]
287 b = append(b, si.percent...)
292 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'si'
293 func (si *si) FmtCurrency(num float64, v uint64, currency currency.Type) string {
295 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
296 symbol := si.currencies[currency]
297 l := len(s) + len(symbol) + 2 + 1*len(s[:len(s)-int(v)-1])/3
300 b := make([]byte, 0, l)
302 for i := len(s) - 1; i >= 0; i-- {
305 b = append(b, si.decimal[0])
312 b = append(b, si.group[0])
322 for j := len(symbol) - 1; j >= 0; j-- {
323 b = append(b, symbol[j])
327 b = append(b, si.minus[0])
331 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
332 b[i], b[j] = b[j], b[i]
338 b = append(b, si.decimal...)
341 for i := 0; i < 2-int(v); i++ {
349 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'si'
350 // in accounting notation.
351 func (si *si) FmtAccounting(num float64, v uint64, currency currency.Type) string {
353 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
354 symbol := si.currencies[currency]
355 l := len(s) + len(symbol) + 4 + 1*len(s[:len(s)-int(v)-1])/3
358 b := make([]byte, 0, l)
360 for i := len(s) - 1; i >= 0; i-- {
363 b = append(b, si.decimal[0])
370 b = append(b, si.group[0])
382 for j := len(symbol) - 1; j >= 0; j-- {
383 b = append(b, symbol[j])
386 b = append(b, si.currencyNegativePrefix[0])
390 for j := len(symbol) - 1; j >= 0; j-- {
391 b = append(b, symbol[j])
397 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
398 b[i], b[j] = b[j], b[i]
404 b = append(b, si.decimal...)
407 for i := 0; i < 2-int(v); i++ {
413 b = append(b, si.currencyNegativeSuffix...)
419 // FmtDateShort returns the short date representation of 't' for 'si'
420 func (si *si) FmtDateShort(t time.Time) string {
422 b := make([]byte, 0, 32)
425 b = strconv.AppendInt(b, int64(t.Year()), 10)
427 b = strconv.AppendInt(b, int64(-t.Year()), 10)
430 b = append(b, []byte{0x2d}...)
436 b = strconv.AppendInt(b, int64(t.Month()), 10)
438 b = append(b, []byte{0x2d}...)
444 b = strconv.AppendInt(b, int64(t.Day()), 10)
449 // FmtDateMedium returns the medium date representation of 't' for 'si'
450 func (si *si) FmtDateMedium(t time.Time) string {
452 b := make([]byte, 0, 32)
455 b = strconv.AppendInt(b, int64(t.Year()), 10)
457 b = strconv.AppendInt(b, int64(-t.Year()), 10)
460 b = append(b, []byte{0x20}...)
461 b = append(b, si.monthsAbbreviated[t.Month()]...)
462 b = append(b, []byte{0x20}...)
463 b = strconv.AppendInt(b, int64(t.Day()), 10)
468 // FmtDateLong returns the long date representation of 't' for 'si'
469 func (si *si) FmtDateLong(t time.Time) string {
471 b := make([]byte, 0, 32)
474 b = strconv.AppendInt(b, int64(t.Year()), 10)
476 b = strconv.AppendInt(b, int64(-t.Year()), 10)
479 b = append(b, []byte{0x20}...)
480 b = append(b, si.monthsWide[t.Month()]...)
481 b = append(b, []byte{0x20}...)
482 b = strconv.AppendInt(b, int64(t.Day()), 10)
487 // FmtDateFull returns the full date representation of 't' for 'si'
488 func (si *si) FmtDateFull(t time.Time) string {
490 b := make([]byte, 0, 32)
493 b = strconv.AppendInt(b, int64(t.Year()), 10)
495 b = strconv.AppendInt(b, int64(-t.Year()), 10)
498 b = append(b, []byte{0x20}...)
499 b = append(b, si.monthsWide[t.Month()]...)
500 b = append(b, []byte{0x20}...)
501 b = strconv.AppendInt(b, int64(t.Day()), 10)
502 b = append(b, []byte{0x2c, 0x20}...)
503 b = append(b, si.daysWide[t.Weekday()]...)
508 // FmtTimeShort returns the short time representation of 't' for 'si'
509 func (si *si) FmtTimeShort(t time.Time) string {
511 b := make([]byte, 0, 32)
517 b = strconv.AppendInt(b, int64(t.Hour()), 10)
518 b = append(b, []byte{0x2e}...)
524 b = strconv.AppendInt(b, int64(t.Minute()), 10)
529 // FmtTimeMedium returns the medium time representation of 't' for 'si'
530 func (si *si) FmtTimeMedium(t time.Time) string {
532 b := make([]byte, 0, 32)
538 b = strconv.AppendInt(b, int64(t.Hour()), 10)
539 b = append(b, []byte{0x2e}...)
545 b = strconv.AppendInt(b, int64(t.Minute()), 10)
546 b = append(b, []byte{0x2e}...)
552 b = strconv.AppendInt(b, int64(t.Second()), 10)
557 // FmtTimeLong returns the long time representation of 't' for 'si'
558 func (si *si) FmtTimeLong(t time.Time) string {
560 b := make([]byte, 0, 32)
566 b = strconv.AppendInt(b, int64(t.Hour()), 10)
567 b = append(b, []byte{0x2e}...)
573 b = strconv.AppendInt(b, int64(t.Minute()), 10)
574 b = append(b, []byte{0x2e}...)
580 b = strconv.AppendInt(b, int64(t.Second()), 10)
581 b = append(b, []byte{0x20}...)
589 // FmtTimeFull returns the full time representation of 't' for 'si'
590 func (si *si) FmtTimeFull(t time.Time) string {
592 b := make([]byte, 0, 32)
598 b = strconv.AppendInt(b, int64(t.Hour()), 10)
599 b = append(b, []byte{0x2e}...)
605 b = strconv.AppendInt(b, int64(t.Minute()), 10)
606 b = append(b, []byte{0x2e}...)
612 b = strconv.AppendInt(b, int64(t.Second()), 10)
613 b = append(b, []byte{0x20}...)
617 if btz, ok := si.timezones[tz]; ok {
618 b = append(b, btz...)