struct

Date

Inherits Steppable < Comparable < Struct < Value < Object

Constants

DAY_NAMES_LONG = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"}
DAY_NAMES_SHORT = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}
MONTH_NAMES_LONG = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}
MONTH_NAMES_SHORT = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}
VERSION = "0.1.0"

Constructors

new(year : Int16, month : Int8, day : Int8)
Source
new(year : Int, month : Int, day : Int)
Source
new(time : Time)
Source
new(rs : DB::ResultSet)
Source

Class methods

parse(string : String, pattern : String = "%F")
Source

Instance methods

+(duration : Duration)
Source
-(other : Duration | Time::Span)
Source
<=>(other : self)
Source
at_beginning_of_month
Source
at_beginning_of_week(start_of_week : DayOfWeek) : self
Source
at_beginning_of_year
Source
at_end_of_month
Source
at_end_of_week(start_of_week : DayOfWeek) : self
Source
at_end_of_year
Source
day_of_week
Source
month
Source
succ
Source
to_s(io : IO, format : String) : Nil
Source
to_s(io : IO) : Nil

Same as #inspect(io).

Source
to_s(format : String) : String
Source
to_time(location : Time::Location = Time::Location.local)
Source
year
Source

Nested types