russian_holidays_checkup 0.1.3 → 0.1.4

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
  SHA1:
3
- metadata.gz: be38cb2ebf643ff593f730300fdad23451ecf226
4
- data.tar.gz: d09b9c7498ed8ef2b1e873bb5f9596c11ae39df6
3
+ metadata.gz: c84b2de4137990fcbcae89919ae7948512adf5c4
4
+ data.tar.gz: 9498d0a251c90ae807e3d7c577a429efdd09d702
5
5
  SHA512:
6
- metadata.gz: 543548ef1376f2004842a1c85066c08abfabc431d96fb1fb561c00f3a43904134e40d492db730cef58bd92ac78ae06cc941fa443fac84f4e24835ffc12ed3f71
7
- data.tar.gz: 523b354da6c4306e730e8541cc6698c850efc9944e48870135c9178371f270a3d897e0668927efe51f786178b98ce8ce3f7ed50f260af88f285823c3d6af4ae2
6
+ metadata.gz: 9c1c08fdf19a90d6f2a74dc13f49e45568e6e18add92625eab94564365db7a04ae7d6067bcf13427b83937fbffe7519e9d970f1e52741338f76dd52f88499ac1
7
+ data.tar.gz: 5b3ec17953d2bee1a814a5a0413cf8e60f8b329ab9888e08605a8384bf4466e1894f2fdced1d880f8c0ba203162020fe5925101de7fe545fff98dbd7d58b6782
data/README.md CHANGED
@@ -24,6 +24,9 @@ Or install it yourself as:
24
24
  this gem has update DateTime class with method russian_holiday?
25
25
  after require just use it
26
26
 
27
+ for Example :
28
+ DateTime.new(2015,1,1,12,13,4).russian_holiday?
29
+
27
30
  ## Development
28
31
 
29
32
  After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -0,0 +1,25 @@
1
+ class DateTime
2
+ def russian_holiday?
3
+ all_russian_holidays = [
4
+ Date.new(2015, 1, 1),
5
+ Date.new(2015, 1, 2),
6
+ Date.new(2015, 1, 5),
7
+ Date.new(2015, 1, 6),
8
+ Date.new(2015, 1, 7),
9
+ Date.new(2015, 1, 8),
10
+ Date.new(2015, 1, 9),
11
+ Date.new(2015, 2, 23),
12
+ Date.new(2015, 3, 9),
13
+ Date.new(2015, 5, 1),
14
+ Date.new(2015, 5, 4),
15
+ Date.new(2015, 5, 11),
16
+ Date.new(2015, 6, 12),
17
+ Date.new(2015, 11, 4)
18
+ ]
19
+ if all_russian_holidays.index(self.to_date).nil?
20
+ false
21
+ else
22
+ true
23
+ end
24
+ end
25
+ end
@@ -1,3 +1,3 @@
1
1
  module RussianHolidaysCheckup
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -1,5 +1,5 @@
1
1
  require "russian_holidays_checkup/version"
2
- require "russian_holidays_checkup/core_ext"
2
+ require "russian_holidays_checkup/extended"
3
3
 
4
4
  module RussianHolidaysCheckup
5
5
  # disclaimer: В целях рационального использования работниками выходных и нерабочих праздничных дней Правительство Российской Федерации в соответствии со статьей 112 ТК РФ вправе переносить выходные дни на другие дни. Поэтому в связи с совпадением нерабочих праздничных дней с выходными днями предусмотрен перенос последних: с субботы 3 января на пятницу 9 января и с воскресенья 4 января на понедельник 4 мая.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: russian_holidays_checkup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - nikolay martynov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-03 00:00:00.000000000 Z
11
+ date: 2015-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -60,7 +60,7 @@ files:
60
60
  - bin/console
61
61
  - bin/setup
62
62
  - lib/russian_holidays_checkup.rb
63
- - lib/russian_holidays_checkup/core_ext.rb
63
+ - lib/russian_holidays_checkup/extended.rb
64
64
  - lib/russian_holidays_checkup/version.rb
65
65
  - russian_holidays_checkup.gemspec
66
66
  homepage: https://github.com/fearlessstar/russian_holidays_checkup.git
@@ -1,25 +0,0 @@
1
- DateTime.class_eval do
2
- def russian_holiday?
3
- all_russian_holidays = [
4
- DateTime.new(2015, 1, 1),
5
- DateTime.new(2015, 1, 2),
6
- DateTime.new(2015, 1, 5),
7
- DateTime.new(2015, 1, 6),
8
- DateTime.new(2015, 1, 7),
9
- DateTime.new(2015, 1, 8),
10
- DateTime.new(2015, 1, 9),
11
- DateTime.new(2015, 2, 23),
12
- DateTime.new(2015, 3, 9),
13
- DateTime.new(2015, 5, 1),
14
- DateTime.new(2015, 5, 4),
15
- DateTime.new(2015, 5, 11),
16
- DateTime.new(2015, 6, 12),
17
- DateTime.new(2015, 11, 4)
18
- ]
19
- if all_russian_holidays.index(self).nil?
20
- false
21
- else
22
- true
23
- end
24
- end
25
- end