Class DateDataUtil

    • Field Detail

      • LOCALTZ

        @Deprecated
        public static final TimeZone LOCALTZ
        Deprecated.
        since 6.1; use DateTimeUtil#LOCALTZ instead.
        The default time zone used in date conversions. This matches the time zone returned by TimeZone.getDefault().
    • Method Detail

      • epochDaysToDate

        @Deprecated
        public static Date epochDaysToDate​(long epochDays,
                                           TimeZone tz)
        Deprecated.
        since 6.1; use DateTimeUtil#toDate(long,TimeZone) instead.
        Converts a date value in epoch days to a Java timestamp in the specified time zone.
        Parameters:
        epochDays - the date in epoch days to convert
        tz - the time zone to which the resulting timestamp should be relative
        Returns:
        the Java timestamp corresponding to the date
      • epochDaysToMillis

        @Deprecated
        public static long epochDaysToMillis​(long epochDays,
                                             TimeZone tz)
        Deprecated.
        since 6.1; use DateTimeUtil#epochDaysToMillis(long,TimeZone) instead.
        Converts a date value in epoch days to a timestamp in Java epoch time.
        Parameters:
        epochDays - the date in epoch days to convert
        tz - the time zone to which the resulting timestamp should be relative
        Returns:
        the Java epoch time corresponding to the date
      • dateToEpochDays

        @Deprecated
        public static long dateToEpochDays​(Date date,
                                           TimeZone tz)
        Deprecated.
        since 6.1; use DateTimeUtil#toDaysSinceEpoch(java.util.Date,TimeZone) instead.
        Truncates a Java timestamp value in a specified time zone to an epoch days value.
        Parameters:
        date - the Java timestamp to convert
        tz - the time zone to which the timestamp is relative
        Returns:
        the epoch days value
      • millisToEpochDays

        @Deprecated
        public static long millisToEpochDays​(long millis,
                                             TimeZone tz)
        Deprecated.
        since 6.1; use DateTimeUtil#toDaysSinceEpoch(long,TimeZone) instead.
        Truncates a timestamp in a Java epoch time value in a specified time zone to an epoch days value.
        Parameters:
        millis - the Java epoch time to convert
        tz - the time zone to which the timestamp is relative
        Returns:
        the epoch days value