ee.go 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. package ee
  2. import (
  3. "math"
  4. "strconv"
  5. "time"
  6. "github.com/go-playground/locales"
  7. "github.com/go-playground/locales/currency"
  8. )
  9. type ee struct {
  10. locale string
  11. pluralsCardinal []locales.PluralRule
  12. pluralsOrdinal []locales.PluralRule
  13. pluralsRange []locales.PluralRule
  14. decimal []byte
  15. group []byte
  16. minus []byte
  17. percent []byte
  18. perMille []byte
  19. timeSeparator []byte
  20. inifinity []byte
  21. currencies [][]byte // idx = enum of currency code
  22. currencyNegativePrefix []byte
  23. currencyNegativeSuffix []byte
  24. monthsAbbreviated [][]byte
  25. monthsNarrow [][]byte
  26. monthsWide [][]byte
  27. daysAbbreviated [][]byte
  28. daysNarrow [][]byte
  29. daysShort [][]byte
  30. daysWide [][]byte
  31. periodsAbbreviated [][]byte
  32. periodsNarrow [][]byte
  33. periodsShort [][]byte
  34. periodsWide [][]byte
  35. erasAbbreviated [][]byte
  36. erasNarrow [][]byte
  37. erasWide [][]byte
  38. timezones map[string][]byte
  39. }
  40. // New returns a new instance of translator for the 'ee' locale
  41. func New() locales.Translator {
  42. return &ee{
  43. locale: "ee",
  44. pluralsCardinal: []locales.PluralRule{2, 6},
  45. pluralsOrdinal: nil,
  46. pluralsRange: nil,
  47. decimal: []byte{},
  48. group: []byte{},
  49. minus: []byte{},
  50. percent: []byte{},
  51. perMille: []byte{},
  52. timeSeparator: []byte{0x3a},
  53. currencies: [][]uint8{{0x41, 0x44, 0x50, 0x20}, {0x41, 0x45, 0x44, 0x20}, {0x41, 0x46, 0x41, 0x20}, {0x41, 0x46, 0x4e, 0x20}, {0x41, 0x4c, 0x4b, 0x20}, {0x41, 0x4c, 0x4c, 0x20}, {0x41, 0x4d, 0x44, 0x20}, {0x41, 0x4e, 0x47, 0x20}, {0x41, 0x4f, 0x41, 0x20}, {0x41, 0x4f, 0x4b, 0x20}, {0x41, 0x4f, 0x4e, 0x20}, {0x41, 0x4f, 0x52, 0x20}, {0x41, 0x52, 0x41, 0x20}, {0x41, 0x52, 0x4c, 0x20}, {0x41, 0x52, 0x4d, 0x20}, {0x41, 0x52, 0x50, 0x20}, {0x41, 0x52, 0x53, 0x20}, {0x41, 0x54, 0x53, 0x20}, {0x41, 0x55, 0x24}, {0x41, 0x57, 0x47, 0x20}, {0x41, 0x5a, 0x4d, 0x20}, {0x41, 0x5a, 0x4e, 0x20}, {0x42, 0x41, 0x44, 0x20}, {0x42, 0x41, 0x4d, 0x20}, {0x42, 0x41, 0x4e, 0x20}, {0x42, 0x42, 0x44, 0x20}, {0x42, 0x44, 0x54, 0x20}, {0x42, 0x45, 0x43, 0x20}, {0x42, 0x45, 0x46, 0x20}, {0x42, 0x45, 0x4c, 0x20}, {0x42, 0x47, 0x4c, 0x20}, {0x42, 0x47, 0x4d, 0x20}, {0x42, 0x47, 0x4e, 0x20}, {0x42, 0x47, 0x4f, 0x20}, {0x42, 0x48, 0x44, 0x20}, {0x42, 0x49, 0x46, 0x20}, {0x42, 0x4d, 0x44, 0x20}, {0x42, 0x4e, 0x44, 0x20}, {0x42, 0x4f, 0x42, 0x20}, {0x42, 0x4f, 0x4c, 0x20}, {0x42, 0x4f, 0x50, 0x20}, {0x42, 0x4f, 0x56, 0x20}, {0x42, 0x52, 0x42, 0x20}, {0x42, 0x52, 0x43, 0x20}, {0x42, 0x52, 0x45, 0x20}, {0x52, 0x24}, {0x42, 0x52, 0x4e, 0x20}, {0x42, 0x52, 0x52, 0x20}, {0x42, 0x52, 0x5a, 0x20}, {0x42, 0x53, 0x44, 0x20}, {0x42, 0x54, 0x4e, 0x20}, {0x42, 0x55, 0x4b, 0x20}, {0x42, 0x57, 0x50, 0x20}, {0x42, 0x59, 0x42, 0x20}, {0x42, 0x59, 0x52, 0x20}, {0x42, 0x5a, 0x44, 0x20}, {0x43, 0x41, 0x24}, {0x43, 0x44, 0x46, 0x20}, {0x43, 0x48, 0x45, 0x20}, {0x43, 0x48, 0x46}, {0x43, 0x48, 0x57, 0x20}, {0x43, 0x4c, 0x45, 0x20}, {0x43, 0x4c, 0x46, 0x20}, {0x43, 0x4c, 0x50, 0x20}, {0x43, 0x4e, 0x58, 0x20}, {0x43, 0x4e, 0xc2, 0xa5}, {0x43, 0x4f, 0x50, 0x20}, {0x43, 0x4f, 0x55, 0x20}, {0x43, 0x52, 0x43, 0x20}, {0x43, 0x53, 0x44, 0x20}, {0x43, 0x53, 0x4b, 0x20}, {0x43, 0x55, 0x43, 0x20}, {0x43, 0x55, 0x50, 0x20}, {0x43, 0x56, 0x45, 0x20}, {0x43, 0x59, 0x50, 0x20}, {0x43, 0x5a, 0x4b, 0x20}, {0x44, 0x44, 0x4d, 0x20}, {0x44, 0x45, 0x4d, 0x20}, {0x44, 0x4a, 0x46, 0x20}, {0x44, 0x4b, 0x4b}, {0x44, 0x4f, 0x50, 0x20}, {0x44, 0x5a, 0x44, 0x20}, {0x45, 0x43, 0x53, 0x20}, {0x45, 0x43, 0x56, 0x20}, {0x45, 0x45, 0x4b, 0x20}, {0x45, 0x47, 0x50, 0x20}, {0x45, 0x52, 0x4e, 0x20}, {0x45, 0x53, 0x41, 0x20}, {0x45, 0x53, 0x42, 0x20}, {0x45, 0x53, 0x50, 0x20}, {0x45, 0x54, 0x42, 0x20}, {0xe2, 0x82, 0xac}, {0x46, 0x49, 0x4d, 0x20}, {0x46, 0x4a, 0x44, 0x20}, {0x46, 0x4b, 0x50, 0x20}, {0x46, 0x52, 0x46, 0x20}, {0xc2, 0xa3}, {0x47, 0x45, 0x4b, 0x20}, {0x47, 0x45, 0x4c, 0x20}, {0x47, 0x48, 0x43, 0x20}, {0x47, 0x48, 0xe2, 0x82, 0xb5}, {0x47, 0x49, 0x50, 0x20}, {0x47, 0x4d, 0x44, 0x20}, {0x47, 0x4e, 0x46, 0x20}, {0x47, 0x4e, 0x53, 0x20}, {0x47, 0x51, 0x45, 0x20}, {0x47, 0x52, 0x44, 0x20}, {0x47, 0x54, 0x51, 0x20}, {0x47, 0x57, 0x45, 0x20}, {0x47, 0x57, 0x50, 0x20}, {0x47, 0x59, 0x44, 0x20}, {0x48, 0x4b, 0x24}, {0x48, 0x4e, 0x4c, 0x20}, {0x48, 0x52, 0x44, 0x20}, {0x48, 0x52, 0x4b, 0x20}, {0x48, 0x54, 0x47, 0x20}, {0x48, 0x55, 0x46, 0x20}, {0x49, 0x44, 0x52}, {0x49, 0x45, 0x50, 0x20}, {0x49, 0x4c, 0x50, 0x20}, {0x49, 0x4c, 0x52, 0x20}, {0xe2, 0x82, 0xaa}, {0xe2, 0x82, 0xb9}, {0x49, 0x51, 0x44, 0x20}, {0x49, 0x52, 0x52, 0x20}, {0x49, 0x53, 0x4a, 0x20}, {0x49, 0x53, 0x4b, 0x20}, {0x49, 0x54, 0x4c, 0x20}, {0x4a, 0x4d, 0x44, 0x20}, {0x4a, 0x4f, 0x44, 0x20}, {0x4a, 0x50, 0xc2, 0xa5}, {0x4b, 0x45, 0x53, 0x20}, {0x4b, 0x47, 0x53, 0x20}, {0x4b, 0x48, 0x52, 0x20}, {0x4b, 0x4d, 0x46, 0x20}, {0x4b, 0x50, 0x57, 0x20}, {0x4b, 0x52, 0x48, 0x20}, {0x4b, 0x52, 0x4f, 0x20}, {0xe2, 0x82, 0xa9}, {0x4b, 0x57, 0x44, 0x20}, {0x4b, 0x59, 0x44, 0x20}, {0x4b, 0x5a, 0x54, 0x20}, {0x4c, 0x41, 0x4b, 0x20}, {0x4c, 0x42, 0x50, 0x20}, {0x4c, 0x4b, 0x52, 0x20}, {0x4c, 0x52, 0x44, 0x20}, {0x4c, 0x53, 0x4c, 0x20}, {0x4c, 0x54, 0x4c, 0x20}, {0x4c, 0x54, 0x54, 0x20}, {0x4c, 0x55, 0x43, 0x20}, {0x4c, 0x55, 0x46, 0x20}, {0x4c, 0x55, 0x4c, 0x20}, {0x4c, 0x56, 0x4c, 0x20}, {0x4c, 0x56, 0x52, 0x20}, {0x4c, 0x59, 0x44, 0x20}, {0x4d, 0x41, 0x44, 0x20}, {0x4d, 0x41, 0x46, 0x20}, {0x4d, 0x43, 0x46, 0x20}, {0x4d, 0x44, 0x43, 0x20}, {0x4d, 0x44, 0x4c, 0x20}, {0x4d, 0x47, 0x41, 0x20}, {0x4d, 0x47, 0x46, 0x20}, {0x4d, 0x4b, 0x44, 0x20}, {0x4d, 0x4b, 0x4e, 0x20}, {0x4d, 0x4c, 0x46, 0x20}, {0x4d, 0x4d, 0x4b, 0x20}, {0x4d, 0x4e, 0x54, 0x20}, {0x4d, 0x4f, 0x50, 0x20}, {0x4d, 0x52, 0x4f, 0x20}, {0x4d, 0x54, 0x4c, 0x20}, {0x4d, 0x54, 0x50, 0x20}, {0x4d, 0x55, 0x52, 0x20}, {0x4d, 0x56, 0x50, 0x20}, {0x4d, 0x56, 0x52, 0x20}, {0x4d, 0x57, 0x4b, 0x20}, {0x4d, 0x58, 0x24}, {0x4d, 0x58, 0x50, 0x20}, {0x4d, 0x58, 0x56, 0x20}, {0x4d, 0x59, 0x52, 0x20}, {0x4d, 0x5a, 0x45, 0x20}, {0x4d, 0x5a, 0x4d, 0x20}, {0x4d, 0x5a, 0x4e, 0x20}, {0x4e, 0x41, 0x44, 0x20}, {0x4e, 0x47, 0x4e, 0x20}, {0x4e, 0x49, 0x43, 0x20}, {0x4e, 0x49, 0x4f, 0x20}, {0x4e, 0x4c, 0x47, 0x20}, {0x4e, 0x4f, 0x4b}, {0x4e, 0x50, 0x52, 0x20}, {0x4e, 0x5a, 0x24}, {0x4f, 0x4d, 0x52, 0x20}, {0x50, 0x41, 0x42, 0x20}, {0x50, 0x45, 0x49, 0x20}, {0x50, 0x45, 0x4e, 0x20}, {0x50, 0x45, 0x53, 0x20}, {0x50, 0x47, 0x4b, 0x20}, {0x50, 0x48, 0x50, 0x20}, {0x50, 0x4b, 0x52, 0x20}, {0x50, 0x4c, 0x4e, 0x20}, {0x50, 0x4c, 0x5a, 0x20}, {0x50, 0x54, 0x45, 0x20}, {0x50, 0x59, 0x47, 0x20}, {0x51, 0x41, 0x52, 0x20}, {0x52, 0x48, 0x44, 0x20}, {0x52, 0x4f, 0x4c, 0x20}, {0x52, 0x4f, 0x4e, 0x20}, {0x52, 0x53, 0x44, 0x20}, {0x52, 0x55, 0x42}, {0x52, 0x55, 0x52, 0x20}, {0x52, 0x57, 0x46, 0x20}, {0x53, 0x41, 0x52}, {0x53, 0x42, 0x44, 0x20}, {0x53, 0x43, 0x52, 0x20}, {0x53, 0x44, 0x44, 0x20}, {0x53, 0x44, 0x47, 0x20}, {0x53, 0x44, 0x50, 0x20}, {0x53, 0x45, 0x4b}, {0x53, 0x47, 0x44, 0x20}, {0x53, 0x48, 0x50, 0x20}, {0x53, 0x49, 0x54, 0x20}, {0x53, 0x4b, 0x4b, 0x20}, {0x53, 0x4c, 0x4c, 0x20}, {0x53, 0x4f, 0x53, 0x20}, {0x53, 0x52, 0x44, 0x20}, {0x53, 0x52, 0x47, 0x20}, {0x53, 0x53, 0x50, 0x20}, {0x53, 0x54, 0x44, 0x20}, {0x53, 0x55, 0x52, 0x20}, {0x53, 0x56, 0x43, 0x20}, {0x53, 0x59, 0x50, 0x20}, {0x53, 0x5a, 0x4c, 0x20}, {0xe0, 0xb8, 0xbf}, {0x54, 0x4a, 0x52, 0x20}, {0x54, 0x4a, 0x53, 0x20}, {0x54, 0x4d, 0x4d, 0x20}, {0x54, 0x4d, 0x54, 0x20}, {0x54, 0x4e, 0x44, 0x20}, {0x54, 0x4f, 0x50, 0x20}, {0x54, 0x50, 0x45, 0x20}, {0x54, 0x52, 0x4c, 0x20}, {0x54, 0x52, 0x59}, {0x54, 0x54, 0x44, 0x20}, {0x4e, 0x54, 0x24}, {0x54, 0x5a, 0x53, 0x20}, {0x55, 0x41, 0x48, 0x20}, {0x55, 0x41, 0x4b, 0x20}, {0x55, 0x47, 0x53, 0x20}, {0x55, 0x47, 0x58, 0x20}, {0x55, 0x53, 0x24}, {0x55, 0x53, 0x4e, 0x20}, {0x55, 0x53, 0x53, 0x20}, {0x55, 0x59, 0x49, 0x20}, {0x55, 0x59, 0x50, 0x20}, {0x55, 0x59, 0x55, 0x20}, {0x55, 0x5a, 0x53, 0x20}, {0x56, 0x45, 0x42, 0x20}, {0x56, 0x45, 0x46, 0x20}, {0xe2, 0x82, 0xab}, {0x56, 0x4e, 0x4e, 0x20}, {0x56, 0x55, 0x56, 0x20}, {0x57, 0x53, 0x54, 0x20}, {0x58, 0x41, 0x46, 0x20}, {0x58, 0x41, 0x47, 0x20}, {0x58, 0x41, 0x55, 0x20}, {0x58, 0x42, 0x41, 0x20}, {0x58, 0x42, 0x42, 0x20}, {0x58, 0x42, 0x43, 0x20}, {0x58, 0x42, 0x44, 0x20}, {0x45, 0x43, 0x24}, {0x58, 0x44, 0x52, 0x20}, {0x58, 0x45, 0x55, 0x20}, {0x58, 0x46, 0x4f, 0x20}, {0x58, 0x46, 0x55, 0x20}, {0x58, 0x4f, 0x46, 0x20}, {0x58, 0x50, 0x44, 0x20}, {0x58, 0x50, 0x46, 0x20}, {0x58, 0x50, 0x54, 0x20}, {0x58, 0x52, 0x45, 0x20}, {0x58, 0x53, 0x55, 0x20}, {0x58, 0x54, 0x53, 0x20}, {0x58, 0x55, 0x41, 0x20}, {0x58, 0x58, 0x58, 0x20}, {0x59, 0x44, 0x44, 0x20}, {0x59, 0x45, 0x52, 0x20}, {0x59, 0x55, 0x44, 0x20}, {0x59, 0x55, 0x4d, 0x20}, {0x59, 0x55, 0x4e, 0x20}, {0x59, 0x55, 0x52, 0x20}, {0x5a, 0x41, 0x4c, 0x20}, {0x5a, 0x41, 0x52}, {0x5a, 0x4d, 0x4b, 0x20}, {0x5a, 0x4d, 0x57, 0x20}, {0x5a, 0x52, 0x4e, 0x20}, {0x5a, 0x52, 0x5a, 0x20}, {0x5a, 0x57, 0x44, 0x20}, {0x5a, 0x57, 0x4c, 0x20}, {0x5a, 0x57, 0x52, 0x20}},
  54. currencyNegativePrefix: []byte{0x28},
  55. currencyNegativeSuffix: []byte{0x29},
  56. monthsAbbreviated: [][]uint8{[]uint8(nil), {0x64, 0x7a, 0x76}, {0x64, 0x7a, 0x64}, {0x74, 0x65, 0x64}, {0x61, 0x66, 0xc9, 0x94}, {0x64, 0x61, 0x6d}, {0x6d, 0x61, 0x73}, {0x73, 0x69, 0x61}, {0x64, 0x65, 0x61}, {0x61, 0x6e, 0x79}, {0x6b, 0x65, 0x6c}, {0x61, 0x64, 0x65}, {0x64, 0x7a, 0x6d}},
  57. monthsNarrow: [][]uint8{[]uint8(nil), {0x64}, {0x64}, {0x74}, {0x61}, {0x64}, {0x6d}, {0x73}, {0x64}, {0x61}, {0x6b}, {0x61}, {0x64}},
  58. monthsWide: [][]uint8{[]uint8(nil), {0x64, 0x7a, 0x6f, 0x76, 0x65}, {0x64, 0x7a, 0x6f, 0x64, 0x7a, 0x65}, {0x74, 0x65, 0x64, 0x6f, 0x78, 0x65}, {0x61, 0x66, 0xc9, 0x94, 0x66, 0xc4, 0xa9, 0x65}, {0x64, 0x61, 0x6d, 0x61}, {0x6d, 0x61, 0x73, 0x61}, {0x73, 0x69, 0x61, 0x6d, 0x6c, 0xc9, 0x94, 0x6d}, {0x64, 0x65, 0x61, 0x73, 0x69, 0x61, 0x6d, 0x69, 0x6d, 0x65}, {0x61, 0x6e, 0x79, 0xc9, 0x94, 0x6e, 0x79, 0xc9, 0x94}, {0x6b, 0x65, 0x6c, 0x65}, {0x61, 0x64, 0x65, 0xc9, 0x9b, 0x6d, 0x65, 0x6b, 0x70, 0xc9, 0x94, 0x78, 0x65}, {0x64, 0x7a, 0x6f, 0x6d, 0x65}},
  59. daysAbbreviated: [][]uint8{{0x6b, 0xc9, 0x94, 0x73}, {0x64, 0x7a, 0x6f}, {0x62, 0x6c, 0x61}, {0x6b, 0x75, 0xc9, 0x96}, {0x79, 0x61, 0x77}, {0x66, 0x69, 0xc9, 0x96}, {0x6d, 0x65, 0x6d}},
  60. daysNarrow: [][]uint8{{0x6b}, {0x64}, {0x62}, {0x6b}, {0x79}, {0x66}, {0x6d}},
  61. daysShort: [][]uint8{{0x6b, 0xc9, 0x94, 0x73}, {0x64, 0x7a, 0x6f}, {0x62, 0x6c, 0x61}, {0x6b, 0x75, 0xc9, 0x96}, {0x79, 0x61, 0x77}, {0x66, 0x69, 0xc9, 0x96}, {0x6d, 0x65, 0x6d}},
  62. daysWide: [][]uint8{{0x6b, 0xc9, 0x94, 0x73, 0x69, 0xc9, 0x96, 0x61}, {0x64, 0x7a, 0x6f, 0xc9, 0x96, 0x61}, {0x62, 0x6c, 0x61, 0xc9, 0x96, 0x61}, {0x6b, 0x75, 0xc9, 0x96, 0x61}, {0x79, 0x61, 0x77, 0x6f, 0xc9, 0x96, 0x61}, {0x66, 0x69, 0xc9, 0x96, 0x61}, {0x6d, 0x65, 0x6d, 0x6c, 0x65, 0xc9, 0x96, 0x61}},
  63. periodsAbbreviated: [][]uint8{{0xc5, 0x8b, 0x64, 0x69}, {0xc9, 0xa3, 0x65, 0x74, 0x72, 0xc9, 0x94}},
  64. periodsNarrow: [][]uint8{{0xc5, 0x8b}, {0xc9, 0xa3}},
  65. periodsWide: [][]uint8{{0xc5, 0x8b, 0x64, 0x69}, {0xc9, 0xa3, 0x65, 0x74, 0x72, 0xc9, 0x94}},
  66. erasAbbreviated: [][]uint8{{0x68, 0x59}, {0x59, 0xc5, 0x8b}},
  67. erasNarrow: [][]uint8{{0x68, 0x59}, {0x59, 0xc5, 0x8b}},
  68. erasWide: [][]uint8{{0x48, 0x61, 0x66, 0x69, 0x20, 0x59, 0x65, 0x73, 0x75, 0x20, 0x56, 0x61, 0x20, 0x44, 0x6f, 0x20, 0xc5, 0x8b, 0x67, 0xc9, 0x94}, {0x59, 0x65, 0x73, 0x75, 0x20, 0xc5, 0x8a, 0xc9, 0x94, 0x6c, 0x69}},
  69. timezones: map[string][]uint8{"GMT": {0x47, 0x72, 0x65, 0x65, 0x6e, 0x77, 0x69, 0x63, 0x68, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "NZDT": {0x4e, 0x5a, 0x44, 0x54}, "WAST": {0xc6, 0x94, 0x65, 0x74, 0x6f, 0xc9, 0x96, 0x6f, 0xc6, 0x92, 0x65, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "CLST": {0x54, 0x73, 0x69, 0x6c, 0x65, 0x20, 0x64, 0x7a, 0x6f, 0x6d, 0x65, 0xc5, 0x8b, 0xc9, 0x94, 0x6c, 0x69, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "UYT": {0x55, 0x72, 0x75, 0x67, 0x75, 0x61, 0x69, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "IST": {0x49, 0x53, 0x54}, "AEDT": {0xc6, 0x94, 0x65, 0x64, 0x7a, 0x65, 0xc6, 0x92, 0x65, 0x20, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "COST": {0x4b, 0x6f, 0x6c, 0x6f, 0x6d, 0x62, 0x69, 0x61, 0x20, 0x64, 0x7a, 0x6f, 0x6d, 0x65, 0xc5, 0x8b, 0xc9, 0x94, 0x6c, 0x69, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "WITA": {0x57, 0x49, 0x54, 0x41}, "ChST": {0x43, 0x68, 0x53, 0x54}, "CAT": {0x54, 0x69, 0x74, 0x69, 0x6e, 0x61, 0x20, 0x41, 0x66, 0x72, 0x69, 0x6b, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "ART": {0x41, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "ARST": {0x41, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x61, 0x20, 0x64, 0x7a, 0x6f, 0x6d, 0x65, 0xc5, 0x8b, 0xc9, 0x94, 0x6c, 0x69, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "JST": {0x4a, 0x61, 0x70, 0x61, 0x6e, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "AKST": {0x41, 0x6c, 0x61, 0x73, 0x6b, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "GFT": {0x46, 0x72, 0x65, 0x6e, 0x74, 0x73, 0x69, 0x20, 0x47, 0x75, 0x69, 0x61, 0x6e, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "∅∅∅": {0x41, 0x7a, 0x6f, 0x72, 0x65, 0x73, 0x20, 0x64, 0x7a, 0x6f, 0x6d, 0x65, 0xc5, 0x8b, 0xc9, 0x94, 0x6c, 0x69, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "TMST": {0x54, 0xc9, 0x9b, 0x6b, 0x6d, 0x65, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x20, 0x64, 0x7a, 0x6f, 0x6d, 0x65, 0xc5, 0x8b, 0xc9, 0x94, 0x6c, 0x69, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "AKDT": {0x41, 0x6c, 0x61, 0x73, 0x6b, 0x61, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "EDT": {0xc6, 0x94, 0x65, 0x64, 0x7a, 0x65, 0xc6, 0x92, 0x65, 0x20, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x61, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "SRT": {0x53, 0x75, 0x72, 0x69, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "WIB": {0x57, 0x49, 0x42}, "HAST": {0x48, 0x61, 0x77, 0x61, 0x69, 0x69, 0x2d, 0x41, 0x6c, 0x65, 0x75, 0x74, 0x69, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "AST": {0x41, 0x74, 0x6c, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "CLT": {0x54, 0x73, 0x69, 0x6c, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "WIT": {0x57, 0x49, 0x54}, "LHDT": {0x4c, 0x48, 0x44, 0x54}, "WART": {0xc6, 0x94, 0x65, 0x74, 0x6f, 0xc9, 0x96, 0x6f, 0xc6, 0x92, 0x65, 0x20, 0x41, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "WAT": {0xc6, 0x94, 0x65, 0x74, 0x6f, 0xc9, 0x96, 0x6f, 0xc6, 0x92, 0x65, 0x20, 0x41, 0x66, 0x72, 0x69, 0x6b, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "PDT": {0x50, 0x61, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "NZST": {0x4e, 0x5a, 0x53, 0x54}, "WEZ": {0xc6, 0x94, 0x65, 0x74, 0x6f, 0xc9, 0x96, 0x6f, 0xc6, 0x92, 0x65, 0x20, 0x45, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "WESZ": {0xc6, 0x94, 0x65, 0x74, 0x6f, 0xc9, 0x96, 0x6f, 0xc6, 0x92, 0x65, 0x20, 0x45, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "BT": {0x42, 0x54}, "ADT": {0x41, 0x74, 0x6c, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "SGT": {0x53, 0x47, 0x54}, "HNT": {0x4e, 0x69, 0x75, 0x66, 0x61, 0x75, 0x6e, 0xc9, 0x96, 0x6c, 0x61, 0x6e, 0xc9, 0x96, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "ACWDT": {0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x20, 0xc9, 0xa3, 0x65, 0x74, 0x6f, 0xc9, 0x96, 0x6f, 0x66, 0x65, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "ECT": {0x49, 0x6b, 0x75, 0x65, 0x64, 0xc9, 0x94, 0x20, 0x64, 0x7a, 0x6f, 0x6d, 0x65, 0xc5, 0x8b, 0xc9, 0x94, 0x6c, 0x69, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "VET": {0x56, 0x65, 0x6e, 0x65, 0x7a, 0x75, 0x65, 0x6c, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "BOT": {0x42, 0x6f, 0x6c, 0x69, 0x76, 0x69, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "MDT": {0x4d, 0x61, 0x6b, 0x61, 0x75, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "AWST": {0xc6, 0x94, 0x65, 0x74, 0x6f, 0xc9, 0x96, 0x6f, 0xc6, 0x92, 0x65, 0x20, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "ACST": {0x54, 0x69, 0x74, 0x69, 0x6e, 0x61, 0x20, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "JDT": {0x4a, 0x61, 0x70, 0x61, 0x6e, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "HAT": {0x4e, 0x69, 0x75, 0x66, 0x61, 0x75, 0x6e, 0xc9, 0x96, 0x6c, 0x61, 0x6e, 0xc9, 0x96, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "WARST": {0xc6, 0x94, 0x65, 0x74, 0x6f, 0xc9, 0x96, 0x6f, 0xc6, 0x92, 0x65, 0x20, 0x41, 0x72, 0x67, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x61, 0x20, 0x64, 0x7a, 0x6f, 0x6d, 0x65, 0xc5, 0x8b, 0xc9, 0x94, 0x6c, 0x69, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "HKT": {0x48, 0xc9, 0x94, 0x6e, 0x67, 0x20, 0x4b, 0xc9, 0x94, 0x6e, 0x67, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x20, 0x6d, 0x65}, "EAT": {0xc6, 0x94, 0x65, 0x64, 0x7a, 0x65, 0xc6, 0x92, 0x65, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "EST": {0xc6, 0x94, 0x65, 0x64, 0x7a, 0x65, 0xc6, 0x92, 0x65, 0x20, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "UYST": {0x55, 0x72, 0x75, 0x67, 0x75, 0x61, 0x69, 0x20, 0x64, 0x7a, 0x6f, 0x6d, 0x65, 0xc5, 0x8b, 0xc9, 0x94, 0x6c, 0x69, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "AEST": {0xc6, 0x94, 0x65, 0x64, 0x7a, 0x65, 0xc6, 0x92, 0x65, 0x20, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "CHADT": {0x43, 0x48, 0x41, 0x44, 0x54}, "MESZ": {0x54, 0x69, 0x74, 0x69, 0x6e, 0x61, 0x20, 0x45, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "OEZ": {0xc6, 0x94, 0x65, 0x64, 0x7a, 0x65, 0xc6, 0x92, 0x65, 0x20, 0x45, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "GYT": {0x47, 0x61, 0x79, 0x61, 0x6e, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "HKST": {0x48, 0xc9, 0x94, 0x6e, 0x67, 0x20, 0x4b, 0xc9, 0x94, 0x6e, 0x67, 0x20, 0x64, 0x7a, 0x6f, 0x6d, 0x65, 0xc5, 0x8b, 0xc9, 0x94, 0x6c, 0x69, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "ACDT": {0x54, 0x69, 0x74, 0x69, 0x6e, 0x61, 0x20, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "COT": {0x4b, 0x6f, 0x6c, 0x6f, 0x6d, 0x62, 0x69, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "SAST": {0x41, 0x6e, 0x79, 0x69, 0x65, 0x68, 0x65, 0x20, 0x41, 0x66, 0x72, 0x69, 0x63, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "MEZ": {0x54, 0x69, 0x74, 0x69, 0x6e, 0x61, 0x20, 0x45, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "HADT": {0x48, 0x61, 0x77, 0x61, 0x69, 0x69, 0x2d, 0x41, 0x6c, 0x65, 0x75, 0x74, 0x69, 0x61, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "TMT": {0x54, 0xc9, 0x9b, 0x6b, 0x6d, 0x65, 0x6e, 0x69, 0x73, 0x74, 0x61, 0x6e, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "OESZ": {0xc6, 0x94, 0x65, 0x64, 0x7a, 0x65, 0xc6, 0x92, 0x65, 0x20, 0x45, 0x75, 0x72, 0x6f, 0x70, 0x65, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "ACWST": {0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x20, 0xc9, 0xa3, 0x65, 0x74, 0x6f, 0xc9, 0x96, 0x6f, 0x66, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "LHST": {0x4c, 0x48, 0x53, 0x54}, "MYT": {0x4d, 0x59, 0x54}, "CST": {0x54, 0x69, 0x74, 0x69, 0x6e, 0x61, 0x20, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x61, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "CDT": {0x54, 0x69, 0x74, 0x69, 0x6e, 0x61, 0x20, 0x41, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x61, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "MST": {0x4d, 0x61, 0x6b, 0x61, 0x75, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "PST": {0x50, 0x61, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0xc9, 0x96, 0x6f, 0x61, 0x6e, 0x79, 0x69, 0x6d, 0x65}, "AWDT": {0xc6, 0x94, 0x65, 0x74, 0x6f, 0xc9, 0x96, 0x6f, 0xc6, 0x92, 0x65, 0x20, 0x41, 0x75, 0x73, 0x74, 0x72, 0x61, 0x6c, 0x69, 0x61, 0x20, 0xc5, 0x8b, 0x6b, 0x65, 0x6b, 0x65, 0x6d, 0x65, 0x20, 0x67, 0x61, 0xc6, 0x92, 0x6f, 0xc6, 0x92, 0x6f, 0x6d, 0x65}, "CHAST": {0x43, 0x48, 0x41, 0x53, 0x54}},
  70. }
  71. }
  72. // Locale returns the current translators string locale
  73. func (ee *ee) Locale() string {
  74. return ee.locale
  75. }
  76. // PluralsCardinal returns the list of cardinal plural rules associated with 'ee'
  77. func (ee *ee) PluralsCardinal() []locales.PluralRule {
  78. return ee.pluralsCardinal
  79. }
  80. // PluralsOrdinal returns the list of ordinal plural rules associated with 'ee'
  81. func (ee *ee) PluralsOrdinal() []locales.PluralRule {
  82. return ee.pluralsOrdinal
  83. }
  84. // PluralsRange returns the list of range plural rules associated with 'ee'
  85. func (ee *ee) PluralsRange() []locales.PluralRule {
  86. return ee.pluralsRange
  87. }
  88. // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'ee'
  89. func (ee *ee) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
  90. n := math.Abs(num)
  91. if n == 1 {
  92. return locales.PluralRuleOne
  93. }
  94. return locales.PluralRuleOther
  95. }
  96. // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'ee'
  97. func (ee *ee) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
  98. return locales.PluralRuleUnknown
  99. }
  100. // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'ee'
  101. func (ee *ee) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
  102. return locales.PluralRuleUnknown
  103. }
  104. // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
  105. func (ee *ee) MonthAbbreviated(month time.Month) []byte {
  106. return ee.monthsAbbreviated[month]
  107. }
  108. // MonthsAbbreviated returns the locales abbreviated months
  109. func (ee *ee) MonthsAbbreviated() [][]byte {
  110. return ee.monthsAbbreviated[1:]
  111. }
  112. // MonthNarrow returns the locales narrow month given the 'month' provided
  113. func (ee *ee) MonthNarrow(month time.Month) []byte {
  114. return ee.monthsNarrow[month]
  115. }
  116. // MonthsNarrow returns the locales narrow months
  117. func (ee *ee) MonthsNarrow() [][]byte {
  118. return ee.monthsNarrow[1:]
  119. }
  120. // MonthWide returns the locales wide month given the 'month' provided
  121. func (ee *ee) MonthWide(month time.Month) []byte {
  122. return ee.monthsWide[month]
  123. }
  124. // MonthsWide returns the locales wide months
  125. func (ee *ee) MonthsWide() [][]byte {
  126. return ee.monthsWide[1:]
  127. }
  128. // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
  129. func (ee *ee) WeekdayAbbreviated(weekday time.Weekday) []byte {
  130. return ee.daysAbbreviated[weekday]
  131. }
  132. // WeekdaysAbbreviated returns the locales abbreviated weekdays
  133. func (ee *ee) WeekdaysAbbreviated() [][]byte {
  134. return ee.daysAbbreviated
  135. }
  136. // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
  137. func (ee *ee) WeekdayNarrow(weekday time.Weekday) []byte {
  138. return ee.daysNarrow[weekday]
  139. }
  140. // WeekdaysNarrow returns the locales narrow weekdays
  141. func (ee *ee) WeekdaysNarrow() [][]byte {
  142. return ee.daysNarrow
  143. }
  144. // WeekdayShort returns the locales short weekday given the 'weekday' provided
  145. func (ee *ee) WeekdayShort(weekday time.Weekday) []byte {
  146. return ee.daysShort[weekday]
  147. }
  148. // WeekdaysShort returns the locales short weekdays
  149. func (ee *ee) WeekdaysShort() [][]byte {
  150. return ee.daysShort
  151. }
  152. // WeekdayWide returns the locales wide weekday given the 'weekday' provided
  153. func (ee *ee) WeekdayWide(weekday time.Weekday) []byte {
  154. return ee.daysWide[weekday]
  155. }
  156. // WeekdaysWide returns the locales wide weekdays
  157. func (ee *ee) WeekdaysWide() [][]byte {
  158. return ee.daysWide
  159. }
  160. // FmtNumber returns 'num' with digits/precision of 'v' for 'ee' and handles both Whole and Real numbers based on 'v'
  161. // returned as a []byte just in case the caller wishes to add more and can help
  162. // avoid allocations; otherwise just cast as string.
  163. func (ee *ee) FmtNumber(num float64, v uint64) []byte {
  164. s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  165. return []byte(s)
  166. }
  167. // FmtPercent returns 'num' with digits/precision of 'v' for 'ee' and handles both Whole and Real numbers based on 'v'
  168. // returned as a []byte just in case the caller wishes to add more and can help
  169. // avoid allocations; otherwise just cast as string.
  170. // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
  171. func (ee *ee) FmtPercent(num float64, v uint64) []byte {
  172. s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  173. return []byte(s)
  174. }
  175. // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'ee'
  176. // returned as a []byte just in case the caller wishes to add more and can help
  177. // avoid allocations; otherwise just cast as string.
  178. func (ee *ee) FmtCurrency(num float64, v uint64, currency currency.Type) []byte {
  179. s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  180. symbol := ee.currencies[currency]
  181. l := len(s) + len(ee.decimal) + len(ee.group)*len(s[:len(s)-int(v)-1])/3
  182. count := 0
  183. inWhole := v == 0
  184. b := make([]byte, 0, l)
  185. for i := len(s) - 1; i >= 0; i-- {
  186. if s[i] == '.' {
  187. for j := len(ee.decimal) - 1; j >= 0; j-- {
  188. b = append(b, ee.decimal[j])
  189. }
  190. inWhole = true
  191. continue
  192. }
  193. if inWhole {
  194. if count == 3 {
  195. for j := len(ee.group) - 1; j >= 0; j-- {
  196. b = append(b, ee.group[j])
  197. }
  198. count = 1
  199. } else {
  200. count++
  201. }
  202. }
  203. b = append(b, s[i])
  204. }
  205. for j := len(symbol) - 1; j >= 0; j-- {
  206. b = append(b, symbol[j])
  207. }
  208. if num < 0 {
  209. for j := len(ee.minus) - 1; j >= 0; j-- {
  210. b = append(b, ee.minus[j])
  211. }
  212. }
  213. // reverse
  214. for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
  215. b[i], b[j] = b[j], b[i]
  216. }
  217. if int(v) < 2 {
  218. if v == 0 {
  219. b = append(b, ee.decimal...)
  220. }
  221. for i := 0; i < 2-int(v); i++ {
  222. b = append(b, '0')
  223. }
  224. }
  225. return b
  226. }
  227. // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'ee'
  228. // in accounting notation. returned as a []byte just in case the caller wishes to add more and can help
  229. // avoid allocations; otherwise just cast as string.
  230. func (ee *ee) FmtAccounting(num float64, v uint64, currency currency.Type) []byte {
  231. s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
  232. symbol := ee.currencies[currency]
  233. l := len(s) + len(ee.decimal) + len(ee.group)*len(s[:len(s)-int(v)-1])/3
  234. count := 0
  235. inWhole := v == 0
  236. b := make([]byte, 0, l)
  237. for i := len(s) - 1; i >= 0; i-- {
  238. if s[i] == '.' {
  239. for j := len(ee.decimal) - 1; j >= 0; j-- {
  240. b = append(b, ee.decimal[j])
  241. }
  242. inWhole = true
  243. continue
  244. }
  245. if inWhole {
  246. if count == 3 {
  247. for j := len(ee.group) - 1; j >= 0; j-- {
  248. b = append(b, ee.group[j])
  249. }
  250. count = 1
  251. } else {
  252. count++
  253. }
  254. }
  255. b = append(b, s[i])
  256. }
  257. if num < 0 {
  258. for j := len(symbol) - 1; j >= 0; j-- {
  259. b = append(b, symbol[j])
  260. }
  261. for j := len(ee.currencyNegativePrefix) - 1; j >= 0; j-- {
  262. b = append(b, ee.currencyNegativePrefix[j])
  263. }
  264. } else {
  265. for j := len(symbol) - 1; j >= 0; j-- {
  266. b = append(b, symbol[j])
  267. }
  268. }
  269. // reverse
  270. for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
  271. b[i], b[j] = b[j], b[i]
  272. }
  273. if int(v) < 2 {
  274. if v == 0 {
  275. b = append(b, ee.decimal...)
  276. }
  277. for i := 0; i < 2-int(v); i++ {
  278. b = append(b, '0')
  279. }
  280. }
  281. if num < 0 {
  282. b = append(b, ee.currencyNegativeSuffix...)
  283. }
  284. return b
  285. }
  286. // FmtDateShort returns the short date representation of 't' for 'ee'
  287. // returned as a []byte just in case the caller wishes to add more and can help
  288. // avoid allocations; otherwise just cast as string.
  289. func (ee *ee) FmtDateShort(t time.Time) []byte {
  290. b := make([]byte, 0, 32)
  291. b = strconv.AppendInt(b, int64(t.Month()), 10)
  292. b = append(b, []byte{0x2f}...)
  293. b = strconv.AppendInt(b, int64(t.Day()), 10)
  294. b = append(b, []byte{0x2f}...)
  295. if t.Year() > 9 {
  296. b = append(b, strconv.Itoa(t.Year())[2:]...)
  297. } else {
  298. b = append(b, strconv.Itoa(t.Year())[1:]...)
  299. }
  300. return b
  301. }
  302. // FmtDateMedium returns the medium date representation of 't' for 'ee'
  303. // returned as a []byte just in case the caller wishes to add more and can help
  304. // avoid allocations; otherwise just cast as string.
  305. func (ee *ee) FmtDateMedium(t time.Time) []byte {
  306. b := make([]byte, 0, 32)
  307. b = append(b, ee.monthsAbbreviated[t.Month()]...)
  308. b = append(b, []byte{0x20}...)
  309. b = strconv.AppendInt(b, int64(t.Day()), 10)
  310. b = append(b, []byte{}...)
  311. b = append(b, []byte{0x27, 0x6c, 0x69, 0x61, 0x27, 0x2c, 0x20}...)
  312. b = strconv.AppendInt(b, int64(t.Year()), 10)
  313. return b
  314. }
  315. // FmtDateLong returns the long date representation of 't' for 'ee'
  316. // returned as a []byte just in case the caller wishes to add more and can help
  317. // avoid allocations; otherwise just cast as string.
  318. func (ee *ee) FmtDateLong(t time.Time) []byte {
  319. b := make([]byte, 0, 32)
  320. b = append(b, ee.monthsWide[t.Month()]...)
  321. b = append(b, []byte{0x20}...)
  322. b = strconv.AppendInt(b, int64(t.Day()), 10)
  323. b = append(b, []byte{}...)
  324. b = append(b, []byte{0x27, 0x6c, 0x69, 0x61, 0x27, 0x20}...)
  325. b = strconv.AppendInt(b, int64(t.Year()), 10)
  326. return b
  327. }
  328. // FmtDateFull returns the full date representation of 't' for 'ee'
  329. // returned as a []byte just in case the caller wishes to add more and can help
  330. // avoid allocations; otherwise just cast as string.
  331. func (ee *ee) FmtDateFull(t time.Time) []byte {
  332. b := make([]byte, 0, 32)
  333. b = append(b, ee.daysWide[t.Weekday()]...)
  334. b = append(b, []byte{0x2c, 0x20}...)
  335. b = append(b, ee.monthsWide[t.Month()]...)
  336. b = append(b, []byte{0x20}...)
  337. b = strconv.AppendInt(b, int64(t.Day()), 10)
  338. b = append(b, []byte{}...)
  339. b = append(b, []byte{0x27, 0x6c, 0x69, 0x61, 0x27, 0x20}...)
  340. b = strconv.AppendInt(b, int64(t.Year()), 10)
  341. return b
  342. }
  343. // FmtTimeShort returns the short time representation of 't' for 'ee'
  344. // returned as a []byte just in case the caller wishes to add more and can help
  345. // avoid allocations; otherwise just cast as string.
  346. func (ee *ee) FmtTimeShort(t time.Time) []byte {
  347. b := make([]byte, 0, 32)
  348. if t.Hour() < 12 {
  349. b = append(b, ee.periodsAbbreviated[0]...)
  350. } else {
  351. b = append(b, ee.periodsAbbreviated[1]...)
  352. }
  353. b = append(b, []byte{}...)
  354. b = append(b, []byte{0x27, 0x67, 0x61, 0x27, 0x20}...)
  355. h := t.Hour()
  356. if h > 12 {
  357. h -= 12
  358. }
  359. b = strconv.AppendInt(b, int64(h), 10)
  360. b = append(b, ee.timeSeparator...)
  361. if t.Minute() < 10 {
  362. b = append(b, '0')
  363. }
  364. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  365. return b
  366. }
  367. // FmtTimeMedium returns the medium time representation of 't' for 'ee'
  368. // returned as a []byte just in case the caller wishes to add more and can help
  369. // avoid allocations; otherwise just cast as string.
  370. func (ee *ee) FmtTimeMedium(t time.Time) []byte {
  371. b := make([]byte, 0, 32)
  372. if t.Hour() < 12 {
  373. b = append(b, ee.periodsAbbreviated[0]...)
  374. } else {
  375. b = append(b, ee.periodsAbbreviated[1]...)
  376. }
  377. b = append(b, []byte{}...)
  378. b = append(b, []byte{0x27, 0x67, 0x61, 0x27, 0x20}...)
  379. h := t.Hour()
  380. if h > 12 {
  381. h -= 12
  382. }
  383. b = strconv.AppendInt(b, int64(h), 10)
  384. b = append(b, ee.timeSeparator...)
  385. if t.Minute() < 10 {
  386. b = append(b, '0')
  387. }
  388. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  389. b = append(b, ee.timeSeparator...)
  390. if t.Second() < 10 {
  391. b = append(b, '0')
  392. }
  393. b = strconv.AppendInt(b, int64(t.Second()), 10)
  394. return b
  395. }
  396. // FmtTimeLong returns the long time representation of 't' for 'ee'
  397. // returned as a []byte just in case the caller wishes to add more and can help
  398. // avoid allocations; otherwise just cast as string.
  399. func (ee *ee) FmtTimeLong(t time.Time) []byte {
  400. b := make([]byte, 0, 32)
  401. if t.Hour() < 12 {
  402. b = append(b, ee.periodsAbbreviated[0]...)
  403. } else {
  404. b = append(b, ee.periodsAbbreviated[1]...)
  405. }
  406. b = append(b, []byte{}...)
  407. b = append(b, []byte{0x27, 0x67, 0x61, 0x27, 0x20}...)
  408. h := t.Hour()
  409. if h > 12 {
  410. h -= 12
  411. }
  412. b = strconv.AppendInt(b, int64(h), 10)
  413. b = append(b, ee.timeSeparator...)
  414. if t.Minute() < 10 {
  415. b = append(b, '0')
  416. }
  417. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  418. b = append(b, ee.timeSeparator...)
  419. if t.Second() < 10 {
  420. b = append(b, '0')
  421. }
  422. b = strconv.AppendInt(b, int64(t.Second()), 10)
  423. b = append(b, []byte{0x20}...)
  424. tz, _ := t.Zone()
  425. b = append(b, tz...)
  426. return b
  427. }
  428. // FmtTimeFull returns the full time representation of 't' for 'ee'
  429. // returned as a []byte just in case the caller wishes to add more and can help
  430. // avoid allocations; otherwise just cast as string.
  431. func (ee *ee) FmtTimeFull(t time.Time) []byte {
  432. b := make([]byte, 0, 32)
  433. if t.Hour() < 12 {
  434. b = append(b, ee.periodsAbbreviated[0]...)
  435. } else {
  436. b = append(b, ee.periodsAbbreviated[1]...)
  437. }
  438. b = append(b, []byte{}...)
  439. b = append(b, []byte{0x27, 0x67, 0x61, 0x27, 0x20}...)
  440. h := t.Hour()
  441. if h > 12 {
  442. h -= 12
  443. }
  444. b = strconv.AppendInt(b, int64(h), 10)
  445. b = append(b, ee.timeSeparator...)
  446. if t.Minute() < 10 {
  447. b = append(b, '0')
  448. }
  449. b = strconv.AppendInt(b, int64(t.Minute()), 10)
  450. b = append(b, ee.timeSeparator...)
  451. if t.Second() < 10 {
  452. b = append(b, '0')
  453. }
  454. b = strconv.AppendInt(b, int64(t.Second()), 10)
  455. b = append(b, []byte{0x20}...)
  456. tz, _ := t.Zone()
  457. if btz, ok := ee.timezones[tz]; ok {
  458. b = append(b, btz...)
  459. } else {
  460. b = append(b, tz...)
  461. }
  462. return b
  463. }