Method: Date#next_year
- Defined in:
- date_core.c
#next_year(n = 1) ⇒ Object
Equivalent to #>> with argument n * 12.
6554 6555 6556 6557 6558 6559 6560 6561 6562 6563 |
# File 'date_core.c', line 6554
static VALUE
d_lite_next_year(int argc, VALUE *argv, VALUE self)
{
VALUE n;
rb_scan_args(argc, argv, "01", &n);
if (argc < 1)
n = INT2FIX(1);
return d_lite_rshift(self, f_mul(n, INT2FIX(12)));
}
|