{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2020-05-30T05:47:58Z","object_id":{"id":1296,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_base","title":"mod_base","uri":"https:\/\/zotonic.com\/id\/1296"},"seq":1000000}],"predicate":{"id":333,"is_a":["meta","predicate"],"name":"in_module","title":{"_type":"trans","tr":{"en":"In module"}},"uri":"https:\/\/zotonic.com\/id\/in_module"}},"relation":{"objects":[{"created":"2020-05-30T05:47:58Z","object_id":{"id":1299,"is_a":["text","documentation","reference","template_filter"],"name":"doc_template_filter_filter_date","title":"date","uri":"https:\/\/zotonic.com\/id\/1299"},"seq":1000000}],"predicate":{"id":303,"is_a":["meta","predicate"],"name":"relation","title":{"_type":"trans","tr":{"nl":"Relatie","en":"Relation"}},"uri":"http:\/\/purl.org\/dc\/terms\/relation"}},"subject":{"objects":[{"created":"2026-09-09T13:48:03Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:48:03Z","object_id":{"id":2563,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_frontend_developer","title":"Frontend developer","uri":"https:\/\/zotonic.com\/id\/2563"},"seq":2},{"created":"2026-09-09T13:48:03Z","object_id":{"id":2621,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_template_filter","title":"Template filter","uri":"https:\/\/zotonic.com\/id\/2621"},"seq":3},{"created":"2026-09-09T13:48:03Z","object_id":{"id":2642,"is_a":["categorization","keyword","keyword_task"],"name":"zotonic_topic_format","title":"Format","uri":"https:\/\/zotonic.com\/id\/2642"},"seq":4},{"created":"2026-09-09T13:48:03Z","object_id":{"id":2662,"is_a":["categorization","keyword","keyword_data_type"],"name":"zotonic_topic_date_and_time","title":"Date and time","uri":"https:\/\/zotonic.com\/id\/2662"},"seq":5}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":1496,"is_a":["text","documentation","reference","template_filter"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1496"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_template_filter_filter_date_range","page_url":{"en":"https:\/\/zotonic.com\/docs\/1496\/date_range","x-default":"https:\/\/zotonic.com\/docs\/1496\/date_range"},"preview_url":null,"resource":{"version":3993,"pivot_location_lat":null,"title":"date_range","is_authoritative":true,"body":"<p>Show a date range.<\/p>\n<p>Filter to simplify displaying datetime ranges. When displaying a datetime range, the display of the dates and times\noften depends if the date parts of the datetimes are equal or not.<\/p>\n<p>Take the following code:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{{ [fromdate, todate]|date_range:[format_ne, sep, format_eq] }}\n<\/code><\/pre>\n<p>If the <code>dates<\/code> of fromdate and todate are equal then the output will be as if the following were written:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{{ fromdate|date:format_ne }}{{ sep }}{{ todate|date:format_eq }}\n<\/code><\/pre>\n<p>However, if the dates are not equal then the output will be as if the following were written:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{{ fromdate|date:format_ne }}{{ sep }}{{ todate|date:format_ne }}\n<\/code><\/pre>\n<h2>Timezones<\/h2>\n<p>Dates in Zotonic are stored in UTC. If a date is displayed then it is converted to the timezone of the current request\ncontext. This timezone can be one of the following, in order of preference:<\/p>\n<ul><li>Preferred timezone set by the user<\/li><li>Timezone of the user-agent<\/li><li>Default timezone of the site<\/li><li>Default timezone of the Zotonic server<\/li><li>UTC<\/li><\/ul>\n<p>A specific timezone can be enforced by adding a third parameter to the date_range-filter. For example, to display a\ndate range in UTC:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-django\">{{ [fromdate, todate]|date_range:[format_ne, sep, format_eq]:&quot;UTC&quot; }}\n<\/code><\/pre>\n<p>Instead of the timezone, the following arguments are also accepted:<\/p>\n<ul><li><code>true<\/code> set the timezone to UTC<\/li><li><code>false<\/code> leave the timezone as is<\/li><li><code>undefined<\/code> leave the timezone as is<\/li><li>a resource id (integer), set the timezone according to the tz property of the resource<\/li><\/ul>","slug":"date_range","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"98ec6829bdf37aa837746826f0963701db1b6efb659af20b45f02d24ca3ef2b8","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":325,"is_a":["meta","category"],"name":"template_filter","title":"Filters","uri":"https:\/\/test.zotonic.com\/id\/325"},"doc_source_path":"apps\/zotonic_mod_base\/src\/filters\/filter_date_range.erl","publication_start":"2023-06-24T08:17:49Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_base\/src\/filters\/filter_date_range.erl","pivot_location_lng":null,"doc_source_kind":"filter","name":"doc_template_filter_filter_date_range","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:24Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_base","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"b8c4b2ccdc223257f311968fbd17b2d66f0c4156\n","erlang_module":"filter_date_range","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-09-30T09:39:48Z","title_slug":"date_range"},"uri":"https:\/\/zotonic.com\/id\/1496","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/1496"}},"status":"ok"}