Date.quarter
Date.quarter
Function
Read the quarter of the current Date.
Syntax
date_value.quarter()
Parameters
No parameters.
Return value
| Type | Description |
|---|---|
| Int | Returns the quarter number from 1 to 4. |
Code Example
result = date('2026-06-09 10:11:12').quarter() // Output: 2
Notes
- Quarters are calculated in months: January to March is 1, April to June is 2, July to September is 3, and October to December is 4.