business-period 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bd7d69ce58af2d38fb67a703e8dafb9c39f3cdc6
4
- data.tar.gz: 75648bba79ac56eb55423fed5d4f4f4948bfe3b2
3
+ metadata.gz: 9d4c8bd4b3bc40d590d96ae851d29030ff020b58
4
+ data.tar.gz: a561843686e1136e2608fab2df7bd2d3442f2a8c
5
5
  SHA512:
6
- metadata.gz: c9a39ae2f541bbafc36c818681e472ccc02fef30b3b42cb32ec76a430a159e3813177c63d107863ce192598a3555604561027c6ecfefba5308385a9c228221db
7
- data.tar.gz: 612a9ffcbe2935aea2001b09cb7645a4c4afc7f0adb01bd5ae63ee1f66a7f715ab3e2e61e4df982a3ae4be8575a654f3f4fd899c9f595ab4b1316d98b95eca41
6
+ metadata.gz: a8cc4b9366d2d95dcaa659138d2a1c033b2ac72ef5529f4ad469a321ecb830e5156eb980463a57816ff942c4959097d43db36964502ccb4c680a55a72f6c7168
7
+ data.tar.gz: ce829b8356cab36ab3e3e0f5698be6032e47444295747de5e00fdf4b87e577f3f975f56cbeffb74831ed859daeb8ed7100ea987e3db59a0e716455cc93b3571b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- business-period (0.0.5)
4
+ business-period (0.0.8)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -9,15 +9,17 @@ months:
9
9
  - mday: 11
10
10
  name: Nepriklausomybės atkūrimo diena
11
11
  4:
12
- - mday: 1
12
+ - mday: 21
13
13
  name: Velykos
14
- - mday: 2
14
+ - mday: 22
15
15
  name: Velykų antroji diena
16
16
  5:
17
17
  - mday: 1
18
- name: Tarptautinė darbo diena / Motinos diena
18
+ name: Tarptautinė darbo diena
19
+ - mday: 5
20
+ name: Motinos diena
19
21
  6:
20
- - mday: 3
22
+ - mday: 2
21
23
  name: Tėvo diena
22
24
  - mday: 24
23
25
  name: Joninės
@@ -7,6 +7,9 @@ module BusinessPeriod
7
7
  end
8
8
 
9
9
  def perform(from_date, to_date)
10
+ return {} if from_date.nil? || to_date.nil?
11
+ return {} if from_date > to_date
12
+
10
13
  @period = calculate_period(from_date, to_date)
11
14
  @days = business_days
12
15
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BusinessPeriod
4
- VERSION = '0.0.7'
4
+ VERSION = '0.0.8'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: business-period
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - matas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-25 00:00:00.000000000 Z
11
+ date: 2018-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec