Date
A timezone-less calendar date
Date attributes are used to represent a single calendar year, month and day, independent of timezone. Attio exclusively works with the ISO 8601 format, i.e. YYYY-MM-DD
e.g. 2023-11-24
.
There is only one default example of a date attribute, foundation_date
on the company object.
Date attributes can only be single-select.
Reading values
Date attributes have a single property, value
(a string).
Writing values
Date values can be written by passing an ISO 8601 date string.
If hours, months, seconds or timezones are provided, they will be trimmed. For example:
'2023'
→'2023-01-01'
'2023-01'
→'2023-01-01'
'2023-01-02'
→'2023-01-02'
'2023-01-02T13:00'
→'2023-01-02'
'2023-01-02T14:00:00'
→'2023-01-02'
'2023-01-02T15:00:00.000000000'
→'2023-01-02'
'2023-01-02T15:00:00.000000000+02:00'
→'2023-01-02'
If a timezone is provided that would result in a different calendar date in UTC, the date will be coerced to UTC and then the timezone component will be trimmed. For example, the value '2023-01-02T23:00:00-10:00'
will be returned as '2023-01-03'
.
As date values are always single-select, you may write values either by passing the date string directly, or by wrapping a single value in an array.
You may also write date values using an object with a single value
key.
Filtering
Date attribute values can be filtered by their value. You can filter for an exact date using the implicit syntax, or use the $eq
,$gt
,$gte
,$lt
,$lte
operators with the explicit syntax.