class Tomlrb::LocalDate
Public Class Methods
Source
# File lib/tomlrb/local_date.rb, line 9 def initialize(year, month, day) @time = Time.new(year, month, day, 0, 0, 0, '-00:00') end
Public Instance Methods
Source
# File lib/tomlrb/local_date.rb, line 24 def ==(other) other.kind_of?(self.class) && to_time == other.to_time end
Source
# File lib/tomlrb/local_date.rb, line 29 def inspect "#<#{self.class}: #{to_s}>" end
Source
# File lib/tomlrb/local_date.rb, line 15 def to_time(offset='-00:00') return @time if offset == '-00:00' Time.new(year, month, day, 0, 0, 0, offset) end
@param offset see {LocalDateTime#to_time} @return [Time] 00:00:00 of the date