Class: ActiveRecord::Type::Time::Value
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::Time
|
|
Instance Chain:
|
|
Inherits: | Time |
Defined in: | activerecord/lib/active_record/type/time.rb |
Constant Summary
::DateAndTime::Calculations
- Included
::Time
- Inherited
Class Attribute Summary
::Time
- Inherited
.zone | Returns the TimeZone for the current request, if this has been set (via Time.zone=). |
.zone= | Sets Time.zone to a TimeZone object for the current request/thread. |
.zone_default |
Class Method Summary
::Time
- Inherited
.=== | Overriding case equality method so that it returns true for |
.at | Alias for Time.at_with_coercion. |
.at_with_coercion | Layers additional behavior on Time.at so that |
.at_without_coercion, | |
.current | Returns |
.days_in_month | Returns the number of days in the given month. |
.days_in_year | Returns the number of days in the given year. |
.find_zone | Returns a TimeZone instance matching the time zone provided. |
.find_zone! | Returns a TimeZone instance matching the time zone provided. |
.rfc3339 | Creates a |
.use_zone |
Instance Attribute Summary
::Time
- Inherited
#acts_like_time? | Duck-types as a Time-like class. |
#blank? | No Time is blank: |
::DateAndTime::Compatibility
- Included
::DateAndTime::Calculations
- Included
#future? | Returns true if the date/time is in the future. |
#next_day? | Alias for DateAndTime::Calculations#tomorrow?. |
#on_weekday? | Returns true if the date/time does not fall on a Saturday or Sunday. |
#on_weekend? | Returns true if the date/time falls on a Saturday or Sunday. |
#past? | Returns true if the date/time is in the past. |
#prev_day? | Alias for DateAndTime::Calculations#yesterday?. |
#today? | Returns true if the date/time is today. |
#tomorrow | Returns a new date/time representing tomorrow. |
#tomorrow? | Returns true if the date/time is tomorrow. |
#yesterday | Returns a new date/time representing yesterday. |
#yesterday? | Returns true if the date/time is yesterday. |
Instance Method Summary
::Time
- Inherited
#+ | Alias for Time#plus_with_duration. |
#- | Alias for Time#minus_with_coercion. |
#<=> | Alias for Time#compare_with_coercion. |
#advance | Uses Date to provide precise |
#ago | Returns a new |
#at_beginning_of_day | Alias for Time#beginning_of_day. |
#at_beginning_of_hour | Alias for Time#beginning_of_hour. |
#at_beginning_of_minute | Alias for Time#beginning_of_minute. |
#at_end_of_day | Alias for Time#end_of_day. |
#at_end_of_hour | Alias for Time#end_of_hour. |
#at_end_of_minute | Alias for Time#end_of_minute. |
#at_midday | Alias for Time#middle_of_day. |
#at_middle_of_day | Alias for Time#middle_of_day. |
#at_midnight | Alias for Time#beginning_of_day. |
#at_noon | Alias for Time#middle_of_day. |
#beginning_of_day | Returns a new |
#beginning_of_hour | Returns a new |
#beginning_of_minute | Returns a new |
#ceil, | |
#change | Returns a new |
#compare_with_coercion | Layers additional behavior on Time#<=> so that |
#compare_without_coercion, | |
#end_of_day | Returns a new |
#end_of_hour | Returns a new |
#end_of_minute | Returns a new |
#eql? | Alias for Time#eql_with_coercion. |
#eql_with_coercion | Layers additional behavior on Time#eql? so that |
#eql_without_coercion, #floor, | |
#formatted_offset | Returns a formatted string of the offset from UTC, or an alternative string if the time zone is already UTC. |
#in | Alias for Time#since. |
#midday | Alias for Time#middle_of_day. |
#middle_of_day | Returns a new |
#midnight | Alias for Time#beginning_of_day. |
#minus_with_coercion | Time#- can also be used to determine the number of seconds between two |
#minus_without_coercion | Alias for Time#-. |
#minus_without_duration, | |
#next_day | Returns a new time the specified number of days in the future. |
#next_month | Returns a new time the specified number of months in the future. |
#next_year | Returns a new time the specified number of years in the future. |
#noon | Alias for Time#middle_of_day. |
#plus_without_duration, | |
#prev_day | Returns a new time the specified number of days ago. |
#prev_month | Returns a new time the specified number of months ago. |
#prev_year | Returns a new time the specified number of years ago. |
#rfc3339 | Aliased to |
#sec_fraction | Returns the fraction of a second as a |
#seconds_since_midnight | Returns the number of seconds since 00:00:00. |
#seconds_until_end_of_day | Returns the number of seconds until 23:59:59. |
#since | Returns a new |
#to_default_s, | |
#to_formatted_s | Alias for Time#to_fs. |
#to_fs | Converts to a formatted string. |
#to_time | Either return |
#as_json, #minus_with_duration, #plus_with_duration |
::DateAndTime::Calculations
- Included
#after? | Returns true if the date/time falls after |
#all_day | Returns a |
#all_month | Returns a |
#all_quarter | Returns a |
#all_week | Returns a |
#all_year | Returns a |
#at_beginning_of_month | Alias for DateAndTime::Calculations#beginning_of_month. |
#at_beginning_of_quarter | |
#at_beginning_of_week | Alias for DateAndTime::Calculations#beginning_of_week. |
#at_beginning_of_year | Alias for DateAndTime::Calculations#beginning_of_year. |
#at_end_of_month | Alias for DateAndTime::Calculations#end_of_month. |
#at_end_of_quarter | Alias for DateAndTime::Calculations#end_of_quarter. |
#at_end_of_week | Alias for DateAndTime::Calculations#end_of_week. |
#at_end_of_year | Alias for DateAndTime::Calculations#end_of_year. |
#before? | Returns true if the date/time falls before |
#beginning_of_month | Returns a new date/time at the start of the month. |
#beginning_of_quarter | Returns a new date/time at the start of the quarter. |
#beginning_of_week | Returns a new date/time representing the start of this week on the given day. |
#beginning_of_year | Returns a new date/time at the beginning of the year. |
#days_ago | Returns a new date/time the specified number of days ago. |
#days_since | Returns a new date/time the specified number of days in the future. |
#days_to_week_start | Returns the number of days to the start of the week on the given day. |
#end_of_month | Returns a new date/time representing the end of the month. |
#end_of_quarter | Returns a new date/time at the end of the quarter. |
#end_of_week | Returns a new date/time representing the end of this week on the given day. |
#end_of_year | Returns a new date/time representing the end of the year. |
#last_month | Short-hand for |
#last_quarter | Alias for DateAndTime::Calculations#prev_quarter. |
#last_week | Alias for DateAndTime::Calculations#prev_week. |
#last_weekday | Alias for DateAndTime::Calculations#prev_weekday. |
#last_year | Short-hand for |
#monday | Returns Monday of this week assuming that week starts on Monday. |
#months_ago | Returns a new date/time the specified number of months ago. |
#months_since | Returns a new date/time the specified number of months in the future. |
#next_occurring | Returns a new date/time representing the next occurrence of the specified day of week. |
#next_quarter | Short-hand for |
#next_week | Returns a new date/time representing the given day in the next week. |
#next_weekday | Returns a new date/time representing the next weekday. |
#prev_occurring | Returns a new date/time representing the previous occurrence of the specified day of week. |
#prev_quarter | Short-hand for |
#prev_week | Returns a new date/time representing the given day in the previous week. |
#prev_weekday | Returns a new date/time representing the previous weekday. |
#quarter | Returns the quarter for a date/time. |
#sunday | Returns Sunday of this week assuming that week starts on Monday. |
#weeks_ago | Returns a new date/time the specified number of weeks ago. |
#weeks_since | Returns a new date/time the specified number of weeks in the future. |
#years_ago | Returns a new date/time the specified number of years ago. |
#years_since | Returns a new date/time the specified number of years in the future. |
#copy_time_to, #days_span, #first_hour, #last_hour |
::DateAndTime::Zones
- Included
#in_time_zone | Returns the simultaneous time in Time.zone if a zone is given or if Time.zone_default is set. |
#time_with_zone |