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 +4 -4
- data/CHANGELOG.md +11 -2
- data/README.md +1 -1
- data/app/assets/javascripts/i18n.js +2 -1
- data/lib/i18n/js/version.rb +1 -1
- data/package.json +1 -1
- data/spec/js/dates.spec.js +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b0e768392d4f11e954143639a70556e397560dcb9b970b80ffe3082ba288bf2
|
4
|
+
data.tar.gz: f385a60d70b37dc5945692d276aa0fc5ce40b9c4dd61e5123be1a21c859cacb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e9a52a4c632031c4f42554da5e67bd2b138ab42c1a65dc6bca2a8a1aa60184e641c895dac95996d48ad2e285811c47152c5b56d82b4dee40a985607f83b4ec4
|
7
|
+
data.tar.gz: 254934f35ead75fde6842038ca2e4c8fee13492814b56da9a7b7ab080848a02446a9320efc92fd47eebe322ea4845bcbcd86d86396b1e9435e4ce1af63995178
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
429
|
-
[3.
|
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
|
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
|
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);
|
data/lib/i18n/js/version.rb
CHANGED
data/package.json
CHANGED
data/spec/js/dates.spec.js
CHANGED
@@ -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
|
+
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
|
+
date: 2019-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|