Interface DateMapFunctions
-
- All Known Implementing Classes:
DateColumn
public interface DateMapFunctions extends Column<LocalDate>
An interface for mapping operations unique to Date columns
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default DateTimeColumn
atStartOfDay()
default DateTimeColumn
atTime(LocalTime time)
Returns a DateTime column where each value consists of the dates from this column combined with the corresponding times from the other columndefault DateTimeColumn
atTime(TimeColumn timeColumn)
Returns a DateTime column where each value consists of the dates from this column combined with the corresponding times from the other columnstatic String
dateColumnName(Column<LocalDate> column1, int value, TemporalUnit unit)
default IntColumn
dayOfMonth()
default StringColumn
dayOfWeek()
default IntColumn
dayOfWeekValue()
default IntColumn
dayOfYear()
default IntColumn
daysUntil(DateColumn column2)
LocalDate
get(int index)
Returns the value at the given zero-based indexint
getIntInternal(int r)
LocalDate
max()
LocalDate
min()
default DateColumn
minus(int value, ChronoUnit unit)
default DateColumn
minusDays(int days)
default DateColumn
minusMonths(int months)
default DateColumn
minusWeeks(int weeks)
default DateColumn
minusYears(int years)
default StringColumn
month()
default IntColumn
monthsUntil(DateColumn column2)
default IntColumn
monthValue()
default DateColumn
plus(int value, ChronoUnit unit)
default DateColumn
plusDays(int days)
default DateColumn
plusMonths(int months)
default DateColumn
plusWeeks(int weeks)
default DateColumn
plusYears(int years)
default IntColumn
timeUntil(DateColumn end, ChronoUnit unit)
Calculates the temporal difference between each element of the receiver and the respective element of the argumentdefault IntColumn
timeWindow(ChronoUnit unit, int n)
default IntColumn
timeWindow(ChronoUnit unit, int n, LocalDate start)
Returns a column containing integers representing the nth group (0-based) that a date falls into.default IntColumn
weeksUntil(DateColumn column2)
default IntColumn
year()
default StringColumn
yearDay()
Returns a StringColumn with the year and day-of-year derived from this column concatenated into a String that will sort lexicographically in temporal order.default StringColumn
yearMonth()
Returns a StringColumn with the year and month from this column concatenated into a String that will sort lexicographically in temporal order.default StringColumn
yearQuarter()
Returns a StringColumn with the year and quarter from this column concatenated into a String that will sort lexicographically in temporal order.default IntColumn
yearsUntil(DateColumn column2)
default StringColumn
yearWeek()
Returns a StringColumn with the year and week-of-year derived from this column concatenated into a String that will sort lexicographically in temporal order.-
Methods inherited from interface tech.tablesaw.columns.Column
allMatch, anyMatch, append, append, append, appendCell, appendCell, appendMissing, appendObj, asBytes, asList, asObjectArray, asSet, asStringColumn, byteSize, clear, columnWidth, contains, copy, count, count, countMissing, countUnique, emptyCopy, emptyCopy, equals, filter, first, getString, getUnformattedString, indexOf, inRange, interpolate, isEmpty, isMissing, isMissing, isNotMissing, lag, last, lastIndexOf, lead, map, map, mapInto, max, max, min, min, name, noneMatch, parser, print, reduce, reduce, removeMissing, rolling, rowComparator, sampleN, sampleX, set, set, set, set, set, set, setMissing, setMissingTo, setName, setParser, size, sortAscending, sortDescending, sorted, subset, summary, title, type, unique, valueHash, where
-
Methods inherited from interface java.util.Comparator
compare, equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
-
-
-
Method Detail
-
dateColumnName
static String dateColumnName(Column<LocalDate> column1, int value, TemporalUnit unit)
-
daysUntil
default IntColumn daysUntil(DateColumn column2)
-
weeksUntil
default IntColumn weeksUntil(DateColumn column2)
-
monthsUntil
default IntColumn monthsUntil(DateColumn column2)
-
yearsUntil
default IntColumn yearsUntil(DateColumn column2)
-
dayOfMonth
default IntColumn dayOfMonth()
-
dayOfYear
default IntColumn dayOfYear()
-
monthValue
default IntColumn monthValue()
-
month
default StringColumn month()
-
year
default IntColumn year()
-
yearQuarter
default StringColumn yearQuarter()
Returns a StringColumn with the year and quarter from this column concatenated into a String that will sort lexicographically in temporal order.This simplifies the production of plots and tables that aggregate values into standard temporal units (e.g., you want monthly data but your source data is more than a year long and you don't want months from different years aggregated together).
-
yearMonth
default StringColumn yearMonth()
Returns a StringColumn with the year and month from this column concatenated into a String that will sort lexicographically in temporal order.This simplifies the production of plots and tables that aggregate values into standard temporal units (e.g., you want monthly data but your source data is more than a year long and you don't want months from different years aggregated together).
-
yearDay
default StringColumn yearDay()
Returns a StringColumn with the year and day-of-year derived from this column concatenated into a String that will sort lexicographically in temporal order.This simplifies the production of plots and tables that aggregate values into standard temporal units (e.g., you want monthly data but your source data is more than a year long and you don't want months from different years aggregated together).
-
yearWeek
default StringColumn yearWeek()
Returns a StringColumn with the year and week-of-year derived from this column concatenated into a String that will sort lexicographically in temporal order.This simplifies the production of plots and tables that aggregate values into standard temporal units (e.g., you want monthly data but your source data is more than a year long and you don't want months from different years aggregated together).
-
dayOfWeekValue
default IntColumn dayOfWeekValue()
-
dayOfWeek
default StringColumn dayOfWeek()
-
timeUntil
default IntColumn timeUntil(DateColumn end, ChronoUnit unit)
Calculates the temporal difference between each element of the receiver and the respective element of the argumentMissing values in either result in a Missing Value for the new column
-
plusDays
default DateColumn plusDays(int days)
-
plusWeeks
default DateColumn plusWeeks(int weeks)
-
plusYears
default DateColumn plusYears(int years)
-
plusMonths
default DateColumn plusMonths(int months)
-
minusDays
default DateColumn minusDays(int days)
-
minusWeeks
default DateColumn minusWeeks(int weeks)
-
minusYears
default DateColumn minusYears(int years)
-
minusMonths
default DateColumn minusMonths(int months)
-
timeWindow
default IntColumn timeWindow(ChronoUnit unit, int n, LocalDate start)
Returns a column containing integers representing the nth group (0-based) that a date falls into.Example: When Unit = ChronoUnit.DAY and n = 5, we form 5 day groups. a Date that is 2 days after the start is assigned to the first ("0") group. A day 7 days after the start is assigned to the second ("1") group.
- Parameters:
unit
- A ChronoUnit greater than or equal to a dayn
- The number of units in each group.start
- The starting point of the first group; group boundaries are offsets from this point
-
timeWindow
default IntColumn timeWindow(ChronoUnit unit, int n)
-
plus
default DateColumn plus(int value, ChronoUnit unit)
-
minus
default DateColumn minus(int value, ChronoUnit unit)
-
atStartOfDay
default DateTimeColumn atStartOfDay()
-
atTime
default DateTimeColumn atTime(LocalTime time)
Returns a DateTime column where each value consists of the dates from this column combined with the corresponding times from the other column
-
atTime
default DateTimeColumn atTime(TimeColumn timeColumn)
Returns a DateTime column where each value consists of the dates from this column combined with the corresponding times from the other column
-
getIntInternal
int getIntInternal(int r)
-
get
LocalDate get(int index)
Description copied from interface:Column
Returns the value at the given zero-based index
-
min
LocalDate min()
-
max
LocalDate max()
-
-