public final class RubyDate.DateShifter
extends java.lang.Object
RubyDate.DateShifter
shifts a Date by an interval of time and creates a new
RubyDate
from it.Constructor and Description |
---|
RubyDate.DateShifter(java.util.Date date,
int interval)
Returns a
RubyDate.DateShifter . |
Modifier and Type | Method and Description |
---|---|
RubyDate |
days()
Shifts the time by days.
|
RubyDate |
hours()
Shifts the time by hours.
|
RubyDate |
milliseconds()
Shifts the time by milliseconds.
|
RubyDate |
minutes()
Shifts the time by minutes.
|
RubyDate |
months()
Shifts the time by months.
|
RubyDate |
seconds()
Shifts the time by seconds.
|
RubyDate |
weeks()
Shifts the time by weeks.
|
RubyDate |
years()
Shifts the time by years.
|
public RubyDate.DateShifter(java.util.Date date, int interval)
RubyDate.DateShifter
.date
- a Dateinterval
- of time to be shifted