Interface DateMapFunctions

All Superinterfaces:
Column<LocalDate>, Comparator<LocalDate>, Iterable<LocalDate>
All Known Implementing Classes:
DateColumn

public interface DateMapFunctions extends Column<LocalDate>
An interface for mapping operations unique to Date columns
  • Method Details

    • 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 argument

      Missing 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 day
      n - 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
      Specified by:
      get in interface Column<LocalDate>
    • min

      LocalDate min()
    • max

      LocalDate max()