time_crisis 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 0
3
3
  :minor: 1
4
- :patch: 6
5
4
  :build:
5
+ :patch: 7
@@ -76,6 +76,11 @@ module TimeCrisis::Support::Conversions
76
76
  def to_date
77
77
  ::Date.civil(year, month, day)
78
78
  end
79
+
80
+ def to_time
81
+ ::Time.at(strftime('%s').to_i)
82
+ end
83
+
79
84
  end
80
85
  end
81
86
  end
@@ -2,6 +2,10 @@ module TimeCrisis::Weekend
2
2
  def weekend?
3
3
  [6, 7].include? self.cwday
4
4
  end
5
+
6
+ def weekday?
7
+ !weekend?
8
+ end
5
9
  end
6
10
 
7
11
  ::TimeCrisis::Date.send(:include, TimeCrisis::Weekend)
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{time_crisis}
8
- s.version = "0.1.6"
8
+ s.version = "0.1.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Travis Tilley"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: time_crisis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Travis Tilley