ca.go 37 KB

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