class OraDate

def to_date

Returns a Date object which denotes self.
def to_date
  Date.new(year, month, day)
end

def to_datetime

The Time zone offset is that of the time the command started.
Note that this is not daylight saving time aware.

Returns a DateTime object which denotes self.
def to_datetime
  DateTime.new(year, month, day, hour, minute, second, @@tz_offset)
end

def to_json(options=nil)

Other tags:
    Private: -
def to_json(options=nil)
  to_datetime.to_json(options)
end

def to_time

Returns a Time object which denotes self.
def to_time
  begin
    Time.local(year, month, day, hour, minute, second)
  rescue ArgumentError
    msg = format("out of range of Time (expect between 1970-01-01 00:00:00 UTC and 2037-12-31 23:59:59, but %04d-%02d-%02d %02d:%02d:%02d %s)", year, month, day, hour, minute, second, Time.at(0).zone)
    raise RangeError.new(msg)
  end
end

def to_yaml(opts = {})

Other tags:
    Private: -
def to_yaml(opts = {})
  YAML.quick_emit(object_id, opts) do |out|
    out.scalar(taguri, self.to_s, :plain)
  end
end

def yaml_initialize(type, val)

Other tags:
    Private: -
def yaml_initialize(type, val)
  initialize(*val.split(/[ -\/:]+/).collect do |i| i.to_i end)
end