public interface

ReadWritableDateTime

implements ReadWritableInstant ReadableDateTime
org.joda.time.ReadWritableDateTime
Known Indirect Subclasses

Class Overview

Defines an instant in time that can be queried and modified using datetime fields.

The implementation of this interface will be mutable. It may provide more advanced methods than those in the interface.

Methods in your application should be defined using ReadWritableDateTime as a parameter if the method wants to manipulate and change a date in simple ways.

Summary

Public Methods
abstract void addDays(int days)
Add a number of days to the date.
abstract void addHours(int hours)
Add a number of hours to the date.
abstract void addMillis(int millis)
Add a number of milliseconds to the date.
abstract void addMinutes(int minutes)
Add a number of minutes to the date.
abstract void addMonths(int months)
Add a number of months to the date.
abstract void addSeconds(int seconds)
Add a number of seconds to the date.
abstract void addWeeks(int weeks)
Add a number of weeks to the date.
abstract void addWeekyears(int weekyears)
Add a number of weekyears to the date.
abstract void addYears(int years)
Add a number of years to the date.
abstract void setDate(int year, int monthOfYear, int dayOfMonth)
Set the date from fields.
abstract void setDateTime(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond)
Set the date and time from fields.
abstract void setDayOfMonth(int dayOfMonth)
Set the day of the month to the specified value.
abstract void setDayOfWeek(int dayOfWeek)
Set the day of week to the specified value.
abstract void setDayOfYear(int dayOfYear)
Set the day of year to the specified value.
abstract void setHourOfDay(int hourOfDay)
Set the hour of the day to the specified value.
abstract void setMillisOfDay(int millisOfDay)
Set the millis of the day to the specified value.
abstract void setMillisOfSecond(int millisOfSecond)
Set the millis of the second to the specified value.
abstract void setMinuteOfDay(int minuteOfDay)
Set the minute of the day to the specified value.
abstract void setMinuteOfHour(int minuteOfHour)
Set the minute of the hour to the specified value.
abstract void setMonthOfYear(int monthOfYear)
Set the month of the year to the specified value.
abstract void setSecondOfDay(int secondOfDay)
Set the second of the day to the specified value.
abstract void setSecondOfMinute(int secondOfMinute)
Set the second of the minute to the specified value.
abstract void setTime(int hour, int minuteOfHour, int secondOfMinute, int millisOfSecond)
Set the time from fields.
abstract void setWeekOfWeekyear(int weekOfWeekyear)
Set the week of weekyear to the specified value.
abstract void setWeekyear(int weekyear)
Set the weekyear to the specified value.
abstract void setYear(int year)
Set the year to the specified value.
[Expand]
Inherited Methods
From interface java.lang.Comparable
From interface org.joda.time.ReadWritableInstant
From interface org.joda.time.ReadableDateTime
From interface org.joda.time.ReadableInstant

Public Methods

public abstract void addDays (int days)

Add a number of days to the date.

Parameters
days the days to add
Throws
IllegalArgumentException if the value is invalid

public abstract void addHours (int hours)

Add a number of hours to the date.

Parameters
hours the hours to add
Throws
IllegalArgumentException if the value is invalid

public abstract void addMillis (int millis)

Add a number of milliseconds to the date. The implementation of this method differs from the add(long) method in that a DateTimeField performs the addition.

Parameters
millis the milliseconds to add
Throws
IllegalArgumentException if the value is invalid

public abstract void addMinutes (int minutes)

Add a number of minutes to the date.

Parameters
minutes the minutes to add
Throws
IllegalArgumentException if the value is invalid

public abstract void addMonths (int months)

Add a number of months to the date.

Parameters
months the months to add
Throws
IllegalArgumentException if the value is invalid

public abstract void addSeconds (int seconds)

Add a number of seconds to the date.

Parameters
seconds the seconds to add
Throws
IllegalArgumentException if the value is invalid

public abstract void addWeeks (int weeks)

Add a number of weeks to the date.

