<aside> 👉 Links (Property base class)
Notion Ruby Mapping Public API Reference
</aside>
created_time returns the created time value managed by Notion.
CreatedTimeProperty is read-only. It does not provide DateProperty-style setters such as start_date=, end_date=, time_zone=, or clear.
created_time of Page property generated from properties[] returns the created time by ISO8601 String.
created_time of Database or DataSource property generated from properties[] returns an empty Hash {}. The property schema has no timestamp value.
created_time of Page, Database, or DataSource object metadata returns the created time by ISO8601 String.
page.properties["CreatedTimeTitle"].created_time
# => "2022-03-10T04:13:00.000Z"
db.properties["CreatedTimeTitle"].created_time
# => {}
page.created_time.created_time
# => "2022-03-10T04:13:00.000Z"
ds.created_time.created_time
# => "2022-02-07T21:29:00.000Z"
CreatedTimeProperty inherits date and timestamp filter methods from DateBaseProperty.
DateBaseProperty is a common base class for properties that support Notion date or timestamp filters. It does not mean that every subclass is a user-editable date property.
For metadata such as ds.created_time, these methods create timestamp filters using "timestamp" => "created_time". A named property uses a different "property"-based branch; generating a Hash does not guarantee that the Notion API accepts it. A timestamp filter must not include a property name.
These methods return a Query. Use .filter to read its generated Hash; creating the Query does not send an API request. Omit condition: and another_type: for ordinary timestamp filters.
For date arguments, Date values passed to filter_equals or filter_does_not_equal generate compound after/before filters with strict boundaries at 00:00:00 and 23:59:59. Exact endpoints are excluded from the equals range. The offset is taken from the execution environment's current local offset, not calculated for the target date. For filter_before and filter_on_or_after, a Date uses 00:00:00; for filter_after and filter_on_or_before, it uses 23:59:59. Time is formatted with its offset, DateTime uses ISO 8601, and a String is passed through.
The examples show generated Ruby Hashes or Query objects, not verified API responses.
Creates a filter for this week.
ds.created_time.filter_this_week.filter
# => {"timestamp" => "created_time", "created_time" => {"this_week" => {}}}
Creates an is_empty filter with true as its condition value.