...

Source file src/github.com/go-playground/locales/se_FI/se_FI.go

Documentation: github.com/go-playground/locales/se_FI

     1  package se_FI
     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 se_FI 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  	percentSuffix          string
    22  	perMille               string
    23  	timeSeparator          string
    24  	inifinity              string
    25  	currencies             []string // idx = enum of currency code
    26  	currencyPositiveSuffix 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 'se_FI' locale
    46  func New() locales.Translator {
    47  	return &se_FI{
    48  		locale:                 "se_FI",
    49  		pluralsCardinal:        []locales.PluralRule{2, 3, 6},
    50  		pluralsOrdinal:         nil,
    51  		pluralsRange:           nil,
    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", "CNH", "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", "MRU", "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", "STN", "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", "UYW", "UZS", "VEB", "VEF", "VES", "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  		percentSuffix:          " ",
    61  		currencyPositiveSuffix: " ",
    62  		currencyNegativeSuffix: " ",
    63  		monthsAbbreviated:      []string{"", "cuoŋ"},
    64  		monthsNarrow:           []string{"", "O", "G", "N", "C", "M", "G", "S", "B", "Č", "G", "S", "J"},
    65  		monthsWide:             []string{"", "ođđajagemánnu", "guovvamánnu", "njukčamánnu", "cuoŋománnu", "miessemánnu", "geassemánnu", "suoidnemánnu", "borgemánnu", "čakčamánnu", "golggotmánnu", "skábmamánnu", "juovlamánnu"},
    66  		daysAbbreviated:        []string{"so", "má", "di", "ga", "du", "be", "lá"},
    67  		daysNarrow:             []string{"M", "D"},
    68  		daysShort:              []string{"so", "má", "di", "ga", "du", "be", "lá"},
    69  		daysWide:               []string{"mánnodat", "disdat", "gaskavahkku", "duorastat", "bearjadat", "lávvordat"},
    70  		periodsAbbreviated:     []string{"ib", "eb"},
    71  		periodsNarrow:          []string{"i", "e"},
    72  		periodsWide:            []string{"ib", "eb"},
    73  		erasAbbreviated:        []string{"oKr.", "mKr."},
    74  		erasNarrow:             []string{"", ""},
    75  		erasWide:               []string{"ovdal Kristusa", "maŋŋel Kristusa"},
    76  		timezones:              map[string]string{"ACDT": "Gaska-Austrália geasseáigi", "ACST": "Gaska-Austrália dálveáigi", "ACWDT": "Gaska-Austrália oarjjabeali geasseáigi", "ACWST": "Gaska-Austrália oarjjabeali dálveáigi", "ADT": "atlántalaš geasseáigi", "AEDT": "Nuorta-Austrália geasseáigi", "AEST": "Nuorta-Austrália dálveáigi", "AKDT": "Alaska geasseáigi", "AKST": "Alaska dálveáigi", "ARST": "Argentina geasseáigi", "ART": "Argentina dálveáigi", "AST": "atlántalaš dálveáigi", "AWDT": "Oarje-Austrália geasseáigi", "AWST": "Oarje-Austrália dálveáigi", "BOT": "Bolivia áigi", "BT": "Bhutana áigi", "CAT": "Gaska-Afrihká áigi", "CDT": "dábálaš geasseáigi", "CHADT": "Chathama geasseáigi", "CHAST": "Chathama dálveáigi", "CLST": "Chile geasseáigi", "CLT": "Chile dálveáigi", "COST": "Colombia geasseáigi", "COT": "Colombia dálveáigi", "CST": "dábálaš dálveáigi", "ChST": "Čamorro dálveáigi", "EAT": "Nuorta-Afrihká áigi", "ECT": "Ecuadora áigi", "EDT": "geasseáigi nuortan", "EST": "dálveáigi nuortan", "GFT": "Frankriikka Guyana áigi", "GMT": "Greenwicha áigi", "GST": "Golfa dálveáigi", "GYT": "Guyana áigi", "HADT": "Hawaii-aleuhtalaš geasseáigi", "HAST": "Hawaii-aleuhtalaš dálveáigi", "HAT": "Newfoundlanda geasseáigi", "HECU": "Cuba geasseáigi", "HEEG": "Nuorta-Ruonáeatnama geasseáigi", "HENOMX": "Oarjedavvi-Meksiko geasseáigi", "HEOG": "Oarje-Ruonáeatnama geasseáigi", "HEPM": "St. Pierre & Miquelo geasseáigi", "HEPMX": "Meksiko Jáskesábi geasseáigi", "HKST": "Hong Konga geasseáigi", "HKT": "Hong Konga dálveáigi", "HNCU": "Cuba dálveáigi", "HNEG": "Nuorta-Ruonáeatnama dálveáigi", "HNNOMX": "Oarjedavvi-Meksiko dálveáigi", "HNOG": "Oarje-Ruonáeatnama dálveáigi", "HNPM": "St. Pierre & Miquelo dálveáigi", "HNPMX": "Meksiko Jáskesábi dálveáigi", "HNT": "Newfoundlanda dálveáigi", "IST": "India dálveáigi", "JDT": "Japána geasseáigi", "JST": "Japána dálveáigi", "LHDT": "Lord Howe geasseáigi", "LHST": "Lord Howe dálveáigi", "MDT": "geasseduottaráigi", "MESZ": "Gaska-Eurohpá geasseáigi", "MEZ": "Gaska-Eurohpá dálveáigi", "MST": "dálveduottaráigi", "MYT": "Malesia áigi", "NZDT": "Ođđa-Selánda geasseáigi", "NZST": "Ođđa-Selánda dálveáigi", "OESZ": "Nuorta-Eurohpa geasseáigi", "OEZ": "Nuorta-Eurohpa dálveáigi", "PDT": "Jaskesábi geasseáigi", "PST": "Jaskesábi dálveáigi", "SAST": "Lulli-Afrihká dálveáigi", "SGT": "Singapore dálveáigi", "SRT": "Suriname áigi", "TMST": "Turkmenistana geasseáigi", "TMT": "Turkmenistana dálveáigi", "UYST": "Uruguaya geasseáigi", "UYT": "Uruguaya dálveáigi", "VET": "Venezuela áigi", "WARST": "Oarje-Argentina geasseáigi", "WART": "Oarje-Argentina dálveáigi", "WAST": "Oarje-Afrihká geasseáigi", "WAT": "Oarje-Afrihká dálveáigi", "WESZ": "Oarje-Eurohpá geasseáigi", "WEZ": "Oarje-Eurohpá dálveáigi", "WIB": "Oarje-Indonesia áigi", "WIT": "Nuorta-Indonesia áigi", "WITA": "Gaska-Indonesia áigi", "∅∅∅": "Peru geasseáigi"},
    77  	}
    78  }
    79  
    80  // Locale returns the current translators string locale
    81  func (se *se_FI) Locale() string {
    82  	return se.locale
    83  }
    84  
    85  // PluralsCardinal returns the list of cardinal plural rules associated with 'se_FI'
    86  func (se *se_FI) PluralsCardinal() []locales.PluralRule {
    87  	return se.pluralsCardinal
    88  }
    89  
    90  // PluralsOrdinal returns the list of ordinal plural rules associated with 'se_FI'
    91  func (se *se_FI) PluralsOrdinal() []locales.PluralRule {
    92  	return se.pluralsOrdinal
    93  }
    94  
    95  // PluralsRange returns the list of range plural rules associated with 'se_FI'
    96  func (se *se_FI) PluralsRange() []locales.PluralRule {
    97  	return se.pluralsRange
    98  }
    99  
   100  // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'se_FI'
   101  func (se *se_FI) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
   102  
   103  	n := math.Abs(num)
   104  
   105  	if n == 1 {
   106  		return locales.PluralRuleOne
   107  	} else if n == 2 {
   108  		return locales.PluralRuleTwo
   109  	}
   110  
   111  	return locales.PluralRuleOther
   112  }
   113  
   114  // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'se_FI'
   115  func (se *se_FI) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
   116  	return locales.PluralRuleUnknown
   117  }
   118  
   119  // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'se_FI'
   120  func (se *se_FI) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
   121  	return locales.PluralRuleUnknown
   122  }
   123  
   124  // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
   125  func (se *se_FI) MonthAbbreviated(month time.Month) string {
   126  	return se.monthsAbbreviated[month]
   127  }
   128  
   129  // MonthsAbbreviated returns the locales abbreviated months
   130  func (se *se_FI) MonthsAbbreviated() []string {
   131  	return se.monthsAbbreviated[1:]
   132  }
   133  
   134  // MonthNarrow returns the locales narrow month given the 'month' provided
   135  func (se *se_FI) MonthNarrow(month time.Month) string {
   136  	return se.monthsNarrow[month]
   137  }
   138  
   139  // MonthsNarrow returns the locales narrow months
   140  func (se *se_FI) MonthsNarrow() []string {
   141  	return se.monthsNarrow[1:]
   142  }
   143  
   144  // MonthWide returns the locales wide month given the 'month' provided
   145  func (se *se_FI) MonthWide(month time.Month) string {
   146  	return se.monthsWide[month]
   147  }
   148  
   149  // MonthsWide returns the locales wide months
   150  func (se *se_FI) MonthsWide() []string {
   151  	return se.monthsWide[1:]
   152  }
   153  
   154  // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
   155  func (se *se_FI) WeekdayAbbreviated(weekday time.Weekday) string {
   156  	return se.daysAbbreviated[weekday]
   157  }
   158  
   159  // WeekdaysAbbreviated returns the locales abbreviated weekdays
   160  func (se *se_FI) WeekdaysAbbreviated() []string {
   161  	return se.daysAbbreviated
   162  }
   163  
   164  // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
   165  func (se *se_FI) WeekdayNarrow(weekday time.Weekday) string {
   166  	return se.daysNarrow[weekday]
   167  }
   168  
   169  // WeekdaysNarrow returns the locales narrow weekdays
   170  func (se *se_FI) WeekdaysNarrow() []string {
   171  	return se.daysNarrow
   172  }
   173  
   174  // WeekdayShort returns the locales short weekday given the 'weekday' provided
   175  func (se *se_FI) WeekdayShort(weekday time.Weekday) string {
   176  	return se.daysShort[weekday]
   177  }
   178  
   179  // WeekdaysShort returns the locales short weekdays
   180  func (se *se_FI) WeekdaysShort() []string {
   181  	return se.daysShort
   182  }
   183  
   184  // WeekdayWide returns the locales wide weekday given the 'weekday' provided
   185  func (se *se_FI) WeekdayWide(weekday time.Weekday) string {
   186  	return se.daysWide[weekday]
   187  }
   188  
   189  // WeekdaysWide returns the locales wide weekdays
   190  func (se *se_FI) WeekdaysWide() []string {
   191  	return se.daysWide
   192  }
   193  
   194  // Decimal returns the decimal point of number
   195  func (se *se_FI) Decimal() string {
   196  	return se.decimal
   197  }
   198  
   199  // Group returns the group of number
   200  func (se *se_FI) Group() string {
   201  	return se.group
   202  }
   203  
   204  // Group returns the minus sign of number
   205  func (se *se_FI) Minus() string {
   206  	return se.minus
   207  }
   208  
   209  // FmtNumber returns 'num' with digits/precision of 'v' for 'se_FI' and handles both Whole and Real numbers based on 'v'
   210  func (se *se_FI) FmtNumber(num float64, v uint64) string {
   211  
   212  	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
   213  	l := len(s) + 4 + 2*len(s[:len(s)-int(v)-1])/3
   214  	count := 0
   215  	inWhole := v == 0
   216  	b := make([]byte, 0, l)
   217  
   218  	for i := len(s) - 1; i >= 0; i-- {
   219  
   220  		if s[i] == '.' {
   221  			b = append(b, se.decimal[0])
   222  			inWhole = true
   223  			continue
   224  		}
   225  
   226  		if inWhole {
   227  			if count == 3 {
   228  				for j := len(se.group) - 1; j >= 0; j-- {
   229  					b = append(b, se.group[j])
   230  				}
   231  				count = 1
   232  			} else {
   233  				count++
   234  			}
   235  		}
   236  
   237  		b = append(b, s[i])
   238  	}
   239  
   240  	if num < 0 {
   241  		for j := len(se.minus) - 1; j >= 0; j-- {
   242  			b = append(b, se.minus[j])
   243  		}
   244  	}
   245  
   246  	// reverse
   247  	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
   248  		b[i], b[j] = b[j], b[i]
   249  	}
   250  
   251  	return string(b)
   252  }
   253  
   254  // FmtPercent returns 'num' with digits/precision of 'v' for 'se_FI' and handles both Whole and Real numbers based on 'v'
   255  // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
   256  func (se *se_FI) FmtPercent(num float64, v uint64) string {
   257  	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
   258  	l := len(s) + 7
   259  	b := make([]byte, 0, l)
   260  
   261  	for i := len(s) - 1; i >= 0; i-- {
   262  
   263  		if s[i] == '.' {
   264  			b = append(b, se.decimal[0])
   265  			continue
   266  		}
   267  
   268  		b = append(b, s[i])
   269  	}
   270  
   271  	if num < 0 {
   272  		for j := len(se.minus) - 1; j >= 0; j-- {
   273  			b = append(b, se.minus[j])
   274  		}
   275  	}
   276  
   277  	// reverse
   278  	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
   279  		b[i], b[j] = b[j], b[i]
   280  	}
   281  
   282  	b = append(b, se.percentSuffix...)
   283  
   284  	b = append(b, se.percent...)
   285  
   286  	return string(b)
   287  }
   288  
   289  // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'se_FI'
   290  func (se *se_FI) FmtCurrency(num float64, v uint64, currency currency.Type) string {
   291  
   292  	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
   293  	symbol := se.currencies[currency]
   294  	l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3
   295  	count := 0
   296  	inWhole := v == 0
   297  	b := make([]byte, 0, l)
   298  
   299  	for i := len(s) - 1; i >= 0; i-- {
   300  
   301  		if s[i] == '.' {
   302  			b = append(b, se.decimal[0])
   303  			inWhole = true
   304  			continue
   305  		}
   306  
   307  		if inWhole {
   308  			if count == 3 {
   309  				for j := len(se.group) - 1; j >= 0; j-- {
   310  					b = append(b, se.group[j])
   311  				}
   312  				count = 1
   313  			} else {
   314  				count++
   315  			}
   316  		}
   317  
   318  		b = append(b, s[i])
   319  	}
   320  
   321  	if num < 0 {
   322  		for j := len(se.minus) - 1; j >= 0; j-- {
   323  			b = append(b, se.minus[j])
   324  		}
   325  	}
   326  
   327  	// reverse
   328  	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
   329  		b[i], b[j] = b[j], b[i]
   330  	}
   331  
   332  	if int(v) < 2 {
   333  
   334  		if v == 0 {
   335  			b = append(b, se.decimal...)
   336  		}
   337  
   338  		for i := 0; i < 2-int(v); i++ {
   339  			b = append(b, '0')
   340  		}
   341  	}
   342  
   343  	b = append(b, se.currencyPositiveSuffix...)
   344  
   345  	b = append(b, symbol...)
   346  
   347  	return string(b)
   348  }
   349  
   350  // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'se_FI'
   351  // in accounting notation.
   352  func (se *se_FI) FmtAccounting(num float64, v uint64, currency currency.Type) string {
   353  
   354  	s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
   355  	symbol := se.currencies[currency]
   356  	l := len(s) + len(symbol) + 6 + 2*len(s[:len(s)-int(v)-1])/3
   357  	count := 0
   358  	inWhole := v == 0
   359  	b := make([]byte, 0, l)
   360  
   361  	for i := len(s) - 1; i >= 0; i-- {
   362  
   363  		if s[i] == '.' {
   364  			b = append(b, se.decimal[0])
   365  			inWhole = true
   366  			continue
   367  		}
   368  
   369  		if inWhole {
   370  			if count == 3 {
   371  				for j := len(se.group) - 1; j >= 0; j-- {
   372  					b = append(b, se.group[j])
   373  				}
   374  				count = 1
   375  			} else {
   376  				count++
   377  			}
   378  		}
   379  
   380  		b = append(b, s[i])
   381  	}
   382  
   383  	if num < 0 {
   384  
   385  		for j := len(se.minus) - 1; j >= 0; j-- {
   386  			b = append(b, se.minus[j])
   387  		}
   388  
   389  	}
   390  
   391  	// reverse
   392  	for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
   393  		b[i], b[j] = b[j], b[i]
   394  	}
   395  
   396  	if int(v) < 2 {
   397  
   398  		if v == 0 {
   399  			b = append(b, se.decimal...)
   400  		}
   401  
   402  		for i := 0; i < 2-int(v); i++ {
   403  			b = append(b, '0')
   404  		}
   405  	}
   406  
   407  	if num < 0 {
   408  		b = append(b, se.currencyNegativeSuffix...)
   409  		b = append(b, symbol...)
   410  	} else {
   411  
   412  		b = append(b, se.currencyPositiveSuffix...)
   413  		b = append(b, symbol...)
   414  	}
   415  
   416  	return string(b)
   417  }
   418  
   419  // FmtDateShort returns the short date representation of 't' for 'se_FI'
   420  func (se *se_FI) FmtDateShort(t time.Time) string {
   421  
   422  	b := make([]byte, 0, 32)
   423  
   424  	if t.Day() < 10 {
   425  		b = append(b, '0')
   426  	}
   427  
   428  	b = strconv.AppendInt(b, int64(t.Day()), 10)
   429  	b = append(b, []byte{0x2e}...)
   430  
   431  	if t.Month() < 10 {
   432  		b = append(b, '0')
   433  	}
   434  
   435  	b = strconv.AppendInt(b, int64(t.Month()), 10)
   436  
   437  	b = append(b, []byte{0x2e}...)
   438  
   439  	if t.Year() > 0 {
   440  		b = strconv.AppendInt(b, int64(t.Year()), 10)
   441  	} else {
   442  		b = strconv.AppendInt(b, int64(-t.Year()), 10)
   443  	}
   444  
   445  	return string(b)
   446  }
   447  
   448  // FmtDateMedium returns the medium date representation of 't' for 'se_FI'
   449  func (se *se_FI) FmtDateMedium(t time.Time) string {
   450  
   451  	b := make([]byte, 0, 32)
   452  
   453  	b = strconv.AppendInt(b, int64(t.Day()), 10)
   454  	b = append(b, []byte{0x20}...)
   455  	b = append(b, se.monthsAbbreviated[t.Month()]...)
   456  	b = append(b, []byte{0x20}...)
   457  
   458  	if t.Year() > 0 {
   459  		b = strconv.AppendInt(b, int64(t.Year()), 10)
   460  	} else {
   461  		b = strconv.AppendInt(b, int64(-t.Year()), 10)
   462  	}
   463  
   464  	return string(b)
   465  }
   466  
   467  // FmtDateLong returns the long date representation of 't' for 'se_FI'
   468  func (se *se_FI) FmtDateLong(t time.Time) string {
   469  
   470  	b := make([]byte, 0, 32)
   471  
   472  	b = strconv.AppendInt(b, int64(t.Day()), 10)
   473  	b = append(b, []byte{0x20}...)
   474  	b = append(b, se.monthsWide[t.Month()]...)
   475  	b = append(b, []byte{0x20}...)
   476  
   477  	if t.Year() > 0 {
   478  		b = strconv.AppendInt(b, int64(t.Year()), 10)
   479  	} else {
   480  		b = strconv.AppendInt(b, int64(-t.Year()), 10)
   481  	}
   482  
   483  	return string(b)
   484  }
   485  
   486  // FmtDateFull returns the full date representation of 't' for 'se_FI'
   487  func (se *se_FI) FmtDateFull(t time.Time) string {
   488  
   489  	b := make([]byte, 0, 32)
   490  
   491  	b = append(b, se.daysWide[t.Weekday()]...)
   492  	b = append(b, []byte{0x20}...)
   493  	b = strconv.AppendInt(b, int64(t.Day()), 10)
   494  	b = append(b, []byte{0x20}...)
   495  	b = append(b, se.monthsWide[t.Month()]...)
   496  	b = append(b, []byte{0x20}...)
   497  
   498  	if t.Year() > 0 {
   499  		b = strconv.AppendInt(b, int64(t.Year()), 10)
   500  	} else {
   501  		b = strconv.AppendInt(b, int64(-t.Year()), 10)
   502  	}
   503  
   504  	return string(b)
   505  }
   506  
   507  // FmtTimeShort returns the short time representation of 't' for 'se_FI'
   508  func (se *se_FI) FmtTimeShort(t time.Time) string {
   509  
   510  	b := make([]byte, 0, 32)
   511  
   512  	if t.Hour() < 10 {
   513  		b = append(b, '0')
   514  	}
   515  
   516  	b = strconv.AppendInt(b, int64(t.Hour()), 10)
   517  	b = append(b, se.timeSeparator...)
   518  
   519  	if t.Minute() < 10 {
   520  		b = append(b, '0')
   521  	}
   522  
   523  	b = strconv.AppendInt(b, int64(t.Minute()), 10)
   524  
   525  	return string(b)
   526  }
   527  
   528  // FmtTimeMedium returns the medium time representation of 't' for 'se_FI'
   529  func (se *se_FI) FmtTimeMedium(t time.Time) string {
   530  
   531  	b := make([]byte, 0, 32)
   532  
   533  	if t.Hour() < 10 {
   534  		b = append(b, '0')
   535  	}
   536  
   537  	b = strconv.AppendInt(b, int64(t.Hour()), 10)
   538  	b = append(b, se.timeSeparator...)
   539  
   540  	if t.Minute() < 10 {
   541  		b = append(b, '0')
   542  	}
   543  
   544  	b = strconv.AppendInt(b, int64(t.Minute()), 10)
   545  	b = append(b, se.timeSeparator...)
   546  
   547  	if t.Second() < 10 {
   548  		b = append(b, '0')
   549  	}
   550  
   551  	b = strconv.AppendInt(b, int64(t.Second()), 10)
   552  
   553  	return string(b)
   554  }
   555  
   556  // FmtTimeLong returns the long time representation of 't' for 'se_FI'
   557  func (se *se_FI) FmtTimeLong(t time.Time) string {
   558  
   559  	b := make([]byte, 0, 32)
   560  
   561  	if t.Hour() < 10 {
   562  		b = append(b, '0')
   563  	}
   564  
   565  	b = strconv.AppendInt(b, int64(t.Hour()), 10)
   566  	b = append(b, se.timeSeparator...)
   567  
   568  	if t.Minute() < 10 {
   569  		b = append(b, '0')
   570  	}
   571  
   572  	b = strconv.AppendInt(b, int64(t.Minute()), 10)
   573  	b = append(b, se.timeSeparator...)
   574  
   575  	if t.Second() < 10 {
   576  		b = append(b, '0')
   577  	}
   578  
   579  	b = strconv.AppendInt(b, int64(t.Second()), 10)
   580  	b = append(b, []byte{0x20}...)
   581  
   582  	tz, _ := t.Zone()
   583  	b = append(b, tz...)
   584  
   585  	return string(b)
   586  }
   587  
   588  // FmtTimeFull returns the full time representation of 't' for 'se_FI'
   589  func (se *se_FI) FmtTimeFull(t time.Time) string {
   590  
   591  	b := make([]byte, 0, 32)
   592  
   593  	if t.Hour() < 10 {
   594  		b = append(b, '0')
   595  	}
   596  
   597  	b = strconv.AppendInt(b, int64(t.Hour()), 10)
   598  	b = append(b, se.timeSeparator...)
   599  
   600  	if t.Minute() < 10 {
   601  		b = append(b, '0')
   602  	}
   603  
   604  	b = strconv.AppendInt(b, int64(t.Minute()), 10)
   605  	b = append(b, se.timeSeparator...)
   606  
   607  	if t.Second() < 10 {
   608  		b = append(b, '0')
   609  	}
   610  
   611  	b = strconv.AppendInt(b, int64(t.Second()), 10)
   612  	b = append(b, []byte{0x20}...)
   613  
   614  	tz, _ := t.Zone()
   615  
   616  	if btz, ok := se.timezones[tz]; ok {
   617  		b = append(b, btz...)
   618  	} else {
   619  		b = append(b, tz...)
   620  	}
   621  
   622  	return string(b)
   623  }
   624  

View as plain text