Parameters
weeks the weeks to add
Throws
IllegalArgumentException if the value is invalid

public abstract void addWeekyears (int weekyears)

Add a number of weekyears to the date.

Parameters
weekyears the weekyears to add
Throws
IllegalArgumentException if the value is invalid

public abstract void addYears (int years)

Add a number of years to the date.

Parameters
years the years to add
Throws
IllegalArgumentException if the value is invalid

public abstract void setDate (int year, int monthOfYear, int dayOfMonth)

Set the date from fields. The time part of this object will be unaffected.

Parameters
year the year
monthOfYear the month of the year
dayOfMonth the day of the month
Throws
IllegalArgumentException if any value is invalid

public abstract void setDateTime (int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond)

Set the date and time from fields.

Parameters
year the year
monthOfYear the month of the year
dayOfMonth the day of the month
hourOfDay the hour of the day
minuteOfHour the minute of the hour
secondOfMinute the second of the minute
millisOfSecond the millisecond of the second
Throws
IllegalArgumentException if any value is invalid

public abstract void setDayOfMonth (int dayOfMonth)

Set the day of the month to the specified value.

Parameters
dayOfMonth the day of the month
Throws
IllegalArgumentException if the value is invalid

public abstract void setDayOfWeek (int dayOfWeek)

Set the day of week to the specified value.

Parameters
dayOfWeek the day of the week
Throws
IllegalArgumentException if the value is invalid

public abstract void setDayOfYear (int dayOfYear)

Set the day of year to the specified value.

Parameters
dayOfYear the day of the year
Throws
IllegalArgumentException if the value is invalid

public abstract void setHourOfDay (int hourOfDay)

Set the hour of the day to the specified value.

Parameters
hourOfDay the hour of day
Throws
IllegalArgumentException if the value is invalid

public abstract void setMillisOfDay (int millisOfDay)

Set the millis of the day to the specified value.

Parameters
millisOfDay the millis of day
Throws
IllegalArgumentException if the value is invalid

public abstract void setMillisOfSecond (int millisOfSecond)

Set the millis of the second to the specified value.

Parameters
millisOfSecond the millis of second
Throws
IllegalArgumentException if the value is invalid

public abstract void setMinuteOfDay (int minuteOfDay)

Set the minute of the day to the specified value.

Parameters
minuteOfDay the minute of day
Throws
IllegalArgumentException if the value is invalid

public abstract void setMinuteOfHour (int minuteOfHour)

Set the minute of the hour to the specified value.

Parameters
minuteOfHour the minute of hour
Throws
IllegalArgumentException if the value is invalid

public abstract void setMonthOfYear (int monthOfYear)

Set the month of the year to the specified value.

Parameters
monthOfYear the month of the year
Throws
IllegalArgumentException if the value is invalid

public abstract void setSecondOfDay (int secondOfDay)

Set the second of the day to the specified value.

Parameters
secondOfDay the second of day
Throws
IllegalArgumentException if the value is invalid

public abstract void setSecondOfMinute (int secondOfMinute)

Set the second of the minute to the specified value.

Parameters
secondOfMinute the second of minute
Throws
IllegalArgumentException if the value is invalid

public abstract void setTime (int hour, int minuteOfHour, int secondOfMinute, int millisOfSecond)

Set the time from fields. The date part of this object will be unaffected.

Parameters
hour the hour
minuteOfHour the minute of the hour
secondOfMinute the second of the minute
millisOfSecond the millisecond of the second
Throws
IllegalArgumentException if any value is invalid

public abstract void setWeekOfWeekyear (int weekOfWeekyear)

Set the week of weekyear to the specified value.

Parameters
weekOfWeekyear the week of the weekyear
Throws
IllegalArgumentException if the value is invalid

public abstract void setWeekyear (int weekyear)

Set the weekyear to the specified value.

Parameters
weekyear the weekyear
Throws
IllegalArgumentException if the value is invalid

public abstract void setYear (int year)

Set the year to the specified value.

Parameters
year the year
Throws
IllegalArgumentException if the value is invalid