public final class Dates extends Object
| Constructor and Description |
|---|
Dates() |
| Modifier and Type | Method and Description |
|---|---|
static String |
DAY_OF_WEEK_LONG(java.time.ZonedDateTime date)
Extracts day of the week from the date.
|
static String |
DAY_OF_WEEK_SHORT(java.time.ZonedDateTime date)
Extracts day of the week from the date.
|
static int |
DAY_OF_WEEK(java.time.ZonedDateTime date)
Extracts day of the week from the date.
|
static int |
DAY_OF_YEAR(java.time.ZonedDateTime date)
Extracts Day of the year from the date.
|
static int |
DAYS_BETWEEN_NOW(java.time.ZonedDateTime date)
Return number of dates between now and date days.
|
static int |
DAYS_BETWEEN(java.time.ZonedDateTime date1,
java.time.ZonedDateTime date2)
Return number of dates between two days.
|
static String |
ERA_LONG(java.time.ZonedDateTime date)
Extracts Era from the date as long text.
|
static String |
ERA_SHORT(java.time.ZonedDateTime date)
Extracts Era from the date as short text.
|
static int |
ERA(java.time.ZonedDateTime date)
Extracts Era from the date.
|
static boolean |
isDate(String value)
Checks if a column is a date column or not.
|
static boolean |
isTime(String value)
Checks if the value passed is a date time.
|
static String |
MONTH_LONG(java.time.ZonedDateTime date)
Extracts a long month description from Date.
|
static String |
MONTH_SHORT(java.time.ZonedDateTime date)
Extracts a short month description from Date.
|
static int |
MONTH(java.time.ZonedDateTime date)
Converts a
ZonedDateTime to Month in year. |
static int |
SECONDS_TO_DAYS(int seconds)
Converts seconds to days.
|
static int |
SECONDS_TO_HOURS(int seconds)
Converts seconds to hours.
|
static int |
SECONDS_TO_MINUTES(int seconds)
Converts seconds to mins.
|
static int |
SECONDS_TO_WEEKS(int seconds)
Converts seconds to weeks.
|
static long |
UNIXTIMESTAMP_MILLIS(java.time.ZonedDateTime date)
Converts a date to long -- unix timestamp in milli-seconds.
|
static long |
UNIXTIMESTAMP_SECONDS(java.time.ZonedDateTime date)
Converts a date to long -- unix timestamp in seconds.
|
static int |
YEAR(java.time.ZonedDateTime date)
Extracts only year from Date.
|
public static long UNIXTIMESTAMP_MILLIS(java.time.ZonedDateTime date)
date - to be converted to unix timestamp.public static long UNIXTIMESTAMP_SECONDS(java.time.ZonedDateTime date)
date - to be converted to unix timestamp.public static int MONTH(java.time.ZonedDateTime date)
ZonedDateTime to Month in year.
January is 1, February is 2, and so on.
date - to extract month.public static String MONTH_SHORT(java.time.ZonedDateTime date)
date - to extract short month description.public static String MONTH_LONG(java.time.ZonedDateTime date)
date - to extract long month description.public static int YEAR(java.time.ZonedDateTime date)
date - to extract year from.public static int DAY_OF_WEEK(java.time.ZonedDateTime date)
date - to extract date of the week.public static String DAY_OF_WEEK_SHORT(java.time.ZonedDateTime date)
date - to extract date of the week.public static String DAY_OF_WEEK_LONG(java.time.ZonedDateTime date)
date - to extract date of the week.public static int DAY_OF_YEAR(java.time.ZonedDateTime date)
date - to extract date of the year.public static int ERA(java.time.ZonedDateTime date)
date - to extract era.public static String ERA_SHORT(java.time.ZonedDateTime date)
date - to extract era.public static String ERA_LONG(java.time.ZonedDateTime date)
date - to extract era.public static int DAYS_BETWEEN(java.time.ZonedDateTime date1,
java.time.ZonedDateTime date2)
date1 - First date.date2 - Second date.public static int DAYS_BETWEEN_NOW(java.time.ZonedDateTime date)
date - Now - this date.public static int SECONDS_TO_DAYS(int seconds)
seconds - to be converted.public static int SECONDS_TO_HOURS(int seconds)
seconds - to be converted.public static int SECONDS_TO_MINUTES(int seconds)
seconds - to be converted.public static int SECONDS_TO_WEEKS(int seconds)
seconds - to be converted.public static boolean isDate(String value)
value - representing a date.public static boolean isTime(String value)
value - representing date time.Copyright © 2020 CDAP Licensed under the Apache License, Version 2.0.