Class DateUtil

java.lang.Object
org.keycloak.services.util.DateUtil

public class DateUtil extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static long
    Parses a string timestamp or date to an Epoc timestamp; if the date is a ISO-8601 extended local date format, the time at the end of the day is returned.
    static long
    Parses a string timestamp or date to an Epoc timestamp; if the date is a ISO-8601 extended local date format, the time at the beginning of the day is returned.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DateUtil

      public DateUtil()
  • Method Details

    • toStartOfDay

      public static long toStartOfDay(String date)
      Parses a string timestamp or date to an Epoc timestamp; if the date is a ISO-8601 extended local date format, the time at the beginning of the day is returned.
      Parameters:
      date - the date in ISO-8601 extended local date format
      Returns:
      Epoch time for the start of the day
    • toEndOfDay

      public static long toEndOfDay(String date)
      Parses a string timestamp or date to an Epoc timestamp; if the date is a ISO-8601 extended local date format, the time at the end of the day is returned.
      Parameters:
      date - the date in ISO-8601 extended local date format
      Returns:
      Epoch time for the start of the day