-(x)
public
If x is a Numeric value, create a new Date object
that is x days earlier than the current one.
If x is a Date, return the number of days
between the two dates; or, more precisely, how many days later the current
date is than x.
If x is neither Numeric nor a Date, a TypeError is
raised.
Show source
def - (x)
case x
when Numeric; return self.class.new!(@ajd - x, @of, @sg)
when Date; return @ajd - x.ajd
end
raise TypeError, 'expected numeric or date'
end