daft.functions.next_day#
next_day #
next_day(expr: Expression, day_of_week: str) -> Expression
Returns the next occurrence of the specified day of the week after the given date.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
expr | Expression | a Date or Timestamp expression. | required |
day_of_week | str | the target weekday (e.g. | required |
Returns:
| Name | Type | Description |
|---|---|---|
Expression | Expression | a Date expression for the next occurrence of that weekday. |
Examples:
1 2 3 | |
next_day(col(dt), lit("Monday")) Source code in daft/functions/datetime.py
1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 | |