Class DateUtil

java.lang.Object
org.projecthusky.common.utils.DateUtil

@Deprecated(since="1.0", forRemoval=true) public class DateUtil extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Toolbox for date handling.
Toolbox für das Datums-Handling.
Deprecated, use Hl7Dtm, DateTimes and the new Java time API.
  • Field Details

    • SHORT_DATE_FORMAT

      public static final String SHORT_DATE_FORMAT
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • LONG_DATE_FORMAT

      public static final String LONG_DATE_FORMAT
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
    • ERRORMSG_CANNOT_PARSE_DATE_VAL

      public static final String ERRORMSG_CANNOT_PARSE_DATE_VAL
      Deprecated, for removal: This API element is subject to removal in a future version.
      See Also:
  • Method Details

    • date2Ivlts

      public static IVLTS date2Ivlts(Date value)
      Deprecated.
      Converts the given date to a CDA R2 IVL_TS value (without timezone).
      Konvertiert das angegebene Datum in einen CDA R2 IVL_TS-Wert (ohne Zeitzonenangabe).
      Parameters:
      value - the value
      Returns:
      the ivlts
    • date2IvltsDateOnly

      public static IVLTS date2IvltsDateOnly(Date value)
      Deprecated.
      Converts the given date to a CDA R2 IVL_TS value (without timezone).
      Konvertiert das angegebene Datum in einen CDA R2 IVL_TS-Wert (ohne Tageszeit und Zeitzonenangabe).
      Parameters:
      value - the value
      Returns:
      the ivlts
    • date2IvltsTzon

      public static IVLTS date2IvltsTzon(Date value)
      Deprecated.
      Converts the given date to a CDA R2 IVL_TS value (including timezone).
      Konvertiert das angegebene Datum in einen CDA R2 IVL_TS-Wert (mit Zeitzonenangabe).
      Parameters:
      value - the value
      Returns:
      the ivlts
    • date2Ts

      public static TS date2Ts(Date value)
      Deprecated.
      Converts the given date including day of time to a CDA R2 TS (without time zone).
      Konvertiert das angegebene Datum inkl. Tageszeit in ein CDA R2 TS (ohne Zeitzone).
      Parameters:
      value - the value
      Returns:
      the ts
    • date2TsDateOnly

      public static TS date2TsDateOnly(Date value)
      Deprecated.
      Converts the given date without day of time to a CDA R2 TS (without time zone).
      Konvertiert das angegebene Datum ohne Tageszeit in ein CDA R2 TS (ohne Zeitzone).
      Parameters:
      value - the value
      Returns:
      the ts
    • date2TsDateOnly

      public static TS date2TsDateOnly(ZonedDateTime value)
      Deprecated.
      Converts the given date without day of time to a CDA R2 TS (without time zone).
      Konvertiert das angegebene Datum ohne Tageszeit in ein CDA R2 TS (ohne Zeitzone).
      Parameters:
      value - the value
      Returns:
      the ts
    • date2TsTzon

      public static TS date2TsTzon(Date value)
      Deprecated.
      Converts the given date including day of time to a CDA R2 TS (including time zone).
      Konvertiert das angegebene Datum inkl. Tageszeit in ein CDA R2 TS (mit Zeitzone).
      Parameters:
      value - the value
      Returns:
      the ts
    • formatDateOnly

      public static String formatDateOnly(Date value)
      Deprecated.
      Formats the given timestamp as String: yyyyMMdd
      Formatiert den angegebenen Zeitstempel als String: yyyyMMdd
      Parameters:
      value - the value
      Returns:
      the string
    • formatDateOnly

      public static String formatDateOnly(ZonedDateTime value)
      Deprecated.
      Formats the given timestamp as String: yyyyMMdd
      Formatiert den angegebenen Zeitstempel als String: yyyyMMdd
      Parameters:
      value - the value
      Returns:
      the string
    • formatDateTime

      public static String formatDateTime(Date value)
      Deprecated.
      Formats the given timestamp as String: yyyyMMddHHmmss
      Formatiert den angegebenen Zeitstempel als String: yyyyMMddHHmmss
      Parameters:
      value - the value
      Returns:
      the string
    • formatDateTime

      public static String formatDateTime(ZonedDateTime value)
      Deprecated.
      Formats the given timestamp as String: yyyyMMddHHmmss
      Formatiert den angegebenen Zeitstempel als String: yyyyMMddHHmmss
      Parameters:
      value - the value
      Returns:
      the string
    • formatDateTimeTzon

      public static String formatDateTimeTzon(Date value)
      Deprecated.
      Formats the given timestamp as String: yyyyMMddHHmmssXXXX
      Formatiert den angegebenen Zeitstempel als String: yyyyMMddHHmmssXXXX
      Parameters:
      value - the value
      Returns:
      the string
    • formatDateTimeTzon

      public static String formatDateTimeTzon(ZonedDateTime value)
      Deprecated.
      Formats the given timestamp as String: yyyyMMddHHmmssXXXX
      Formatiert den angegebenen Zeitstempel als String: yyyyMMddHHmmssXXXX
      Parameters:
      value - the value
      Returns:
      the string
    • parseDate

      public static Date parseDate(ZonedDateTime date)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • parseZonedDate

      public static ZonedDateTime parseZonedDate(Date date)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • parseDate

      public static Date parseDate(String dateSt)
      Deprecated.
      Parses the given String into a timestamp. Expected format: dd.MM.yyyy
      Parst den angegebenen String in einen Zeitstempel. Erwartetes Format: dd.MM.yyyy
      Parameters:
      dateSt -
      date String
      Returns:
      the date
    • parseDateAndTime

      public static Date parseDateAndTime(String dateSt)
      Deprecated.
      Parses the given String into a timestamp. Expected format: dd.MM.yyyy HH:mm or dd.MM.yyyy HH:mm:ss
      Parst den angegebenen String in einen Zeitstempel. Erwartetes Format: dd.MM.yyyy HH:mm oder dd.MM.yyyy HH:mm:ss
      Parameters:
      dateSt -
      date String
      Returns:
      the date
    • parseDateyyyyMM

      public static Date parseDateyyyyMM(String value)
      Deprecated.
      Parses the given String into a timestamp. Expected format: yyyyMM
      Parst den angegebenen String in einen Zeitstempel. Erwartetes Format: yyyyMM
      Parameters:
      value -
      value
      Returns:
      java.util.Date
    • parseDateyyyyMMdd

      public static Date parseDateyyyyMMdd(String value)
      Deprecated.
      Parses the given String into a timestamp. Expected format: yyyyMMdd
      Parst den angegebenen String in einen Zeitstempel. Erwartetes Format: yyyyMMdd
      Parameters:
      value -
      value
      Returns:
      java.util.Date
    • parseDateyyyyMMdd2

      public static Date parseDateyyyyMMdd2(String value)
      Deprecated.
      Parses the given String into a timestamp. Expected format: yyyy-MM-dd
      Parst den angegebenen String in einen Zeitstempel. Erwartetes Format: yyyy-MM-dd
      Parameters:
      value -
      value
      Returns:
      java.util.Date
    • parseDateyyyyMMddHHmm

      public static Date parseDateyyyyMMddHHmm(String value)
      Deprecated.
      Parses the given String into a timestamp. Expected format: yyyyMMddHHmm
      Parst den angegebenen String in einen Zeitstempel. Erwartetes Format: yyyyMMddHHmm
      Parameters:
      value -
      value
      Returns:
      java.util.Date
    • parseDateyyyyMMddHHmmss

      public static Date parseDateyyyyMMddHHmmss(String value)
      Deprecated.
      Parses the given String into a timestamp. Expected format: yyyyMMddHHmmss
      Parst den angegebenen String in einen Zeitstempel. Erwartetes Format: yyyyMMddHHmmss
      Parameters:
      value -
      value
      Returns:
      java.util.Date
    • parseDateyyyyMMddHHmmZ

      public static Date parseDateyyyyMMddHHmmZ(String value)
      Deprecated.
      Parses the given String into a timestamp. Expected format: yyyyMMddHHmmZ
      Parst den angegebenen String in einen Zeitstempel. Erwartetes Format: yyyyMMddHHmmZ
      Parameters:
      value -
      value
      Returns:
      java.util.Date
    • parseDateyyyyMMddHHmmZZZZ

      public static Date parseDateyyyyMMddHHmmZZZZ(String value)
      Deprecated.
      Parses the given String into a timestamp. Expected format: yyyyMMddHHmmZZZZ
      Parst den angegebenen String in einen Zeitstempel. Erwartetes Format: yyyyMMddHHmmZZZZ
      Parameters:
      value -
      value
      Returns:
      java.util.Date
    • parseDateyyyyMMddTHHmmss

      public static Date parseDateyyyyMMddTHHmmss(String value)
      Deprecated.
      Parses the given String into a timestamp. Expected format: yyyy-MM-dd'T'HH:mm:ss
      Parst den angegebenen String in einen Zeitstempel. Erwartetes Format: yyyy-MM-dd'T'HH:mm:ss
      Parameters:
      value -
      value
      Returns:
      java.util.Date
    • equalsDateOnly

      public static boolean equalsDateOnly(Date validFrom, Date validFrom2)
      Deprecated.
      Check whether the dates of the two dates are equal (ignoring the time of the day).
      Parameters:
      validFrom - the valid from
      validFrom2 - the valid from 2
      Returns:
      true, if equal