Class DateDataUtil

java.lang.Object
com.pervasive.datarush.tokens.scalar.DateDataUtil

@Deprecated public class DateDataUtil extends Object
Deprecated.
since 6.1; use DateTimeUtils instead.
Utilities for working with date data.
See Also:
  • Method Details

    • epochDaysToDate

      @Deprecated public static Date epochDaysToDate(long epochDays, ZoneId zoneId)
      Deprecated.
      since 6.1; use DateTimeUtil#toDate(long, ZoneId) 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
      zoneId - the time zone id to which the resulting timestamp should be relative
      Returns:
      the Java timestamp corresponding to the date
    • epochDaysToMillis

      @Deprecated public static long epochDaysToMillis(long epochDays, ZoneId zoneId)
      Deprecated.
      since 6.1; use DateTimeUtil#epochDaysToMillis(long, ZoneId) instead.
      Converts a date value in epoch days to a timestamp in Java epoch time.
      Parameters:
      epochDays - the date in epoch days to convert
      zoneId - the time zone id 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, ZoneId zoneId)
      Deprecated.
      since 6.1; use DateTimeUtil#toDaysSinceEpoch(java.util.Date, ZoneId) instead.
      Truncates a Java timestamp value in a specified time zone to an epoch days value.
      Parameters:
      date - the Java timestamp to convert
      zoneId - the time zone id to which the timestamp is relative
      Returns:
      the epoch days value
    • millisToEpochDays

      @Deprecated public static long millisToEpochDays(long millis, ZoneId zoneId)
      Deprecated.
      since 6.1; use DateTimeUtil#toDaysSinceEpoch(long, ZoneId) 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
      zoneId - the time zone id to which the timestamp is relative
      Returns:
      the epoch days value
    • parse

      @Deprecated public static DateToken parse(String dateText)
      Deprecated.
      since 6.1; use DateToken.parse(String) instead.
      Parses an ISO 8601 timestamp string into a date value. If a time portion is provided, it is ignored.
      Parameters:
      dateText - an ISO 8601 timestamp value
      Returns:
      the date value, as a DateToken, or null if dateText is null
      See Also: