@Immutable public final class PDTFactory extends Object
public static int getTimezoneOffsetInMinutes(@Nonnull Date aDate)
XMLGregorianCalendar.aDate - The date to use. May not be null.public static int getTimezoneOffsetInMinutes(@Nonnull GregorianCalendar aCal)
public static int getTimezoneOffsetInMinutes(@Nonnull ZoneId aZID, @Nonnull Instant aAt)
public static int getTimezoneOffsetInMinutes(@Nonnull ZoneOffset aZO)
@Nonnull public static ZoneOffset getZoneOffsetFromOffsetInMinutes(int nOffsetInMinutes)
@Nonnull public static ZoneId getZoneIdFromOffsetInMinutes(int nOffsetInMinutes)
@Nonnull public static ZonedDateTime getCurrentZonedDateTime()
@Nullable public static ZonedDateTime getWithMillisOnly(@Nullable ZonedDateTime aODT)
aODT - Source date time. May be null.null if the parameter is null, the local
date time with microseconds and nanoseconds set to 0 otherwise.@Nonnegative public static ZonedDateTime getCurrentZonedDateTimeMillisOnly()
@Nonnull public static ZonedDateTime getCurrentZonedDateTimeUTC()
@Nonnegative public static ZonedDateTime getCurrentZonedDateTimeUTCMillisOnly()
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable OffsetDateTime aODT)
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable LocalDateTime aLDT)
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable LocalDate aLD)
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable YearMonth aYM)
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable Year aYear)
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable LocalTime aLT)
@Nonnull public static ZonedDateTime createZonedDateTime(int nYear, Month eMonth, int nDay)
@Nonnull public static ZonedDateTime createZonedDateTime(int nYear, @Nonnull Month eMonth, int nDay, int nHour, int nMinute, int nSecond)
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable Instant aInstant)
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable GregorianCalendar aCal)
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable Date aDate)
@Nullable public static ZonedDateTime createZonedDateTime(@Nullable Timestamp aTimestamp)
@Nonnull public static ZonedDateTime createZonedDateTime(long nMillis)
@Nonnull public static ZonedDateTime createZonedDateTime(@Nullable Number aMillis)
@Nonnegative public static OffsetDateTime getCurrentOffsetDateTime()
@Nullable public static OffsetDateTime getWithMillisOnly(@Nullable OffsetDateTime aODT)
aODT - Source date time. May be null.null if the parameter is null, the local
date time with microseconds and nanoseconds set to 0 otherwise.@Nonnegative public static OffsetDateTime getCurrentOffsetDateTimeMillisOnly()
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable ZonedDateTime aZDT)
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable LocalDateTime aLDT)
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable LocalDate aLD)
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable YearMonth aYM)
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable Year aYear)
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable LocalTime aLT)
@Nonnull public static OffsetDateTime createOffsetDateTime(int nYear, Month eMonth, int nDay)
@Nonnull public static OffsetDateTime createOffsetDateTime(int nYear, @Nonnull Month eMonth, int nDay, int nHour, int nMinute, int nSecond)
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable Instant aInstant)
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable Date aDate)
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable Timestamp aTimestamp)
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable GregorianCalendar aCal)
@Nonnull public static OffsetDateTime createOffsetDateTime(long nMillis)
@Nullable public static OffsetDateTime createOffsetDateTime(@Nullable Number aMillis)
@Nonnegative public static LocalDateTime getCurrentLocalDateTime()
@Nullable public static LocalDateTime getWithMillisOnly(@Nullable LocalDateTime aLDT)
aLDT - Source date time. May be null.null if the parameter is null, the local
date time with microseconds and nanoseconds set to 0 otherwise.@Nonnegative public static LocalDateTime getCurrentLocalDateTimeMillisOnly()
@Nullable public static LocalDateTime createLocalDateTime(@Nullable ZonedDateTime aDT)
@Nullable public static LocalDateTime createLocalDateTime(@Nullable OffsetDateTime aDT)
@Nullable public static LocalDateTime createLocalDateTime(@Nullable LocalDate aLD)
@Nullable public static LocalDateTime createLocalDateTime(@Nullable YearMonth aYM)
@Nullable public static LocalDateTime createLocalDateTime(@Nullable Year aYear)
@Nullable public static LocalDateTime createLocalDateTime(@Nullable LocalTime aLT)
@Nonnull public static LocalDateTime createLocalDateTime(int nYear, @Nonnull Month eMonth, int nDay)
@Nonnull public static LocalDateTime createLocalDateTime(int nYear, @Nonnull Month eMonth, int nDay, int nHour, int nMinute)
@Nonnull public static LocalDateTime createLocalDateTime(int nYear, @Nonnull Month eMonth, int nDay, int nHour, int nMinute, int nSecond)
@Nullable public static LocalDateTime createLocalDateTime(@Nullable Instant aInstant)
@Nullable public static LocalDateTime createLocalDateTime(@Nullable Date aDate)
@Nullable public static LocalDateTime createLocalDateTime(@Nullable Timestamp aDate)
@Nullable public static LocalDateTime createLocalDateTime(@Nullable GregorianCalendar aCal)
@Nonnull public static LocalDateTime createLocalDateTime(long nMillis)
@Nullable public static LocalDateTime createLocalDateTime(@Nullable Number aMillis)
@Nonnegative public static LocalDate getCurrentLocalDate()
@Nonnull public static LocalDate createLocalDate(int nYear, @Nonnull Month eMonth, int nDayOfMonth)
@Nullable public static LocalDate createLocalDate(@Nullable GregorianCalendar aCalendar)
@Nullable public static LocalDate createLocalDate(@Nullable LocalDateTime aLDT)
@Nonnegative public static LocalTime getCurrentLocalTime()
@Nullable public static LocalTime createLocalTime(@Nullable GregorianCalendar aCalendar)
@Nullable public static LocalTime createLocalTime(@Nullable LocalDateTime aLDT)
@Nonnull public static LocalTime createLocalTime(int nHour, int nMinute, int nSecond)
@Nullable public static Date createDate(@Nullable ZonedDateTime aZDT)
@Nullable public static Date createDate(@Nullable OffsetDateTime aODT)
@Nullable public static Date createDate(@Nullable LocalDateTime aLDT)
@Nonnull public static Date createDateForDate(int nYear, @Nonnull Month eMonth, int nDayOfMonth)
@Nonnull public static GregorianCalendar createGregorianCalendar()
@Nonnull public static GregorianCalendar createGregorianCalendarUTC()
@Nonnegative public static int getCurrentYear()
@Nonnegative public static int getCurrentMonth()
@Nonnegative public static int getCurrentDayOfMonth()
@Nonnegative public static YearMonth getCurrentYearMonth()
@Nonnegative public static Instant getCurrentInstant()
public static long getCurrentMillis()
public static long getMillis(@Nonnull LocalDateTime aLDT)
public static long getMillis(@Nonnull OffsetDateTime aODT)
public static long getMillis(@Nonnull ZonedDateTime aZDT)
Copyright © 2014–2020 Philip Helger. All rights reserved.