|
ModeShape Distribution 3.1.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.jcr.value.basic.JodaDateTime
@Immutable public class JodaDateTime
Implementation of DateTime based upon the Joda-Time library.
| Constructor Summary | |
|---|---|
JodaDateTime()
|
|
JodaDateTime(Calendar jdkCalendar)
|
|
JodaDateTime(Date jdkDate)
|
|
JodaDateTime(org.joda.time.DateTime dateTime)
|
|
JodaDateTime(org.joda.time.DateTimeZone dateTimeZone)
|
|
JodaDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisecondsOfSecond)
|
|
JodaDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisecondsOfSecond,
org.joda.time.Chronology chronology)
|
|
JodaDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisecondsOfSecond,
org.joda.time.DateTimeZone dateTimeZone)
|
|
JodaDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisecondsOfSecond,
int timeZoneOffsetHours)
|
|
JodaDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisecondsOfSecond,
String timeZoneId)
|
|
JodaDateTime(long milliseconds)
|
|
JodaDateTime(long milliseconds,
org.joda.time.Chronology chronology)
|
|
JodaDateTime(long milliseconds,
String timeZoneId)
|
|
JodaDateTime(String iso8601)
|
|
JodaDateTime(String iso8601,
String timeZoneId)
|
|
| Method Summary | |
|---|---|
int |
compareTo(DateTime that)
|
boolean |
equals(Object obj)
|
int |
getCenturyOfEra()
Get the era of this instance in time. |
int |
getDayOfMonth()
Get the day of the month value of this instance in time. |
int |
getDayOfWeek()
Get the day of the week value of this instance in time. |
int |
getDayOfYear()
Get the day of the year of this instance in time. |
int |
getEra()
Get the era of this instance in time. |
int |
getHourOfDay()
Get the hour of the day of this instance in time. |
long |
getMilliseconds()
Get the number of milliseconds from 1970-01-01T00:00Z. |
long |
getMillisecondsInUtc()
Get the number of milliseconds from 1970-01-01T00:00Z with this time converted to UTC. |
int |
getMillisOfSecond()
Get the milliseconds of the second value of this instance in time. |
int |
getMinuteOfHour()
Get the minute of this instance in time. |
int |
getMonthOfYear()
Get the month of the year of this instance in time. |
int |
getSecondOfMinute()
Get the seconds of the minute value of this instance in time. |
String |
getString()
Get the ISO-8601 representation of this instance in time. |
String |
getTimeZoneId()
Get the identifier of the time zone in which this instant is defined |
int |
getTimeZoneOffsetHours()
Get the number of hours that this time zone is offset from UTC. |
int |
getWeekOfWeekyear()
Get the week of the weekyear of this instance in time. |
int |
getWeekyear()
Get the era of this instance in time. |
int |
getYear()
Get the era of this instance in time. |
int |
getYearOfCentury()
Get the year of this century of this instance in time. |
int |
getYearOfEra()
Get the year of the era of this instance in time. |
int |
hashCode()
|
boolean |
isAfter(DateTime other)
Return whether this date-time is later than the supplied date-time. |
boolean |
isBefore(DateTime other)
Return whether this date-time is earlier than the supplied date-time. |
boolean |
isSameAs(DateTime other)
Return whether this date-time is exactly the the same as the supplied date-time. |
DateTime |
minus(long timeAmount,
TimeUnit unit)
Subtract the specified about of time in the supplied units. |
DateTime |
minusDays(int days)
Subtract the specified number of days from this time instant. |
DateTime |
minusHours(int hours)
Subtract the specified number of hours from this time instant. |
DateTime |
minusMillis(int milliseconds)
Subtract the specified number of milliseconds from this time instant. |
DateTime |
minusMinutes(int minutes)
Subtract the specified number of minutes from this time instant. |
DateTime |
minusMonths(int months)
Subtract the specified number of months from this time instant. |
DateTime |
minusSeconds(int seconds)
Subtract the specified number of seconds from this time instant. |
DateTime |
minusWeeks(int weeks)
Subtract the specified number of weeks from this time instant. |
DateTime |
minusYears(int years)
Subtract the specified number of years from this time instant. |
DateTime |
plus(long timeAmount,
TimeUnit unit)
Add the specified about of time in the supplied units. |
DateTime |
plusDays(int days)
Add the specified number of days from this time instant. |
DateTime |
plusHours(int hours)
Add the specified number of hours from this time instant. |
DateTime |
plusMillis(int milliseconds)
Add the specified number of milliseconds from this time instant. |
DateTime |
plusMinutes(int minutes)
Add the specified number of minutes from this time instant. |
DateTime |
plusMonths(int months)
Add the specified number of months from this time instant. |
DateTime |
plusSeconds(int seconds)
Add the specified number of seconds from this time instant. |
DateTime |
plusWeeks(int weeks)
Add the specified number of weeks from this time instant. |
DateTime |
plusYears(int years)
Add the specified number of years from this time instant. |
Calendar |
toCalendar()
Get this instance represented as a standard JDK Calendar instance, in the default locale. |
Calendar |
toCalendar(Locale locale)
Get this instance represented as a standard JDK Calendar instance, in the specified locale
. |
Date |
toDate()
Get this instance represented as a standard JDK Date instance. |
GregorianCalendar |
toGregorianCalendar()
Get this instance represented as a standard JDK GregorianCalendar instance. |
String |
toString()
|
DateTime |
toTimeZone(String timeZoneId)
Convert this time to the time zone given by the supplied identifier. |
DateTime |
toUtcTimeZone()
Convert this time to the same instant in the UTC time zone. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JodaDateTime()
public JodaDateTime(String iso8601)
public JodaDateTime(String iso8601,
String timeZoneId)
public JodaDateTime(long milliseconds)
public JodaDateTime(long milliseconds,
org.joda.time.Chronology chronology)
public JodaDateTime(long milliseconds,
String timeZoneId)
public JodaDateTime(org.joda.time.DateTimeZone dateTimeZone)
public JodaDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisecondsOfSecond)
public JodaDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisecondsOfSecond,
org.joda.time.Chronology chronology)
public JodaDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisecondsOfSecond,
org.joda.time.DateTimeZone dateTimeZone)
public JodaDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisecondsOfSecond,
int timeZoneOffsetHours)
public JodaDateTime(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisecondsOfSecond,
String timeZoneId)
public JodaDateTime(Date jdkDate)
public JodaDateTime(Calendar jdkCalendar)
public JodaDateTime(org.joda.time.DateTime dateTime)
| Method Detail |
|---|
public int getCenturyOfEra()
DateTime
getCenturyOfEra in interface DateTimepublic int getDayOfMonth()
DateTime
getDayOfMonth in interface DateTimepublic int getDayOfWeek()
DateTime
getDayOfWeek in interface DateTimepublic int getDayOfYear()
DateTime
getDayOfYear in interface DateTimepublic int getEra()
DateTime
getEra in interface DateTimepublic int getHourOfDay()
DateTime
getHourOfDay in interface DateTimepublic int getMillisOfSecond()
DateTime
getMillisOfSecond in interface DateTimepublic long getMilliseconds()
DateTimeDate
and Calendar classes.
getMilliseconds in interface DateTimepublic long getMillisecondsInUtc()
DateTimeDate and Calendar classes.
getMillisecondsInUtc in interface DateTimepublic int getMinuteOfHour()
DateTime
getMinuteOfHour in interface DateTimepublic int getMonthOfYear()
DateTime
getMonthOfYear in interface DateTimepublic int getSecondOfMinute()
DateTime
getSecondOfMinute in interface DateTimepublic String getString()
DateTimeyyyy-mm-ddTHH:MM:SS.SSSZThe fields are separated by dashes and consist of:
�HH:mm (or '0' if UTC)
getString in interface DateTimepublic int getWeekOfWeekyear()
DateTime
getWeekOfWeekyear in interface DateTimepublic int getWeekyear()
DateTime
getWeekyear in interface DateTimepublic int getYear()
DateTime
getYear in interface DateTimepublic int getYearOfCentury()
DateTime
getYearOfCentury in interface DateTimepublic int getYearOfEra()
DateTime
getYearOfEra in interface DateTimepublic int getTimeZoneOffsetHours()
DateTime
getTimeZoneOffsetHours in interface DateTimepublic String getTimeZoneId()
DateTime
getTimeZoneId in interface DateTimepublic Calendar toCalendar()
DateTimeCalendar instance, in the default locale.
toCalendar in interface DateTimepublic Calendar toCalendar(Locale locale)
DateTimeCalendar instance, in the specified locale
.
toCalendar in interface DateTimelocale - the locale in which the Calendar instance is desired; may be null if the default
locale is to be used.
public Date toDate()
DateTimeDate instance. Note that this conversion loses the time
zone information, as the standard JDK Date does not represent time zones.
toDate in interface DateTimepublic GregorianCalendar toGregorianCalendar()
DateTimeGregorianCalendar instance.
toGregorianCalendar in interface DateTimepublic int compareTo(DateTime that)
compareTo in interface Comparable<DateTime>public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Objectpublic DateTime toUtcTimeZone()
DateTime
toUtcTimeZone in interface DateTimepublic DateTime toTimeZone(String timeZoneId)
DateTime
toTimeZone in interface DateTimetimeZoneId - the time zone identifier
public boolean isBefore(DateTime other)
DateTime
isBefore in interface DateTimeother - the date-time to compare with
#compareTo(DateTime),
DateTime.isSameAs(DateTime),
DateTime.isAfter(DateTime)public boolean isSameAs(DateTime other)
DateTimethe equals method in that it can be arbitrarily more strict, checking, for example, not only the logical equivalence of
the other date time, but also arbitrary additional fields such as the time zone.
isSameAs in interface DateTimeother - the date-time to compare with
#compareTo(DateTime),
DateTime.isBefore(DateTime),
DateTime.isAfter(DateTime)public boolean isAfter(DateTime other)
DateTime
isAfter in interface DateTimeother - the date-time to compare with
#compareTo(DateTime),
DateTime.isBefore(DateTime),
DateTime.isSameAs(DateTime)
public DateTime minus(long timeAmount,
TimeUnit unit)
DateTime
minus in interface DateTimetimeAmount - the amount of time to subtractunit - the units of the amount of time; may not be null
public DateTime minusDays(int days)
DateTime
minusDays in interface DateTimedays - the number of days to subtract
public DateTime minusHours(int hours)
DateTime
minusHours in interface DateTimehours - the number of hours to subtract
public DateTime minusMillis(int milliseconds)
DateTime
minusMillis in interface DateTimemilliseconds - the number of milliseconds to subtract
public DateTime minusMinutes(int minutes)
DateTime
minusMinutes in interface DateTimeminutes - the number of minutes to subtract
public DateTime minusMonths(int months)
DateTime
minusMonths in interface DateTimemonths - the number of months to subtract
public DateTime minusSeconds(int seconds)
DateTime
minusSeconds in interface DateTimeseconds - the number of seconds to subtract
public DateTime minusWeeks(int weeks)
DateTime
minusWeeks in interface DateTimeweeks - the number of weeks to subtract
public DateTime minusYears(int years)
DateTime
minusYears in interface DateTimeyears - the number of years to subtract
public DateTime plus(long timeAmount,
TimeUnit unit)
DateTime
plus in interface DateTimetimeAmount - the amount of time to addunit - the units of the amount of time; may not be null
public DateTime plusDays(int days)
DateTime
plusDays in interface DateTimedays - the number of days to add
public DateTime plusHours(int hours)
DateTime
plusHours in interface DateTimehours - the number of hours to add
public DateTime plusMillis(int milliseconds)
DateTime
plusMillis in interface DateTimemilliseconds - the number of milliseconds to add
public DateTime plusMinutes(int minutes)
DateTime
plusMinutes in interface DateTimeminutes - the number of minutes to add
public DateTime plusMonths(int months)
DateTime
plusMonths in interface DateTimemonths - the number of months to add
public DateTime plusSeconds(int seconds)
DateTime
plusSeconds in interface DateTimeseconds - the number of seconds to add
public DateTime plusWeeks(int weeks)
DateTime
plusWeeks in interface DateTimeweeks - the number of weeks to add
public DateTime plusYears(int years)
DateTime
plusYears in interface DateTimeyears - the number of years to add
|
ModeShape Distribution 3.1.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||