tf = isregular(t)
tf = isregular(t, unit)
| Parameter | Description |
|---|---|
| inputs | A datetime array and optional unit selector such as years, quarters, months, weeks, or days. |
| Parameter | Description |
|---|---|
| output | A logical scalar. |
Test whether datetime values are regularly spaced.
Without a unit, regularity is tested on serial date differences. With a calendar unit, the function compares unit indices.
Array-valued inputs keep their data shape when the operation supports arrays. Scalar operands are expanded where the implementation defines scalar expansion.
isregular(datetime(2024,1,1):days(1):datetime(2024,1,3))
isregular([datetime(2024,1,1), datetime(2024,2,1), datetime(2024,3,1)], 'months')
| Version | Description |
|---|---|
| 2.0.0 | initial version |