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 DateTimeColumnatStartOfDay()default DateTimeColumnatTime(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 DateTimeColumnatTime(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 StringdateColumnName(Column<LocalDate> column1, int value, TemporalUnit unit)default IntColumndayOfMonth()default StringColumndayOfWeek()default IntColumndayOfWeekValue()default IntColumndayOfYear()default IntColumndaysUntil(DateColumn column2)LocalDateget(int index)Returns the value at the given zero-based indexintgetIntInternal(int r)LocalDatemax()LocalDatemin()default DateColumnminus(int value, ChronoUnit unit)default DateColumnminusDays(int days)default DateColumnminusMonths(int months)default DateColumnminusWeeks(int weeks)default DateColumnminusYears(int years)default StringColumnmonth()default IntColumnmonthsUntil(DateColumn column2)default IntColumnmonthValue()default DateColumnplus(int value, ChronoUnit unit)default DateColumnplusDays(int days)default DateColumnplusMonths(int months)default DateColumnplusWeeks(int weeks)default DateColumnplusYears(int years)default IntColumntimeUntil(DateColumn end, ChronoUnit unit)Calculates the temporal difference between each element of the receiver and the respective element of the argumentdefault IntColumntimeWindow(ChronoUnit unit, int n)default IntColumntimeWindow(ChronoUnit unit, int n, LocalDate start)Returns a column containing integers representing the nth group (0-based) that a date falls into.default IntColumnweeksUntil(DateColumn column2)default IntColumnyear()default StringColumnyearDay()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 StringColumnyearMonth()Returns a StringColumn with the year and month from this column concatenated into a String that will sort lexicographically in temporal order.default StringColumnyearQuarter()Returns a StringColumn with the year and quarter from this column concatenated into a String that will sort lexicographically in temporal order.default IntColumnyearsUntil(DateColumn column2)default StringColumnyearWeek()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:ColumnReturns the value at the given zero-based index
-
min
LocalDate min()
-
max
LocalDate max()
-
-