[ruby/date] [DOC] specify the unit of return value for Date#-

https://github.com/ruby/date/commit/b3a2c7611e
This commit is contained in:
p0pemaru 2023-08-14 21:40:21 +09:00 committed by git
parent 77e5e06846
commit cb6dcc7746

View File

@ -6326,9 +6326,11 @@ minus_dd(VALUE self, VALUE other)
* call-seq:
* d - other -> date or rational
*
* Returns the difference between the two dates if the other is a date
* object. If the other is a numeric value, returns a date object
* pointing +other+ days before self. If the other is a fractional number,
* If the other is a date object, returns a Rational
* whose value is the difference between the two dates in days.
* If the other is a numeric value, returns a date object
* pointing +other+ days before self.
* If the other is a fractional number,
* assumes its precision is at most nanosecond.
*
* Date.new(2001,2,3) - 1 #=> #<Date: 2001-02-02 ...>