Package com.helger.commons.datetime
Class PDTFactory
java.lang.Object
com.helger.commons.datetime.PDTFactory
Philip's Date Time (PDT) factory. Create and convert different date and time
stuff into each other. Everything that creates a
ZonedDateTime,
OffsetDateTime, OffsetDate or OffsetTime uses the
default time zone from PDTConfig if necessary. The addition "UTC" to
the name of the method indicates the explicit usage of the UTC time zone.- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptionstatic Calendarstatic Calendarstatic DatecreateDate(OffsetDate aOD) static DatecreateDate(XMLOffsetDate aOD) static Datestatic Datestatic Datestatic Datestatic Datestatic Datestatic Datestatic DatecreateDateForDate(int nYear, Month eMonth, int nDayOfMonth) static DatecreateDateForTime(int nHour, int nMin, int nSec) static GregorianCalendarstatic GregorianCalendarstatic LocalDatecreateLocalDate(int nYear, Month eMonth, int nDayOfMonth) static LocalDatecreateLocalDate(long nMillis) static LocalDatestatic LocalDatestatic LocalDatestatic LocalDatestatic LocalDatestatic LocalDatestatic LocalDatestatic LocalDatestatic LocalDatestatic LocalDatestatic LocalDatestatic LocalDateTimecreateLocalDateTime(int nYear, Month eMonth, int nDay) static LocalDateTimecreateLocalDateTime(int nYear, Month eMonth, int nDay, int nHour, int nMinute) static LocalDateTimecreateLocalDateTime(int nYear, Month eMonth, int nDay, int nHour, int nMinute, int nSecond) static LocalDateTimecreateLocalDateTime(long nMillis) static LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalTimecreateLocalTime(int nHour, int nMinute, int nSecond) static LocalTimecreateLocalTime(long nMillis) static LocalTimestatic LocalTimestatic LocalTimestatic LocalTimestatic LocalTimestatic LocalTimestatic OffsetDatecreateOffsetDate(int nYear, Month eMonth, int nDayOfMonth) static OffsetDatecreateOffsetDate(int nYear, Month eMonth, int nDayOfMonth, ZoneOffset aOffset) static OffsetDatecreateOffsetDate(long nMillis) static OffsetDatestatic OffsetDatestatic OffsetDatecreateOffsetDate(Instant a, ZoneOffset aOffset) static OffsetDatestatic OffsetDatecreateOffsetDate(LocalDate a, ZoneOffset aOffset) static OffsetDatestatic OffsetDatecreateOffsetDate(LocalDateTime a, ZoneOffset aOffset) static OffsetDatestatic OffsetDatestatic OffsetDatestatic OffsetDatestatic OffsetDatestatic OffsetDatestatic OffsetDateTimecreateOffsetDateTime(int nYear, Month eMonth, int nDay) static OffsetDateTimecreateOffsetDateTime(int nYear, Month eMonth, int nDay, int nHour, int nMinute, int nSecond) static OffsetDateTimecreateOffsetDateTime(int nYear, Month eMonth, int nDay, int nHour, int nMinute, int nSecond, ZoneOffset aZoneOffset) static OffsetDateTimecreateOffsetDateTime(long nMillis) static OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimecreateOffsetDateTimeUTC(int nYear, Month eMonth, int nDay) static OffsetDateTimecreateOffsetDateTimeUTC(int nYear, Month eMonth, int nDay, int nHour, int nMinute, int nSecond) static OffsetDateTimecreateOffsetDateTimeUTC(long nMillis) static OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetTimecreateOffsetTime(int nHour, int nMinute, int nSecond, ZoneOffset aOfs) static OffsetTimecreateOffsetTime(long nMillis) static OffsetTimestatic OffsetTimestatic OffsetTimecreateOffsetTime(LocalDateTime a, ZoneOffset aOfs) static OffsetTimestatic OffsetTimecreateOffsetTime(LocalTime a, ZoneOffset aOfs) static OffsetTimestatic OffsetTimestatic OffsetTimestatic OffsetTimestatic XMLOffsetDatecreateXMLOffsetDate(int nYear, Month eMonth, int nDayOfMonth) static XMLOffsetDatecreateXMLOffsetDate(int nYear, Month eMonth, int nDayOfMonth, ZoneOffset aOffset) static XMLOffsetDatecreateXMLOffsetDate(long nMillis) static XMLOffsetDatestatic XMLOffsetDatestatic XMLOffsetDatestatic XMLOffsetDatecreateXMLOffsetDate(Instant a, ZoneId aZoneId) static XMLOffsetDatestatic XMLOffsetDatecreateXMLOffsetDate(LocalDate a, ZoneOffset aOffset) static XMLOffsetDatestatic XMLOffsetDatecreateXMLOffsetDate(LocalDateTime a, ZoneOffset aOffset) static XMLOffsetDatestatic XMLOffsetDatestatic XMLOffsetDatestatic XMLOffsetDatestatic XMLOffsetDatestatic XMLOffsetDatestatic XMLOffsetDateTimecreateXMLOffsetDateTime(int nYear, Month eMonth, int nDay) static XMLOffsetDateTimecreateXMLOffsetDateTime(int nYear, Month eMonth, int nDay, int nHour, int nMinute, int nSecond) static XMLOffsetDateTimecreateXMLOffsetDateTime(int nYear, Month eMonth, int nDay, int nHour, int nMinute, int nSecond, ZoneOffset aZoneOffset) static XMLOffsetDateTimecreateXMLOffsetDateTime(long nMillis) static XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimecreateXMLOffsetDateTimeUTC(int nYear, Month eMonth, int nDay) static XMLOffsetDateTimecreateXMLOffsetDateTimeUTC(int nYear, Month eMonth, int nDay, int nHour, int nMinute, int nSecond) static XMLOffsetDateTimecreateXMLOffsetDateTimeUTC(long nMillis) static XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetTimecreateXMLOffsetTime(int nHour, int nMinute, int nSecond) static XMLOffsetTimecreateXMLOffsetTime(int nHour, int nMinute, int nSecond, ZoneOffset aOfs) static XMLOffsetTimecreateXMLOffsetTime(long nMillis) static XMLOffsetTimestatic XMLOffsetTimestatic XMLOffsetTimecreateXMLOffsetTime(LocalDateTime a, ZoneOffset aOfs) static XMLOffsetTimestatic XMLOffsetTimecreateXMLOffsetTime(LocalTime a, ZoneOffset aOfs) static XMLOffsetTimestatic XMLOffsetTimestatic XMLOffsetTimestatic XMLOffsetTimestatic ZonedDateTimecreateZonedDateTime(int nYear, Month eMonth, int nDay) static ZonedDateTimecreateZonedDateTime(int nYear, Month eMonth, int nDay, int nHour, int nMinute, int nSecond) static ZonedDateTimecreateZonedDateTime(long nMillis) static ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimecreateZonedDateTimeUTC(int nYear, Month eMonth, int nDay) static ZonedDateTimecreateZonedDateTimeUTC(int nYear, Month eMonth, int nDay, int nHour, int nMinute, int nSecond) static ZonedDateTimecreateZonedDateTimeUTC(long nMillis) static ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic Instantstatic Instantstatic LocalDatestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDateTimestatic LocalDatestatic LocalTimestatic LocalTimestatic LocalTimestatic LocalTimestatic longstatic longstatic MonthDaystatic MonthDaystatic OffsetDatestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDateTimestatic OffsetDatestatic OffsetTimestatic OffsetTimestatic OffsetTimestatic OffsetTimestatic XMLOffsetDatestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDateTimestatic XMLOffsetDatestatic XMLOffsetTimestatic XMLOffsetTimestatic XMLOffsetTimestatic XMLOffsetTimestatic intstatic YearMonthstatic YearMonthstatic Yearstatic Yearstatic intstatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic ZonedDateTimestatic longgetMillis(OffsetDate aOD) static longgetMillis(XMLOffsetDate aOD) static longstatic longstatic longstatic longstatic longstatic longstatic longstatic longstatic TimeZonegetTimeZone(Date a) static intgetTimezoneOffsetInMinutes(ZoneId aZID, Instant aAt) static intstatic intGet the time zone offset to UTC of the passed Date in minutes to be used inXMLGregorianCalendar.static intstatic XMLOffsetDateTimeGet the passed date time but with micro and nanoseconds set to 0, so that only the milliseconds part is present.static XMLOffsetTimeGet the passed time but with micro and nanoseconds set to 0, so that only the milliseconds part is present.static LocalDateTimeGet the passed date time but with micro and nanoseconds set to 0, so that only the milliseconds part is present.static LocalTimeGet the passed time but with micro and nanoseconds set to 0, so that only the milliseconds part is present.static OffsetDateTimeGet the passed date time but with micro and nanoseconds set to 0, so that only the milliseconds part is present.static OffsetTimeGet the passed time but with micro and nanoseconds set to 0, so that only the milliseconds part is present.static ZonedDateTimeGet the passed date time but with micro and nanoseconds set to 0, so that only the milliseconds part is present.static ZoneIdstatic ZoneIdgetZoneIdFromOffsetInMinutes(int nOffsetInMinutes) static ZoneOffsetstatic ZoneOffsetgetZoneOffsetFromOffsetInMinutes(int nOffsetInMinutes)
-
Method Details
-
getTimezoneOffsetInMinutes
Get the time zone offset to UTC of the passed Date in minutes to be used inXMLGregorianCalendar.- Parameters:
a- The date to use. May not benull.- Returns:
- 0 for no offset to UTC, the minutes otherwise. Usually in 60minutes steps :)
-
getTimezoneOffsetInMinutes
-
getTimezoneOffsetInMinutes
-
getTimezoneOffsetInMinutes
-
getZoneOffsetFromOffsetInMinutes
-
getZoneOffset
-
getZoneIdFromOffsetInMinutes
-
getZoneId
-
getTimeZone
-
getCurrentZonedDateTime
-
getCurrentZonedDateTimeUTC
-
getWithMillisOnly
Get the passed date time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.- Parameters:
a- Source date time. May benull.- Returns:
nullif the parameter isnull, the local date time with microseconds and nanoseconds set to 0 otherwise.- Since:
- 9.2.0
-
getCurrentZonedDateTimeMillisOnly
- Returns:
- The current local date and time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.
- Since:
- 9.2.0
-
getCurrentZonedDateTimeMillisOnlyUTC
- Returns:
- The current local date and time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.
-
createZonedDateTime
-
createZonedDateTime
-
createZonedDateTimeUTC
-
createZonedDateTime
-
createZonedDateTimeUTC
-
createZonedDateTime
-
createZonedDateTime
-
createZonedDateTime
-
createZonedDateTimeUTC
-
createZonedDateTime
-
createZonedDateTimeUTC
-
createZonedDateTime
-
createZonedDateTimeUTC
-
createZonedDateTime
-
createZonedDateTime
-
createZonedDateTime
-
createZonedDateTimeUTC
-
createZonedDateTime
@Nonnull public static ZonedDateTime createZonedDateTime(int nYear, @Nonnull Month eMonth, int nDay, int nHour, int nMinute, int nSecond) -
createZonedDateTimeUTC
@Nonnull public static ZonedDateTime createZonedDateTimeUTC(int nYear, @Nonnull Month eMonth, int nDay, int nHour, int nMinute, int nSecond) -
createZonedDateTime
-
createZonedDateTimeUTC
-
createZonedDateTime
-
createZonedDateTime
-
createZonedDateTime
-
createZonedDateTime
-
createZonedDateTimeUTC
-
createZonedDateTime
-
createZonedDateTimeUTC
-
getCurrentOffsetDateTime
-
getCurrentOffsetDateTimeUTC
-
getWithMillisOnly
Get the passed date time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.- Parameters:
a- Source date time. May benull.- Returns:
nullif the parameter isnull, the local date time with microseconds and nanoseconds set to 0 otherwise.- Since:
- 9.2.0
-
getCurrentOffsetDateTimeMillisOnly
- Returns:
- The current local date and time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.
- Since:
- 9.2.0
-
getCurrentOffsetDateTimeMillisOnlyUTC
- Returns:
- The current local date and time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.
-
createOffsetDateTime
-
createOffsetDateTime
-
createOffsetDateTimeUTC
-
createOffsetDateTime
-
createOffsetDateTimeUTC
-
createOffsetDateTime
-
createOffsetDateTime
-
createOffsetDateTime
-
createOffsetDateTimeUTC
-
createOffsetDateTime
-
createOffsetDateTimeUTC
-
createOffsetDateTime
-
createOffsetDateTimeUTC
-
createOffsetDateTime
-
createOffsetDateTime
-
createOffsetDateTime
-
createOffsetDateTimeUTC
-
createOffsetDateTime
@Nonnull public static OffsetDateTime createOffsetDateTime(int nYear, @Nonnull Month eMonth, int nDay, int nHour, int nMinute, int nSecond) -
createOffsetDateTime
@Nonnull public static OffsetDateTime createOffsetDateTime(int nYear, @Nonnull Month eMonth, int nDay, int nHour, int nMinute, int nSecond, @Nonnull ZoneOffset aZoneOffset) -
createOffsetDateTimeUTC
@Nonnull public static OffsetDateTime createOffsetDateTimeUTC(int nYear, @Nonnull Month eMonth, int nDay, int nHour, int nMinute, int nSecond) -
createOffsetDateTime
-
createOffsetDateTimeUTC
-
createOffsetDateTime
-
createOffsetDateTime
-
createOffsetDateTime
-
createOffsetDateTime
-
createOffsetDateTimeUTC
-
createOffsetDateTime
-
createOffsetDateTimeUTC
-
getCurrentXMLOffsetDateTime
-
getCurrentXMLOffsetDateTimeUTC
-
getWithMillisOnly
Get the passed date time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.- Parameters:
a- Source date time. May benull.- Returns:
nullif the parameter isnull, the local date time with microseconds and nanoseconds set to 0 otherwise.
-
getCurrentXMLOffsetDateTimeMillisOnly
- Returns:
- The current local date and time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.
-
getCurrentXMLOffsetDateTimeMillisOnlyUTC
- Returns:
- The current local date and time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.
-
createXMLOffsetDateTime
-
createXMLOffsetDateTime
-
createXMLOffsetDateTime
-
createXMLOffsetDateTimeUTC
-
createXMLOffsetDateTime
-
createXMLOffsetDateTimeUTC
-
createXMLOffsetDateTime
-
createXMLOffsetDateTime
-
createXMLOffsetDateTime
-
createXMLOffsetDateTimeUTC
-
createXMLOffsetDateTime
-
createXMLOffsetDateTimeUTC
-
createXMLOffsetDateTime
-
createXMLOffsetDateTimeUTC
-
createXMLOffsetDateTime
-
createXMLOffsetDateTime
-
createXMLOffsetDateTime
-
createXMLOffsetDateTimeUTC
@Nonnull public static XMLOffsetDateTime createXMLOffsetDateTimeUTC(int nYear, Month eMonth, int nDay) -
createXMLOffsetDateTime
@Nonnull public static XMLOffsetDateTime createXMLOffsetDateTime(int nYear, @Nonnull Month eMonth, int nDay, int nHour, int nMinute, int nSecond) -
createXMLOffsetDateTime
@Nonnull public static XMLOffsetDateTime createXMLOffsetDateTime(int nYear, @Nonnull Month eMonth, int nDay, int nHour, int nMinute, int nSecond, @Nullable ZoneOffset aZoneOffset) -
createXMLOffsetDateTimeUTC
@Nonnull public static XMLOffsetDateTime createXMLOffsetDateTimeUTC(int nYear, @Nonnull Month eMonth, int nDay, int nHour, int nMinute, int nSecond) -
createXMLOffsetDateTime
-
createXMLOffsetDateTimeUTC
-
createXMLOffsetDateTime
-
createXMLOffsetDateTime
-
createXMLOffsetDateTime
-
createXMLOffsetDateTime
-
createXMLOffsetDateTimeUTC
-
createXMLOffsetDateTime
-
createXMLOffsetDateTimeUTC
-
getCurrentLocalDateTime
-
getCurrentLocalDateTimeUTC
-
getWithMillisOnly
Get the passed date time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.- Parameters:
a- Source date time. May benull.- Returns:
nullif the parameter isnull, the local date time with microseconds and nanoseconds set to 0 otherwise.- Since:
- 9.2.0
-
getCurrentLocalDateTimeMillisOnly
- Returns:
- The current local date and time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.
- Since:
- 9.2.0
-
getCurrentLocalDateTimeMillisOnlyUTC
- Returns:
- The current local date and time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.
-
createLocalDateTime
-
createLocalDateTime
-
createLocalDateTime
-
createLocalDateTime
-
createLocalDateTime
-
createLocalDateTime
-
createLocalDateTime
-
createLocalDateTime
-
createLocalDateTime
-
createLocalDateTime
-
createLocalDateTime
-
createLocalDateTime
@Nonnull public static LocalDateTime createLocalDateTime(int nYear, @Nonnull Month eMonth, int nDay) -
createLocalDateTime
@Nonnull public static LocalDateTime createLocalDateTime(int nYear, @Nonnull Month eMonth, int nDay, int nHour, int nMinute) -
createLocalDateTime
@Nonnull public static LocalDateTime createLocalDateTime(int nYear, @Nonnull Month eMonth, int nDay, int nHour, int nMinute, int nSecond) -
createLocalDateTime
-
createLocalDateTime
-
createLocalDateTime
-
createLocalDateTime
-
createLocalDateTime
-
createLocalDateTime
-
getCurrentLocalDate
-
getCurrentLocalDateUTC
-
createLocalDate
-
createLocalDate
-
createLocalDate
-
createLocalDate
-
createLocalDate
-
createLocalDate
-
createLocalDate
-
createLocalDate
-
createLocalDate
-
createLocalDate
-
createLocalDate
-
createLocalDate
-
createLocalDate
-
getCurrentOffsetDate
-
getCurrentOffsetDateUTC
-
createOffsetDate
-
createOffsetDate
@Nullable public static OffsetDate createOffsetDate(@Nullable LocalDate a, @Nonnull ZoneOffset aOffset) -
createOffsetDate
@Nonnull public static OffsetDate createOffsetDate(int nYear, @Nonnull Month eMonth, int nDayOfMonth) -
createOffsetDate
@Nonnull public static OffsetDate createOffsetDate(int nYear, @Nonnull Month eMonth, int nDayOfMonth, @Nonnull ZoneOffset aOffset) -
createOffsetDate
-
createOffsetDate
@Nullable public static OffsetDate createOffsetDate(@Nullable LocalDateTime a, @Nonnull ZoneOffset aOffset) -
createOffsetDate
-
createOffsetDate
-
createOffsetDate
@Nullable public static OffsetDate createOffsetDate(@Nullable Instant a, @Nonnull ZoneOffset aOffset) -
createOffsetDate
-
createOffsetDate
-
createOffsetDate
-
createOffsetDate
-
createOffsetDate
-
createOffsetDate
-
createOffsetDate
-
getCurrentXMLOffsetDate
-
getCurrentXMLOffsetDateUTC
-
createXMLOffsetDate
-
createXMLOffsetDate
-
createXMLOffsetDate
-
createXMLOffsetDate
-
createXMLOffsetDate
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable LocalDate a, @Nonnull ZoneOffset aOffset) -
createXMLOffsetDate
@Nonnull public static XMLOffsetDate createXMLOffsetDate(int nYear, @Nonnull Month eMonth, int nDayOfMonth) -
createXMLOffsetDate
@Nonnull public static XMLOffsetDate createXMLOffsetDate(int nYear, @Nonnull Month eMonth, int nDayOfMonth, @Nullable ZoneOffset aOffset) -
createXMLOffsetDate
-
createXMLOffsetDate
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable LocalDateTime a, @Nonnull ZoneOffset aOffset) -
createXMLOffsetDate
-
createXMLOffsetDate
-
createXMLOffsetDate
-
createXMLOffsetDate
-
createXMLOffsetDate
-
createXMLOffsetDate
-
createXMLOffsetDate
-
createXMLOffsetDate
-
getCurrentLocalTime
-
getCurrentLocalTimeUTC
-
getWithMillisOnly
Get the passed time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.- Parameters:
a- Source time. May benull.- Returns:
nullif the parameter isnull, the local time with microseconds and nanoseconds set to 0 otherwise.- Since:
- 9.4.7
-
getCurrentLocalTimeMillisOnly
- Returns:
- The current local time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.
- Since:
- 9.4.7
-
getCurrentLocalTimeMillisOnlyUTC
- Returns:
- The current local time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.
-
createLocalTime
-
createLocalTime
-
createLocalTime
-
createLocalTime
-
createLocalTime
-
createLocalTime
-
createLocalTime
-
createLocalTime
-
getCurrentOffsetTime
-
getCurrentOffsetTimeUTC
-
getWithMillisOnly
Get the passed time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.- Parameters:
a- Source time. May benull.- Returns:
nullif the parameter isnull, the local time with microseconds and nanoseconds set to 0 otherwise.- Since:
- 10.0.0
-
getCurrentOffsetTimeMillisOnly
- Returns:
- The current local time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.
- Since:
- 9.4.7
-
getCurrentOffsetTimeMillisOnlyUTC
- Returns:
- The current local time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.
-
createOffsetTime
-
createOffsetTime
-
createOffsetTime
-
createOffsetTime
-
createOffsetTime
-
createOffsetTime
-
createOffsetTime
-
createOffsetTime
@Nullable public static OffsetTime createOffsetTime(@Nullable LocalDateTime a, @Nonnull ZoneOffset aOfs) -
createOffsetTime
-
createOffsetTime
@Nullable public static OffsetTime createOffsetTime(@Nullable LocalTime a, @Nonnull ZoneOffset aOfs) -
createOffsetTime
@Nonnull public static OffsetTime createOffsetTime(int nHour, int nMinute, int nSecond, @Nonnull ZoneOffset aOfs) -
getCurrentXMLOffsetTime
-
getCurrentXMLOffsetTimeUTC
-
getWithMillisOnly
Get the passed time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.- Parameters:
a- Source time. May benull.- Returns:
nullif the parameter isnull, the local time with microseconds and nanoseconds set to 0 otherwise.
-
getCurrentXMLOffsetTimeMillisOnly
- Returns:
- The current local time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.
-
getCurrentXMLOffsetTimeMillisOnlyUTC
- Returns:
- The current local time but with micro and nanoseconds set to 0, so that only the milliseconds part is present. This is helpful for XSD serialization, where only milliseconds granularity is available.
-
createXMLOffsetTime
-
createXMLOffsetTime
-
createXMLOffsetTime
-
createXMLOffsetTime
-
createXMLOffsetTime
-
createXMLOffsetTime
-
createXMLOffsetTime
-
createXMLOffsetTime
@Nullable public static XMLOffsetTime createXMLOffsetTime(@Nullable LocalDateTime a, @Nullable ZoneOffset aOfs) -
createXMLOffsetTime
-
createXMLOffsetTime
@Nullable public static XMLOffsetTime createXMLOffsetTime(@Nullable LocalTime a, @Nullable ZoneOffset aOfs) -
createXMLOffsetTime
-
createXMLOffsetTime
@Nonnull public static XMLOffsetTime createXMLOffsetTime(int nHour, int nMinute, int nSecond, @Nullable ZoneOffset aOfs) -
createDate
-
createDate
-
createDate
-
createDate
-
createDate
-
createDate
-
createDate
-
createDate
-
createDate
-
createDateForDate
-
createDateForTime
-
createCalendar
-
createCalendarUTC
-
createGregorianCalendar
-
createGregorianCalendarUTC
-
getCurrentYear
-
getCurrentYearUTC
-
getCurrentYearObj
-
getCurrentYearObjUTC
-
getCurrentMonthDay
-
getCurrentMonthDayUTC
-
getCurrentYearMonth
-
getCurrentYearMonthUTC
-
getCurrentInstant
-
getCurrentInstantUTC
-
getCurrentMillis
public static long getCurrentMillis() -
getCurrentMillisUTC
public static long getCurrentMillisUTC() -
getMillis
-
getMillis
-
getMillis
-
getMillis
-
getMillis
-
getMillis
-
getMillis
-
getMillis
-
getMillis
-
getMillis
-