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
1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 | |