Date.start_of_day
Date.start_of_day
Function
Returns a new Date object at zero o'clock on the current day.
Syntax
date_value.start_of_day()
Parameters
None.
Return value
| Type | Description |
|---|---|
| Date | A new Date object at 00:00:00 today. |
Code Example
result = date('2026-01-01 10:11:12').start_of_day().to_string() // Output: 2026-01-01 00:00:00 print result
Notes
- The original Date object is not modified.