i18n-js 3.4.2 → 3.5.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: 3c03dc85b58c3951fc22c5a43b7056dadfa3de7c7fd18f42102048c8022561fd
4
- data.tar.gz: 7a98a5801846bed99166b38cc46baf81cbb24fe9ce37fe31fa966b2082c817f1
3
+ metadata.gz: 3b0e768392d4f11e954143639a70556e397560dcb9b970b80ffe3082ba288bf2
4
+ data.tar.gz: f385a60d70b37dc5945692d276aa0fc5ce40b9c4dd61e5123be1a21c859cacb3
5
5
  SHA512:
6
- metadata.gz: 1425c3275a7a570c83eefed4f774ab11e04233fdbec3974345a63dc26f4fa0e67cb2707b115d2bc23f5f00f197fa0fdae303c1735dcb9c85a82faa52a164b68f
7
- data.tar.gz: f86982523812cb129fc910d133273834992f42e64eacdd9af9e0195f6edbadc4be5d92d74615e76720ba0c878e74b0d6e348bbb335fed31bd1f54731b5fa0018
6
+ metadata.gz: 6e9a52a4c632031c4f42554da5e67bd2b138ab42c1a65dc6bca2a8a1aa60184e641c895dac95996d48ad2e285811c47152c5b56d82b4dee40a985607f83b4ec4
7
+ data.tar.gz: 254934f35ead75fde6842038ca2e4c8fee13492814b56da9a7b7ab080848a02446a9320efc92fd47eebe322ea4845bcbcd86d86396b1e9435e4ce1af63995178
@@ -18,6 +18,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
18
18
  - Nothing
19
19
 
20
20
 
21
+ ## [3.5.0] - 2019-11-12
22
+
23
+ ### Added
24
+
25
+ - [JS] Support for `%k` strftime format to match Ruby strftime
26
+ (PR: https://github.com/fnando/i18n-js/pull/554)
27
+
28
+
21
29
  ## [3.4.2] - 2019-11-11
22
30
 
23
31
  ### Fixed
@@ -425,8 +433,9 @@ And today is not April Fools' Day
425
433
 
426
434
 
427
435
 
428
- [Unreleased]: https://github.com/fnando/i18n-js/compare/v3.4.2...HEAD
429
- [3.4.1]: https://github.com/fnando/i18n-js/compare/v3.4.1...v3.4.2
436
+ [Unreleased]: https://github.com/fnando/i18n-js/compare/v3.5.0...HEAD
437
+ [3.5.0]: https://github.com/fnando/i18n-js/compare/v3.4.2...v3.5.0
438
+ [3.4.2]: https://github.com/fnando/i18n-js/compare/v3.4.1...v3.4.2
430
439
  [3.4.1]: https://github.com/fnando/i18n-js/compare/v3.4.0...v3.4.1
431
440
  [3.4.0]: https://github.com/fnando/i18n-js/compare/v3.3.0...v3.4.0
432
441
  [3.3.0]: https://github.com/fnando/i18n-js/compare/v3.2.3...v3.3.0
data/README.md CHANGED
@@ -623,7 +623,7 @@ The accepted formats for `I18n.strftime` are:
623
623
  %d - Day of the month (01..31)
624
624
  %-d - Day of the month (1..31)
625
625
  %H - Hour of the day, 24-hour clock (00..23)
626
- %-H - Hour of the day, 24-hour clock (0..23)
626
+ %-H/%k - Hour of the day, 24-hour clock (0..23)
627
627
  %I - Hour of the day, 12-hour clock (01..12)
628
628
  %-I/%l - Hour of the day, 12-hour clock (1..12)
629
629
  %m - Month of the year (01..12)
@@ -897,7 +897,7 @@
897
897
  // %d - Day of the month (01..31)
898
898
  // %-d - Day of the month (1..31)
899
899
  // %H - Hour of the day, 24-hour clock (00..23)
900
- // %-H - Hour of the day, 24-hour clock (0..23)
900
+ // %-H/%k - Hour of the day, 24-hour clock (0..23)
901
901
  // %I - Hour of the day, 12-hour clock (01..12)
902
902
  // %-I/%l - Hour of the day, 12-hour clock (1..12)
903
903
  // %m - Month of the year (01..12)
@@ -961,6 +961,7 @@
961
961
  format = format.replace("%-d", day);
962
962
  format = format.replace("%H", padding(hour));
963
963
  format = format.replace("%-H", hour);
964
+ format = format.replace("%k", hour);
964
965
  format = format.replace("%I", padding(hour12));
965
966
  format = format.replace("%-I", hour12);
966
967
  format = format.replace("%l", hour12);
@@ -2,6 +2,6 @@
2
2
 
3
3
  module I18n
4
4
  module JS
5
- VERSION = "3.4.2"
5
+ VERSION = "3.5.0"
6
6
  end
7
7
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "i18n-js",
3
- "version": "3.3.0",
3
+ "version": "3.5.0",
4
4
  "description": "A javascript library similar to Ruby on Rails i18n gem",
5
5
  "author": "Nando Vieira",
6
6
  "license": "MIT",
@@ -132,6 +132,7 @@ describe("Dates", function(){
132
132
 
133
133
  // 24-hour without padding
134
134
  expect(I18n.strftime(date, "%-H")).toEqual("7");
135
+ expect(I18n.strftime(date, "%k")).toEqual("7");
135
136
 
136
137
  // 12-hour without padding
137
138
  expect(I18n.strftime(date, "%-I")).toEqual("7");
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: i18n-js
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.2
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-11 00:00:00.000000000 Z
11
+ date: 2019-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: i18n