timely 0.4.0 → 0.4.1

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: 36062e70f6f891b86756085fcad60f2bd9e4b835c981d63eb6de79c3d3686918
4
- data.tar.gz: 04626beef2e728acb924fc9a29413a13f4ebd2769af4825aaabce3a062607fba
3
+ metadata.gz: 382904d08678605d938cd0d941705332863f14a1d4c35b2cb8b32e392512ebed
4
+ data.tar.gz: 4b3fe1a94eb20f44f5d7936ee74b2c6a318876842941802d1dc21730ebf9601b
5
5
  SHA512:
6
- metadata.gz: da490cb6717e3e8a3d814bb48022b62b6fb0e21b515fc6a4d25e9011f89ff10f1f1bdc90175ea71f8c440062584ba9be7185b85e7a3bb08b158b542f8446f3ea
7
- data.tar.gz: 71d85acac0eabfa64971724a479b8d758721b8fac00ab2071d515926c5418e1155bab611ca28a5012a24a2ab7edd6de776e035d5a350e32ed9eefed6bdb34aea
6
+ metadata.gz: afff189e47475c6735567715412ed9b18bdfcda0d3e18d47a1380e5638fe4761ca1e557258bdd94524d2de8c416b9fe6af2e5d1e0da7b345300263b8ef991165
7
+ data.tar.gz: 7992375af6e06869b694094b4219b7e59ce47cb902c9c4347d894d90eb9f208e44cb8d57addaa9797258c0b014520e7a5817a59c9b54535f1646ba586f6c5f97
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.4.1
4
+
5
+ * [TT-5674] Make multi year date format friendlier
6
+
3
7
  ## 0.4.0
4
8
 
5
9
  * [TT-5648] Fix date_range to string when a single month covers a year period
@@ -58,8 +58,8 @@ module Timely
58
58
  if first && last
59
59
  if first == last
60
60
  first.strftime(fmt)
61
- elsif first.year == last.year && first == first.at_beginning_of_month && last == last.at_end_of_month
62
- if first.month == last.month
61
+ elsif first == first.at_beginning_of_month && last == last.at_end_of_month
62
+ if first.year == last.year && first.month == last.month
63
63
  first.strftime(month_fmt)
64
64
  else
65
65
  "#{first.strftime(month_fmt)} to #{last.strftime(month_fmt)}"
@@ -1,3 +1,3 @@
1
1
  module Timely
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
@@ -27,7 +27,7 @@ describe Timely::DateRange do
27
27
  expect(Timely::DateRange.new('2000-01-04'.to_date, '2000-01-06'.to_date).to_s).to eq '2000-01-04 to 2000-01-06 (inclusive)'
28
28
  expect(Timely::DateRange.new('2000-01-01'.to_date, '2000-05-31'.to_date).to_s).to eq 'Jan 2000 to May 2000'
29
29
  expect(Timely::DateRange.new('2000-01-01'.to_date, '2000-01-31'.to_date).to_s).to eq 'Jan 2000'
30
- expect(Timely::DateRange.new('2000-01-01'.to_date, '2001-01-31'.to_date).to_s).to eq '2000-01-01 to 2001-01-31 (inclusive)'
30
+ expect(Timely::DateRange.new('2000-01-01'.to_date, '2001-01-31'.to_date).to_s).to eq 'Jan 2000 to Jan 2001'
31
31
  Date::DATE_FORMATS[:short] = '%Y-%m-%d'
32
32
  expect(Timely::DateRange.to_s('2000-01-01'.to_date, nil)).to eq 'on or after 2000-01-01'
33
33
  expect(Timely::DateRange.to_s(nil, '2000-01-31'.to_date)).to eq 'on or before 2000-01-31'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: timely
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Noack
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-25 00:00:00.000000000 Z
11
+ date: 2019-06-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler