org.unitils.jodatime.annotation
Annotation Type OffsetDateTime


@Target(value={METHOD,TYPE})
@Retention(value=RUNTIME)
public @interface OffsetDateTime

Sets the DateTime to an offset relative to the current system time. Basicly the DateTime in millis will be System.currentTimeMillis() + offset. The offset is calculated as a Period in years, months, days, hours, minutes, seconds, weeks and millis. Which means the user doesn't have to calculate the offset for a given year, but can just set the years value to -1 to go back one year in time.

Since:
1.0.0
Author:
Christophe De Blende, Jeroen Horemans, Thomas De Rycke, Willemijn Wouters

Optional Element Summary
 int days
           
 int hours
           
 int millis
           
 int minutes
           
 int months
           
 int seconds
           
 int weeks
           
 int years
           
 

years

public abstract int years
Returns:
offset in years.
Default:
0

months

public abstract int months
Returns:
offset in months.
Default:
0

days

public abstract int days
Returns:
offset in days.
Default:
0

hours

public abstract int hours
Returns:
offset in hours.
Default:
0

minutes

public abstract int minutes
Returns:
offset in minutes.
Default:
0

seconds

public abstract int seconds
Returns:
offset in seconds.
Default:
0

weeks

public abstract int weeks
Returns:
offset in weeks.
Default:
0

millis

public abstract int millis
Returns:
offset in millis.
Default:
0


Copyright © 2013-2014. All Rights Reserved.