struct Date

Overview

Represents a year, month, and day with no time information.

Included Modules

Defined in:

t_cal/date.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(date : Tuple(Int32, Int32, Int32)) #

Creates a date from the return of Time#date.


[View source]

Instance Method Detail

def <=>(other : self) #

[View source]
def at_beginning_of_sunday_week : self #

[View source]
def day : Int32 #

[View source]
def day_of_week : Time::DayOfWeek #

See Time#day_of_week.


[View source]
def month : Int32 #

[View source]
def shift(years : Int = 0, months : Int = 0, weeks : Int = 0, days : Int = 0) : self #

See Time#shift.


[View source]
def to_ical : String #

Formats this date as an iCal DATE value.


[View source]
def to_time : Time #

Converts this date to a Time at midnight in UTC.


[View source]
def year : Int32 #

[View source]