Package com.helger.commons.datetime
Class PDTFactory
- java.lang.Object
-
- com.helger.commons.datetime.PDTFactory
-
@Immutable public final class PDTFactory extends Object
Philip's Date Time (PDT) factory. Create and convert different date and time stuff into each other. Everything that creates aZonedDateTime,OffsetDateTime,OffsetDateorOffsetTimeuses the default time zone fromPDTConfigif necessary. The addition "UTC" to the name of the method indicates the explicit usage of the UTC time zone.- Author:
- Philip Helger
-
-
Method Summary
-
-
-
Method Detail
-
getTimezoneOffsetInMinutes
public static int getTimezoneOffsetInMinutes(@Nonnull Date a)
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
public static int getTimezoneOffsetInMinutes(@Nonnull GregorianCalendar aCal)
-
getTimezoneOffsetInMinutes
public static int getTimezoneOffsetInMinutes(@Nonnull ZoneId aZID, @Nonnull Instant aAt)
-
getTimezoneOffsetInMinutes
public static int getTimezoneOffsetInMinutes(@Nonnull ZoneOffset aZO)
-
getZoneOffsetFromOffsetInMinutes
@Nonnull public static ZoneOffset getZoneOffsetFromOffsetInMinutes(int nOffsetInMinutes)
-
getZoneOffset
@Nonnull public static ZoneOffset getZoneOffset(@Nonnull Date a)
-
getZoneIdFromOffsetInMinutes
@Nonnull public static ZoneId getZoneIdFromOffsetInMinutes(int nOffsetInMinutes)
-
getCurrentZonedDateTime
@Nonnull public static ZonedDateTime getCurrentZonedDateTime()
-
getCurrentZonedDateTimeUTC
@Nonnull public static ZonedDateTime getCurrentZonedDateTimeUTC()
-
getWithMillisOnly
@Nullable public static ZonedDateTime getWithMillisOnly(@Nullable ZonedDateTime a)
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
@Nonnegative public static ZonedDateTime 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
@Nonnegative public static ZonedDateTime 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
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable OffsetDateTime a)
-
createZonedDateTime
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable LocalDateTime a)
-
createZonedDateTimeUTC
@Nullable public static ZonedDateTime createZonedDateTimeUTC(@Nullable LocalDateTime a)
-
createZonedDateTime
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable LocalDate a)
-
createZonedDateTimeUTC
@Nullable public static ZonedDateTime createZonedDateTimeUTC(@Nullable LocalDate a)
-
createZonedDateTime
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable OffsetDate aOD)
-
createZonedDateTime
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable XMLOffsetDate aOD)
-
createZonedDateTime
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable YearMonth a)
-
createZonedDateTimeUTC
@Nullable public static ZonedDateTime createZonedDateTimeUTC(@Nullable YearMonth a)
-
createZonedDateTime
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable Year a)
-
createZonedDateTimeUTC
@Nullable public static ZonedDateTime createZonedDateTimeUTC(@Nullable Year a)
-
createZonedDateTime
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable LocalTime a)
-
createZonedDateTimeUTC
@Nullable public static ZonedDateTime createZonedDateTimeUTC(@Nullable LocalTime a)
-
createZonedDateTime
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable OffsetTime a)
-
createZonedDateTime
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable XMLOffsetTime a)
-
createZonedDateTime
@Nonnull public static ZonedDateTime createZonedDateTime(int nYear, Month eMonth, int nDay)
-
createZonedDateTimeUTC
@Nonnull public static ZonedDateTime createZonedDateTimeUTC(int nYear, Month eMonth, int nDay)
-
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
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable Instant a)
-
createZonedDateTimeUTC
@Nullable public static ZonedDateTime createZonedDateTimeUTC(@Nullable Instant a)
-
createZonedDateTime
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable GregorianCalendar aCal)
-
createZonedDateTime
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable Date a)
-
createZonedDateTime
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable Timestamp a)
-
createZonedDateTime
@Nonnull public static ZonedDateTime createZonedDateTime(long nMillis)
-
createZonedDateTimeUTC
@Nonnull public static ZonedDateTime createZonedDateTimeUTC(long nMillis)
-
createZonedDateTime
@Nonnull public static ZonedDateTime createZonedDateTime(@Nullable Number a)
-
createZonedDateTimeUTC
@Nonnull public static ZonedDateTime createZonedDateTimeUTC(@Nullable Number a)
-
getCurrentOffsetDateTime
@Nonnegative public static OffsetDateTime getCurrentOffsetDateTime()
-
getCurrentOffsetDateTimeUTC
@Nonnegative public static OffsetDateTime getCurrentOffsetDateTimeUTC()
-
getWithMillisOnly
@Nullable public static OffsetDateTime getWithMillisOnly(@Nullable OffsetDateTime a)
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
@Nonnegative public static OffsetDateTime 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
@Nonnegative public static OffsetDateTime 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
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable ZonedDateTime a)
-
createOffsetDateTime
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable LocalDateTime a)
-
createOffsetDateTimeUTC
@Nullable public static OffsetDateTime createOffsetDateTimeUTC(@Nullable LocalDateTime a)
-
createOffsetDateTime
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable LocalDate a)
-
createOffsetDateTimeUTC
@Nullable public static OffsetDateTime createOffsetDateTimeUTC(@Nullable LocalDate a)
-
createOffsetDateTime
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable OffsetDate aOD)
-
createOffsetDateTime
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable XMLOffsetDate aOD)
-
createOffsetDateTime
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable YearMonth a)
-
createOffsetDateTimeUTC
@Nullable public static OffsetDateTime createOffsetDateTimeUTC(@Nullable YearMonth a)
-
createOffsetDateTime
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable Year a)
-
createOffsetDateTimeUTC
@Nullable public static OffsetDateTime createOffsetDateTimeUTC(@Nullable Year a)
-
createOffsetDateTime
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable LocalTime a)
-
createOffsetDateTimeUTC
@Nullable public static OffsetDateTime createOffsetDateTimeUTC(@Nullable LocalTime a)
-
createOffsetDateTime
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable OffsetTime a)
-
createOffsetDateTime
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable XMLOffsetTime a)
-
createOffsetDateTime
@Nonnull public static OffsetDateTime createOffsetDateTime(int nYear, Month eMonth, int nDay)
-
createOffsetDateTimeUTC
@Nonnull public static OffsetDateTime createOffsetDateTimeUTC(int nYear, Month eMonth, int nDay)
-
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
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable Instant a)
-
createOffsetDateTimeUTC
@Nullable public static OffsetDateTime createOffsetDateTimeUTC(@Nullable Instant a)
-
createOffsetDateTime
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable Date a)
-
createOffsetDateTime
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable Timestamp a)
-
createOffsetDateTime
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable GregorianCalendar aCal)
-
createOffsetDateTime
@Nonnull public static OffsetDateTime createOffsetDateTime(long nMillis)
-
createOffsetDateTimeUTC
@Nonnull public static OffsetDateTime createOffsetDateTimeUTC(long nMillis)
-
createOffsetDateTime
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable Number a)
-
createOffsetDateTimeUTC
@Nullable public static OffsetDateTime createOffsetDateTimeUTC(@Nullable Number a)
-
getCurrentXMLOffsetDateTime
@Nonnegative public static XMLOffsetDateTime getCurrentXMLOffsetDateTime()
-
getCurrentXMLOffsetDateTimeUTC
@Nonnegative public static XMLOffsetDateTime getCurrentXMLOffsetDateTimeUTC()
-
getWithMillisOnly
@Nullable public static XMLOffsetDateTime getWithMillisOnly(@Nullable XMLOffsetDateTime a)
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
@Nonnegative public static XMLOffsetDateTime 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
@Nonnegative public static XMLOffsetDateTime 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
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable ZonedDateTime a)
-
createXMLOffsetDateTime
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable OffsetDateTime a)
-
createXMLOffsetDateTime
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable LocalDateTime a)
-
createXMLOffsetDateTimeUTC
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTimeUTC(@Nullable LocalDateTime a)
-
createXMLOffsetDateTime
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable LocalDate a)
-
createXMLOffsetDateTimeUTC
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTimeUTC(@Nullable LocalDate a)
-
createXMLOffsetDateTime
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable OffsetDate aOD)
-
createXMLOffsetDateTime
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable XMLOffsetDate aOD)
-
createXMLOffsetDateTime
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable YearMonth a)
-
createXMLOffsetDateTimeUTC
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTimeUTC(@Nullable YearMonth a)
-
createXMLOffsetDateTime
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable Year a)
-
createXMLOffsetDateTimeUTC
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTimeUTC(@Nullable Year a)
-
createXMLOffsetDateTime
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable LocalTime a)
-
createXMLOffsetDateTimeUTC
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTimeUTC(@Nullable LocalTime a)
-
createXMLOffsetDateTime
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable OffsetTime a)
-
createXMLOffsetDateTime
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable XMLOffsetTime a)
-
createXMLOffsetDateTime
@Nonnull public static XMLOffsetDateTime createXMLOffsetDateTime(int nYear, Month eMonth, int nDay)
-
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
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable Instant a)
-
createXMLOffsetDateTimeUTC
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTimeUTC(@Nullable Instant a)
-
createXMLOffsetDateTime
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable Date a)
-
createXMLOffsetDateTime
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable Timestamp a)
-
createXMLOffsetDateTime
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable GregorianCalendar aCal)
-
createXMLOffsetDateTime
@Nonnull public static XMLOffsetDateTime createXMLOffsetDateTime(long nMillis)
-
createXMLOffsetDateTimeUTC
@Nonnull public static XMLOffsetDateTime createXMLOffsetDateTimeUTC(long nMillis)
-
createXMLOffsetDateTime
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTime(@Nullable Number a)
-
createXMLOffsetDateTimeUTC
@Nullable public static XMLOffsetDateTime createXMLOffsetDateTimeUTC(@Nullable Number a)
-
getCurrentLocalDateTime
@Nonnegative public static LocalDateTime getCurrentLocalDateTime()
-
getCurrentLocalDateTimeUTC
@Nonnegative public static LocalDateTime getCurrentLocalDateTimeUTC()
-
getWithMillisOnly
@Nullable public static LocalDateTime getWithMillisOnly(@Nullable LocalDateTime a)
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
@Nonnegative public static LocalDateTime 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
@Nonnegative public static LocalDateTime 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
@Nullable public static LocalDateTime createLocalDateTime(@Nullable ZonedDateTime aDT)
-
createLocalDateTime
@Nullable public static LocalDateTime createLocalDateTime(@Nullable OffsetDateTime aDT)
-
createLocalDateTime
@Nullable public static LocalDateTime createLocalDateTime(@Nullable XMLOffsetDateTime aDT)
-
createLocalDateTime
@Nullable public static LocalDateTime createLocalDateTime(@Nullable OffsetDate aDT)
-
createLocalDateTime
@Nullable public static LocalDateTime createLocalDateTime(@Nullable XMLOffsetDate aDT)
-
createLocalDateTime
@Nullable public static LocalDateTime createLocalDateTime(@Nullable LocalDate a)
-
createLocalDateTime
@Nullable public static LocalDateTime createLocalDateTime(@Nullable YearMonth a)
-
createLocalDateTime
@Nullable public static LocalDateTime createLocalDateTime(@Nullable Year a)
-
createLocalDateTime
@Nullable public static LocalDateTime createLocalDateTime(@Nullable LocalTime a)
-
createLocalDateTime
@Nullable public static LocalDateTime createLocalDateTime(@Nullable OffsetTime a)
-
createLocalDateTime
@Nullable public static LocalDateTime createLocalDateTime(@Nullable XMLOffsetTime a)
-
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
@Nullable public static LocalDateTime createLocalDateTime(@Nullable Instant a)
-
createLocalDateTime
@Nullable public static LocalDateTime createLocalDateTime(@Nullable Date a)
-
createLocalDateTime
@Nullable public static LocalDateTime createLocalDateTime(@Nullable Timestamp a)
-
createLocalDateTime
@Nullable public static LocalDateTime createLocalDateTime(@Nullable GregorianCalendar aCal)
-
createLocalDateTime
@Nonnull public static LocalDateTime createLocalDateTime(long nMillis)
-
createLocalDateTime
@Nullable public static LocalDateTime createLocalDateTime(@Nullable Number a)
-
getCurrentLocalDate
@Nonnegative public static LocalDate getCurrentLocalDate()
-
getCurrentLocalDateUTC
@Nonnegative public static LocalDate getCurrentLocalDateUTC()
-
createLocalDate
@Nonnull public static LocalDate createLocalDate(int nYear, @Nonnull Month eMonth, int nDayOfMonth)
-
createLocalDate
@Nullable public static LocalDate createLocalDate(@Nullable GregorianCalendar a)
-
createLocalDate
@Nullable public static LocalDate createLocalDate(@Nullable LocalDateTime a)
-
createLocalDate
@Nullable public static LocalDate createLocalDate(@Nullable ZonedDateTime a)
-
createLocalDate
@Nullable public static LocalDate createLocalDate(@Nullable OffsetDateTime a)
-
createLocalDate
@Nullable public static LocalDate createLocalDate(@Nullable XMLOffsetDateTime a)
-
createLocalDate
@Nullable public static LocalDate createLocalDate(@Nullable XMLOffsetDate a)
-
getCurrentOffsetDate
@Nonnegative public static OffsetDate getCurrentOffsetDate()
-
getCurrentOffsetDateUTC
@Nonnegative public static OffsetDate getCurrentOffsetDateUTC()
-
createOffsetDate
@Nullable public static OffsetDate createOffsetDate(@Nullable LocalDate a)
-
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
@Nullable public static OffsetDate createOffsetDate(@Nullable LocalDateTime a)
-
createOffsetDate
@Nullable public static OffsetDate createOffsetDate(@Nullable LocalDateTime a, @Nonnull ZoneOffset aOffset)
-
createOffsetDate
@Nullable public static OffsetDate createOffsetDate(@Nullable GregorianCalendar a)
-
createOffsetDate
@Nullable public static OffsetDate createOffsetDate(@Nullable Instant a)
-
createOffsetDate
@Nullable public static OffsetDate createOffsetDate(@Nullable Instant a, @Nonnull ZoneOffset aOffset)
-
createOffsetDate
@Nonnull public static OffsetDate createOffsetDate(long nMillis)
-
createOffsetDate
@Nullable public static OffsetDate createOffsetDate(@Nullable Number a)
-
createOffsetDate
@Nullable public static OffsetDate createOffsetDate(@Nullable Date a)
-
createOffsetDate
@Nullable public static OffsetDate createOffsetDate(@Nullable YearMonth a)
-
createOffsetDate
@Nullable public static OffsetDate createOffsetDate(@Nullable Year a)
-
createOffsetDate
@Nullable public static OffsetDate createOffsetDate(@Nullable OffsetDateTime a)
-
createOffsetDate
@Nullable public static OffsetDate createOffsetDate(@Nullable ZonedDateTime a)
-
getCurrentXMLOffsetDate
@Nonnegative public static XMLOffsetDate getCurrentXMLOffsetDate()
-
getCurrentXMLOffsetDateUTC
@Nonnegative public static XMLOffsetDate getCurrentXMLOffsetDateUTC()
-
createXMLOffsetDate
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable ZonedDateTime a)
-
createXMLOffsetDate
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable OffsetDateTime a)
-
createXMLOffsetDate
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable XMLOffsetDateTime a)
-
createXMLOffsetDate
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable LocalDate a)
-
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
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable LocalDateTime a)
-
createXMLOffsetDate
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable LocalDateTime a, @Nonnull ZoneOffset aOffset)
-
createXMLOffsetDate
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable Instant a)
-
createXMLOffsetDate
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable Instant a, @Nonnull ZoneId aZoneId)
-
createXMLOffsetDate
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable GregorianCalendar a)
-
createXMLOffsetDate
@Nonnull public static XMLOffsetDate createXMLOffsetDate(long nMillis)
-
createXMLOffsetDate
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable Date a)
-
createXMLOffsetDate
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable YearMonth a)
-
createXMLOffsetDate
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable Year a)
-
createXMLOffsetDate
@Nullable public static XMLOffsetDate createXMLOffsetDate(@Nullable Number a)
-
getCurrentLocalTime
@Nonnegative public static LocalTime getCurrentLocalTime()
-
getCurrentLocalTimeUTC
@Nonnegative public static LocalTime getCurrentLocalTimeUTC()
-
getWithMillisOnly
@Nullable public static LocalTime getWithMillisOnly(@Nullable LocalTime a)
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
@Nonnegative public static LocalTime 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
@Nonnegative public static LocalTime 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
@Nullable public static LocalTime createLocalTime(@Nullable GregorianCalendar a)
-
createLocalTime
@Nullable public static LocalTime createLocalTime(@Nullable LocalDateTime a)
-
createLocalTime
@Nullable public static LocalTime createLocalTime(@Nullable OffsetTime a)
-
createLocalTime
@Nullable public static LocalTime createLocalTime(@Nullable XMLOffsetTime a)
-
createLocalTime
@Nonnull public static LocalTime createLocalTime(int nHour, int nMinute, int nSecond)
-
getCurrentOffsetTime
@Nonnegative public static OffsetTime getCurrentOffsetTime()
-
getCurrentOffsetTimeUTC
@Nonnegative public static OffsetTime getCurrentOffsetTimeUTC()
-
getWithMillisOnly
@Nullable public static OffsetTime getWithMillisOnly(@Nullable OffsetTime a)
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
@Nonnegative public static OffsetTime 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
@Nonnegative public static OffsetTime 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
@Nullable public static OffsetTime createOffsetTime(@Nullable GregorianCalendar a)
-
createOffsetTime
@Nonnull public static OffsetTime createOffsetTime(long nMillis)
-
createOffsetTime
@Nullable public static OffsetTime createOffsetTime(@Nullable Instant a)
-
createOffsetTime
@Nullable public static OffsetTime createOffsetTime(@Nullable Date a)
-
createOffsetTime
@Nullable public static OffsetTime createOffsetTime(@Nullable OffsetDateTime a)
-
createOffsetTime
@Nullable public static OffsetTime createOffsetTime(@Nullable ZonedDateTime a)
-
createOffsetTime
@Nullable public static OffsetTime createOffsetTime(@Nullable LocalDateTime a)
-
createOffsetTime
@Nullable public static OffsetTime createOffsetTime(@Nullable LocalDateTime a, @Nonnull ZoneOffset aOfs)
-
createOffsetTime
@Nullable public static OffsetTime createOffsetTime(@Nullable LocalTime a)
-
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
@Nonnegative public static XMLOffsetTime getCurrentXMLOffsetTime()
-
getCurrentXMLOffsetTimeUTC
@Nonnegative public static XMLOffsetTime getCurrentXMLOffsetTimeUTC()
-
getWithMillisOnly
@Nullable public static XMLOffsetTime getWithMillisOnly(@Nullable XMLOffsetTime a)
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
@Nonnegative public static XMLOffsetTime 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
@Nonnegative public static XMLOffsetTime 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
@Nullable public static XMLOffsetTime createXMLOffsetTime(@Nullable GregorianCalendar a)
-
createXMLOffsetTime
@Nonnull public static XMLOffsetTime createXMLOffsetTime(long nMillis)
-
createXMLOffsetTime
@Nullable public static XMLOffsetTime createXMLOffsetTime(@Nullable Instant a)
-
createXMLOffsetTime
@Nullable public static XMLOffsetTime createXMLOffsetTime(@Nullable Date a)
-
createXMLOffsetTime
@Nullable public static XMLOffsetTime createXMLOffsetTime(@Nullable OffsetDateTime a)
-
createXMLOffsetTime
@Nullable public static XMLOffsetTime createXMLOffsetTime(@Nullable ZonedDateTime a)
-
createXMLOffsetTime
@Nullable public static XMLOffsetTime createXMLOffsetTime(@Nullable LocalDateTime a)
-
createXMLOffsetTime
@Nullable public static XMLOffsetTime createXMLOffsetTime(@Nullable LocalDateTime a, @Nullable ZoneOffset aOfs)
-
createXMLOffsetTime
@Nullable public static XMLOffsetTime createXMLOffsetTime(@Nullable LocalTime a)
-
createXMLOffsetTime
@Nullable public static XMLOffsetTime createXMLOffsetTime(@Nullable LocalTime a, @Nullable ZoneOffset aOfs)
-
createXMLOffsetTime
@Nonnull public static XMLOffsetTime createXMLOffsetTime(int nHour, int nMinute, int nSecond)
-
createXMLOffsetTime
@Nonnull public static XMLOffsetTime createXMLOffsetTime(int nHour, int nMinute, int nSecond, @Nullable ZoneOffset aOfs)
-
createDate
@Nullable public static Date createDate(@Nullable ZonedDateTime a)
-
createDate
@Nullable public static Date createDate(@Nullable OffsetDateTime a)
-
createDate
@Nullable public static Date createDate(@Nullable LocalDateTime a)
-
createDate
@Nullable public static Date createDate(@Nullable OffsetDate aOD)
-
createDate
@Nullable public static Date createDate(@Nullable XMLOffsetDate aOD)
-
createDate
@Nullable public static Date createDate(@Nullable OffsetTime a)
-
createDate
@Nullable public static Date createDate(@Nullable XMLOffsetTime a)
-
createDateForDate
@Nonnull public static Date createDateForDate(int nYear, @Nonnull Month eMonth, int nDayOfMonth)
-
createGregorianCalendar
@Nonnull public static GregorianCalendar createGregorianCalendar()
-
createGregorianCalendarUTC
@Nonnull public static GregorianCalendar createGregorianCalendarUTC()
-
getCurrentYear
@Nonnegative public static int getCurrentYear()
-
getCurrentYearUTC
@Nonnegative public static int getCurrentYearUTC()
-
getCurrentYearMonth
@Nonnegative public static YearMonth getCurrentYearMonth()
-
getCurrentYearMonthUTC
@Nonnegative public static YearMonth getCurrentYearMonthUTC()
-
getCurrentInstant
@Nonnegative public static Instant getCurrentInstant()
-
getCurrentInstantUTC
@Nonnegative public static Instant getCurrentInstantUTC()
-
getCurrentMillis
public static long getCurrentMillis()
-
getCurrentMillisUTC
public static long getCurrentMillisUTC()
-
getMillis
public static long getMillis(@Nonnull OffsetDate aOD)
-
getMillis
public static long getMillis(@Nonnull XMLOffsetDate aOD)
-
getMillis
public static long getMillis(@Nonnull OffsetTime a)
-
getMillis
public static long getMillis(@Nonnull XMLOffsetTime a)
-
getMillis
public static long getMillis(@Nonnull LocalDateTime a)
-
getMillis
public static long getMillis(@Nonnull OffsetDateTime a)
-
getMillis
public static long getMillis(@Nonnull XMLOffsetDateTime a)
-
getMillis
public static long getMillis(@Nonnull ZonedDateTime a)
-
-