module RujitsuDate
Public Instance Methods
start_of_last_month()
click to toggle source
# File lib/rujitsu/date.rb 9 def start_of_last_month 10 today = self.today 11 if today.month == 1 12 self.new(today.year - 1, 12) 13 else 14 self.new(today.year, today.month - 1) 15 end 16 end
start_of_next_month()
click to toggle source
# File lib/rujitsu/date.rb 18 def start_of_next_month 19 today = self.today 20 if today.month < 12 21 self.new(today.year, today.month + 1) 22 else 23 self.new(today.year + 1, 1) 24 end 25 end
start_of_this_month()
click to toggle source
# File lib/rujitsu/date.rb 4 def start_of_this_month 5 today = self.today 6 self.new(today.year, today.month) 7 end