Class TimeConvert

java.lang.Object
org.bgerp.util.TimeConvert

public class TimeConvert extends Object
Date ant time converting utils.
  • Constructor Details Link icon

    • TimeConvert Link icon

      public TimeConvert()
  • Method Details Link icon

    • toYearMonth Link icon

      public static final YearMonth toYearMonth(Date value)
      Converts date to month of year.
      Parameters:
      value -
      Returns:
      null or month, containing value.
    • toDate Link icon

      public static final Date toDate(YearMonth value)
      Converts the first day of a month to date.
      Parameters:
      value - the month.
      Returns:
      null or date of the first day of the month value.
    • toDate Link icon

      public static final Date toDate(LocalDate value)
      Converts beginning of a day to date.
      Parameters:
      value - the day.
      Returns:
      null or date of the beginning of the day value.
    • toLocalDate Link icon

      public static final LocalDate toLocalDate(Date value)
      Converts date to local date.
      Parameters:
      value -
      Returns:
      null or converted value.
    • toTimestamp Link icon

      public static final Timestamp toTimestamp(Date value)
      Converts date to SQL timestamp.
      Parameters:
      value -
      Returns:
      null or converted value.
    • toInstant Link icon

      public static final Instant toInstant(LocalDateTime value)
      Converts date and time to instant.
      Parameters:
      value -
      Returns:
      null or converted value.