Class: Time

Inherits:
Object
  • Object
show all
Includes:
WeekOfMonth::Day, WeekOfMonth::Month, WeekOfMonth::Week, WeekOfMonth::Year
Defined in:
lib/week_of_month.rb

Constant Summary

Constants included from WeekOfMonth::Constant

WeekOfMonth::Constant::DAYS_IN_SEQUENCE, WeekOfMonth::Constant::MONTH_WITH_DAY, WeekOfMonth::Constant::MONTH_WITH_SEQUENCE, WeekOfMonth::Constant::WEEKS_IN_SEQUENCE, WeekOfMonth::Constant::WEEK_OF_MONTH_IN_ENG, WeekOfMonth::Constant::WEEK_OF_MONTH_IN_FR, WeekOfMonth::Constant::WEEK_OF_MONTH_IN_GER, WeekOfMonth::Constant::WEEK_OF_MONTH_IN_JA

Class Method Summary collapse

Instance Method Summary collapse

Methods included from WeekOfMonth::Year

included

Methods included from WeekOfMonth::Week

#beginning_of_week, #const, #current_week, #days_left_in_week, #days_past_in_week, #end_of_week, #first_week?, #general_week_of_month, #last_week?, #next_week, #previous_week, #second_week?, #total_weeks, #week_end?, #week_of_month, #week_split, #working_day?

Methods included from WeekOfMonth::Month

#beginning_of_month, #day_name, #end_of_month, #last_day_of_month, #month_name, #name_of_month

Methods included from WeekOfMonth::Day

#all_non_week_days_of_month, #all_working_days_of_month, #days_array, #first_working_day_of_the_month, #last_business_day_of_month, #name_of_week_day

Class Method Details

.new(year = Time.now.year, month = Time.now.month, day = Time.now.day, hour = Time.now.hour, min = Time.now.min, sec = Time.now.sec, millisecond = (Time.now.to_f * 1000.0).to_i) ⇒ Object



74
75
76
# File 'lib/week_of_month.rb', line 74

def self.new(year = Time.now.year, month = Time.now.month, day = Time.now.day, hour = Time.now.hour, min = Time.now.min, sec = Time.now.sec, millisecond = (Time.now.to_f * 1000.0).to_i)
  Time.local(year, month, day, hour, min, sec, millisecond)
end

Instance Method Details

#leap?Boolean

Returns:

  • (Boolean)


69
70
71
# File 'lib/week_of_month.rb', line 69

def leap?
  to_date.leap?
end