- Inheritance
Methods
Instance
Visibility | Signature |
---|---|
public | === (other) |
public | days_in_month (month, year = now.year) |
public | local_time (*args) |
public | time_with_datetime_fallback (utc_or_local, year, month=1, day=1, hour=0, min=0, sec=0, usec=0) |
public | utc_time (*args) |
Instance Method Detail
===(other)
Overriding case equality method so that it returns true for ActiveSupport::TimeWithZone instances
days_in_month(month, year = now.year)
Return the number of days in the given month. If no year is specified, it will use the current year.
local_time(*args)
Wraps class method time_with_datetime_fallback with utc_or_local set to :local.
time_with_datetime_fallback(utc_or_local, year, month=1, day=1, hour=0, min=0, sec=0, usec=0)
Returns a new Time if requested year can be accommodated by Ruby‘s Time class (i.e., if year is within either 1970..2038 or 1902..2038, depending on system architecture); otherwise returns a DateTime
utc_time(*args)
Wraps class method time_with_datetime_fallback with utc_or_local set to :utc.