- java.lang.Object
-
- com.pervasive.datarush.tokens.scalar.DateDataUtil
-
@Deprecated public class DateDataUtil extends Object
Deprecated.since 6.1; useDateTimeUtils
instead.Utilities for working with date data.- See Also:
DateTokenConverter
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static long
dateToEpochDays(Date date, TimeZone tz)
Deprecated.since 6.1; useDateTimeUtil#toDaysSinceEpoch(java.util.Date,TimeZone)
instead.static Date
epochDaysToDate(long epochDays, TimeZone tz)
Deprecated.since 6.1; useDateTimeUtil#toDate(long,TimeZone)
instead.static long
epochDaysToMillis(long epochDays, TimeZone tz)
Deprecated.since 6.1; useDateTimeUtil#epochDaysToMillis(long,TimeZone)
instead.static long
millisToEpochDays(long millis, TimeZone tz)
Deprecated.since 6.1; useDateTimeUtil#toDaysSinceEpoch(long,TimeZone)
instead.static DateToken
parse(String dateText)
Deprecated.since 6.1; useDateToken.parse(String)
instead.
-
-
-
Field Detail
-
LOCALTZ
@Deprecated public static final TimeZone LOCALTZ
Deprecated.since 6.1; useDateTimeUtil#LOCALTZ
instead.The default time zone used in date conversions. This matches the time zone returned byTimeZone.getDefault()
.
-
-
Method Detail
-
epochDaysToDate
@Deprecated public static Date epochDaysToDate(long epochDays, TimeZone tz)
Deprecated.since 6.1; useDateTimeUtil#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 converttz
- 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; useDateTimeUtil#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 converttz
- 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; useDateTimeUtil#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 converttz
- 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; useDateTimeUtil#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 converttz
- the time zone to which the timestamp is relative- Returns:
- the epoch days value
-
parse
@Deprecated public static DateToken parse(String dateText)
Deprecated.since 6.1; useDateToken.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
, ornull
if dateText isnull
- See Also:
DateTokenConverter.set(String)
-
-