twitter_cldr 6.13.0 → 6.14.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37d91f83303d413889b33534bb259effd0dd513761dfd35191ea826d996a7e37
4
- data.tar.gz: e71b25edad2320c01d0c755042ca69b6dc23f09b00ae4c0383fe17d7c458f7bf
3
+ metadata.gz: 1f6f12a504cd2610de9844c0a6a10b1dee09c408bf59a4df7134d6733c6f19a7
4
+ data.tar.gz: 9015c32834ec9c50cc017a18a962ef3e79db6c641dd28ea506edb96ad67d7d15
5
5
  SHA512:
6
- metadata.gz: fd9ae9217448933c79d8399d773f62dc65b2652c3e53f2f4cc44de2dffa9f20537fcb60ce8e3f2eaa0cc2e8497c006b4846a54651f7ade21b6179e1ca7d109d7
7
- data.tar.gz: 1454607bc353d03c0f8d1a6c31b7982a2a40290ff3d1ee4ed45238a0229c58ec77cf251da6c85dd20df59c3b79c7562e7b9b55b2ececf4d2b620a2143a5bfce6
6
+ metadata.gz: d6a5d7f989a4e8456b26bb9841278ecdb735a5aa15472f66004e72fbf99cc100930bca05038aa2726a6be17b6fac383ca206e0ebad0d463ab9ceaae5ee5bc04d
7
+ data.tar.gz: b3aa8e13c60e60c283868734d00af68721d1d452ea4bf53faf10b516a9717c86b5c3719ab9951efad8bd1fcb7822d9fac620355f3e520c3fdf064d3ed54daacc
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## twitter-cldr-rb ![Unit Tests](https://github.com/camertron/rux/actions/workflows/unit_tests.yml/badge.svg?branch=master) [![Code Climate](https://codeclimate.com/github/twitter/twitter-cldr-rb.png)](https://codeclimate.com/github/twitter/twitter-cldr-rb) [![Coverage Status](https://coveralls.io/repos/twitter/twitter-cldr-rb/badge.png?branch=master)](https://coveralls.io/r/twitter/twitter-cldr-rb?branch=master)
1
+ ## twitter-cldr-rb ![Unit Tests](https://github.com/twitter/twitter-cldr-rb/actions/workflows/unit_tests.yml/badge.svg?branch=master) [![Code Climate](https://codeclimate.com/github/twitter/twitter-cldr-rb.png)](https://codeclimate.com/github/twitter/twitter-cldr-rb) [![Coverage Status](https://coveralls.io/repos/twitter/twitter-cldr-rb/badge.png?branch=master)](https://coveralls.io/r/twitter/twitter-cldr-rb?branch=master)
2
2
 
3
3
  TwitterCldr uses Unicode's Common Locale Data Repository (CLDR) to format certain types of text into their
4
4
  localized equivalents. Currently supported types of text include dates, times, currencies, decimals, percentages, and symbols.
@@ -289,8 +289,10 @@ module TwitterCldr
289
289
  tz = TwitterCldr::Timezones::Timezone.instance(
290
290
  options[:timezone] || 'UTC', data_reader.locale
291
291
  )
292
+ fmt = TZ_PATTERNS[pattern]
292
293
 
293
- tz.display_name_for(time, TZ_PATTERNS[pattern])
294
+ args = [time, fmt, options[:dst]].compact
295
+ tz.display_name_for(*args)
294
296
  end
295
297
 
296
298
  # ported from icu4j 64.2
@@ -24,11 +24,11 @@ module TwitterCldr
24
24
  end
25
25
 
26
26
  types.each do |type|
27
- define_method "to_#{type}_s" do
27
+ define_method "to_#{type}_s" do |options = {}|
28
28
  # @ TODO: these need to be cheap to create
29
29
  data_reader = data_reader_for(type)
30
30
  tokens = data_reader.tokenizer.tokenize(data_reader.pattern)
31
- data_reader.formatter.format(tokens, base_in_timezone, chain_params)
31
+ data_reader.formatter.format(tokens, base_in_timezone, chain_params.merge(options))
32
32
  end
33
33
  end
34
34
 
@@ -4,5 +4,5 @@
4
4
  # http://www.apache.org/licenses/LICENSE-2.0
5
5
 
6
6
  module TwitterCldr
7
- VERSION = '6.13.0'
7
+ VERSION = '6.14.0'
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter_cldr
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.13.0
4
+ version: 6.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cameron Dutro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-18 00:00:00.000000000 Z
11
+ date: 2025-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: camertron-eprun