|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DateTimeFactory
A factory for creating date-time instants
. This interface extends the ValueFactory
generic interface
and adds specific methods for creating instants for the current time (and time zone) as well as various combinations of
individual field values.
The factory creates date-time instants from strings that are in the standard ISO-8601 format. There are three supported styles: month-based, day-of-year-based, and week-based.
The month-based representation is the most common format of ISO8601, and is the format used in the XML standards for passing dates and times:
yyyy-mm-ddTHH:MM:SS.SSSZThe fields are separated by dashes and consist of:
�HH:mm
(or '0' if UTC)This format of ISO-8601 uses a single field to represent the day of the year:
yyyy-dddTHH:MM:SS.SSSZThe fields are separated by dashes and consist of:
�HH:mm
(or '0' if UTC)This format of ISO-8601 uses a single field to represent the day of the year:
yyyy-Www-dTHH:MM:SS.SSSZThe fields are separated by dashes and consist of:
�HH:mm
(or '0' if UTC)From Joda-Time: Weeks are always complete, and the first week of a year is the one that includes the first Thursday of the year. This definition can mean that the first week of a year starts in the previous year, and the last week finishes in the next year. The weekyear field is defined to refer to the year that owns the week, which may differ from the actual year.
Field Summary |
---|
Fields inherited from interface org.modeshape.jcr.value.ValueFactory |
---|
DEFAULT_DECODER, DEFAULT_ENCODER |
Method Summary | |
---|---|
DateTime |
create()
Create a date-time instance for the current time in the local time zone. |
DateTime |
create(DateTime original,
long offsetInMillis)
Create a date-time instance that is offset from the original by the specified amount. |
DateTime |
create(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisecondsOfSecond)
Create a date-time instance given the individual values for the fields |
DateTime |
create(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisecondsOfSecond,
int timeZoneOffsetHours)
Create a date-time instance given the individual values for the fields |
DateTime |
create(int year,
int monthOfYear,
int dayOfMonth,
int hourOfDay,
int minuteOfHour,
int secondOfMinute,
int millisecondsOfSecond,
String timeZoneId)
Create a date-time instance given the individual values for the fields |
DateTime |
createUtc()
Create a date-time instance for the current time in UTC. |
Methods inherited from interface org.modeshape.jcr.value.ValueFactory |
---|
create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getPropertyType |
Method Detail |
---|
DateTime create()
createUtc()
DateTime createUtc()
create()
DateTime create(DateTime original, long offsetInMillis)
original
- offsetInMillis
- the offset in milliseconds (positive or negative)
DateTime create(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisecondsOfSecond)
year
- the year of the eramonthOfYear
- the month of the yeardayOfMonth
- the day of the monthhourOfDay
- the hour of the dayminuteOfHour
- the minute of the hoursecondOfMinute
- the second of the minutemillisecondsOfSecond
- the milliseconds of the second
DateTime create(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisecondsOfSecond, int timeZoneOffsetHours)
year
- the year of the eramonthOfYear
- the month of the yeardayOfMonth
- the day of the monthhourOfDay
- the hour of the dayminuteOfHour
- the minute of the hoursecondOfMinute
- the second of the minutemillisecondsOfSecond
- the milliseconds of the secondtimeZoneOffsetHours
- the number of hours offset from UTC for the time zone
DateTime create(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute, int millisecondsOfSecond, String timeZoneId)
year
- the year of the eramonthOfYear
- the month of the yeardayOfMonth
- the day of the monthhourOfDay
- the hour of the dayminuteOfHour
- the minute of the hoursecondOfMinute
- the second of the minutemillisecondsOfSecond
- the milliseconds of the secondtimeZoneId
- the ID of the time zone (e.g, "PST", "UTC", "EDT"); may not be null
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |