<aside> đ Links (Property base class)
Notion Ruby Mapping Public API Reference
</aside>
<aside> âšī¸ â Table of Contents
</aside>
last_edited_time returns the last edited time value managed by Notion.
LastEditedTimeProperty is read-only. It does not provide DateProperty-style setters such as start_date=, end_date=, time_zone=, or clear.
last_edited_time of Page property generated from properties[] returns the last edited time by ISO8601 String.
last_edited_time of Database or DataSource property generated from properties[] returns an empty Hash {}. The property schema has no timestamp value.
last_edited_time of Page, Database, or DataSource object metadata returns the last edited time by ISO8601 String.
page.properties["LastEditedTimeTitle"].last_edited_time
# => "2022-03-14T01:55:00.000Z"
db.properties["LastEditedTimeTitle"].last_edited_time
# => {}
page.last_edited_time.last_edited_time
# => "2022-03-14T01:55:00.000Z"
db.last_edited_time.last_edited_time
# => "2022-03-23T10:43:00.000Z"
LastEditedTimeProperty 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 LastEditedTimeProperty, these methods create timestamp filters using "timestamp" => "last_edited_time".
filter_before creates a Query object for before filter.
ds.created_time.filter_before Time.new(2022, 5, 4, 21, 30)
# => #<NotionRubyMapping::Query:0x0000000110675cf8 @filter={"timestamp"=>"created_time", "created_time"=>{"before"=>"2022-05-04T21:30:00+09:00"}}, @page_size=100, @sort=[], @start_cursor=nil>
### only RollupProperty (date)
ds.properties["RollupTitle"].filter_before Date.new(2022, 5, 7), another_type: "date"
# => #<NotionRubyMapping::Query:0x00000001055804e8 @filter={"property"=>"RollupTitle", "date"=>{"before"=>"2022-05-07"}}, @page_size=100, @sort=[], @start_cursor=nil>