extended_date 0.0.0 → 0.0.1

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.
Files changed (2) hide show
  1. data/lib/extended_date.rb +3 -3
  2. metadata +2 -2
data/lib/extended_date.rb CHANGED
@@ -1,16 +1,16 @@
1
1
  require 'date'
2
2
 
3
3
  class Date
4
- def self.month_first(dat, day)
4
+ def self.first_day_of_month_for(dat, day)
5
5
  parsed_date = Date.parse(dat.to_s)
6
- parsed_date.month_first(day)
6
+ parsed_date.first_day_of_month(day)
7
7
  end
8
8
 
9
9
  def beginning_of_month
10
10
  Date.parse(self.strftime("%Y-%m-1"))
11
11
  end
12
12
 
13
- def month_first(day)
13
+ def first_day_of_month(day)
14
14
  req_wday = case
15
15
  when ["sunday", "0"].include?(day.to_s.downcase) then 0
16
16
  when ["monday", "1"].include?(day.to_s.downcase) then 1
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 0
9
- version: 0.0.0
8
+ - 1
9
+ version: 0.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - PremNagalla