<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.dura-lex.org/index.php?action=history&amp;feed=atom&amp;title=Corpus%2FTemporal</id>
	<title>Corpus/Temporal - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dura-lex.org/index.php?action=history&amp;feed=atom&amp;title=Corpus%2FTemporal"/>
	<link rel="alternate" type="text/html" href="https://wiki.dura-lex.org/index.php?title=Corpus/Temporal&amp;action=history"/>
	<updated>2026-04-23T05:46:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.dura-lex.org/index.php?title=Corpus/Temporal&amp;diff=50&amp;oldid=prev</id>
		<title>Nicolas: Import from duralex/spec/TEMPORAL.md — faithful conversion to wikitext (via create-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://wiki.dura-lex.org/index.php?title=Corpus/Temporal&amp;diff=50&amp;oldid=prev"/>
		<updated>2026-04-23T02:10:58Z</updated>

		<summary type="html">&lt;p&gt;Import from duralex/spec/TEMPORAL.md — faithful conversion to wikitext (via create-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Temporal Model =&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
&lt;br /&gt;
Legal documents exist in time. Articles are versioned (valid_from/valid_until). Decisions are point-in-time events. The schema handles both with the same promoted columns.&lt;br /&gt;
&lt;br /&gt;
== date and date_end semantics by kind ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! kind !! date = !! date_end =&lt;br /&gt;
|-&lt;br /&gt;
| legislation (statute, versioned article) || valid_from (entry into force) || valid_until (repeal, amendment)&lt;br /&gt;
|-&lt;br /&gt;
| legislation (decree, regulation) || publication_date or entry_into_force || expiration (if any)&lt;br /&gt;
|-&lt;br /&gt;
| legislation (collective agreement) || filing_date or effective_date || expiration_date&lt;br /&gt;
|-&lt;br /&gt;
| legislation (guidance, circular) || publication_date || NULL (until superseded)&lt;br /&gt;
|-&lt;br /&gt;
| legislation (bill, debate) || publication_date || NULL&lt;br /&gt;
|-&lt;br /&gt;
| decision || decision_date || NULL&lt;br /&gt;
|-&lt;br /&gt;
| record (company) || creation_date || closure_date&lt;br /&gt;
|-&lt;br /&gt;
| record (person) || NULL || NULL&lt;br /&gt;
|-&lt;br /&gt;
| notice || publication_date || NULL&lt;br /&gt;
|-&lt;br /&gt;
| section || NULL || NULL&lt;br /&gt;
|-&lt;br /&gt;
| chunk || (inherited from parent) || NULL&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Article versioning ==&lt;br /&gt;
&lt;br /&gt;
Multiple versions of the same article = multiple documents with the same &amp;lt;code&amp;gt;tags.cid&amp;lt;/code&amp;gt; (permanent article identity) and different date/date_end ranges.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
-- Get the version of article 1147 CC in force on 2015-06-15&lt;br /&gt;
SELECT * FROM corpus.documents&lt;br /&gt;
WHERE tags-&amp;gt;&amp;gt;&amp;#039;cid&amp;#039; = &amp;#039;LEGISCTA000006136353&amp;#039;&lt;br /&gt;
  AND date &amp;lt;= &amp;#039;2015-06-15&amp;#039;&lt;br /&gt;
  AND (date_end IS NULL OR date_end &amp;gt; &amp;#039;2015-06-15&amp;#039;)&lt;br /&gt;
ORDER BY date DESC LIMIT 1;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;tags.cid&amp;lt;/code&amp;gt; is the permanent identity (CID from LEGI XML, or equivalent). It survives renumbering. Article 1382 and article 1240 have different &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; values but the relationship is captured in &amp;lt;code&amp;gt;corpus.edges kind=replaces&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== at_date in TagQuery ==&lt;br /&gt;
&lt;br /&gt;
The reference resolver supports temporal queries via at_date:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
TagQuery(&lt;br /&gt;
    language=&amp;quot;fr&amp;quot;,&lt;br /&gt;
    kind=&amp;quot;legislation&amp;quot;,&lt;br /&gt;
    tag_filters=TagFilterSet.from_tags({&amp;quot;article_number&amp;quot;: &amp;quot;1147&amp;quot;, &amp;quot;code&amp;quot;: &amp;quot;Code civil&amp;quot;}),&lt;br /&gt;
    at_date=date(2015, 6, 15),&lt;br /&gt;
)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Translated to SQL:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;sql&amp;quot;&amp;gt;&lt;br /&gt;
WHERE language = &amp;#039;fr&amp;#039;&lt;br /&gt;
  AND kind = &amp;#039;legislation&amp;#039;&lt;br /&gt;
  AND tags @&amp;gt; &amp;#039;{&amp;quot;article_number&amp;quot;: &amp;quot;1147&amp;quot;, &amp;quot;code&amp;quot;: &amp;quot;Code civil&amp;quot;}&amp;#039;&lt;br /&gt;
  AND date &amp;lt;= &amp;#039;2015-06-15&amp;#039;&lt;br /&gt;
  AND (date_end IS NULL OR date_end &amp;gt; &amp;#039;2015-06-15&amp;#039;)&lt;br /&gt;
ORDER BY date DESC LIMIT 1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Non-Gregorian calendars ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt; column always stores ISO/Gregorian dates. The original calendar representation is preserved in tags:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Calendar !! Tag !! Example !! Used by&lt;br /&gt;
|-&lt;br /&gt;
| Islamic (Hijri) || tags.date_hijri || &amp;quot;1445-08-15&amp;quot; || SA, AE, other ME&lt;br /&gt;
|-&lt;br /&gt;
| Japanese imperial era || tags.date_era_jp || &amp;quot;R06&amp;quot; (Reiwa 6 = 2024) || JP&lt;br /&gt;
|-&lt;br /&gt;
| Taiwan ROC (Minguo) || tags.date_roc_tw || &amp;quot;112&amp;quot; (= 2023) || TW&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Conversion is done at ingestion time. The trigger and all queries use the ISO date column.&lt;br /&gt;
&lt;br /&gt;
== Enforcement status ==&lt;br /&gt;
&lt;br /&gt;
For versioned text documents, &amp;lt;code&amp;gt;tags.enforcement_status&amp;lt;/code&amp;gt; tracks the legal force:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| in_force || Currently applicable&lt;br /&gt;
|-&lt;br /&gt;
| deferred_enforcement || Not yet in force, will be on a future date&lt;br /&gt;
|-&lt;br /&gt;
| deferred_repeal || Currently in force, repeal scheduled for a future date&lt;br /&gt;
|-&lt;br /&gt;
| repealed || Explicitly repealed by a subsequent act&lt;br /&gt;
|-&lt;br /&gt;
| superseded || Historical version — a newer version of the same article exists&lt;br /&gt;
|-&lt;br /&gt;
| never_in_force || Modified before its effective date, never applied&lt;br /&gt;
|-&lt;br /&gt;
| expired || Lapsed by its own terms (sunset clause, fixed-duration text)&lt;br /&gt;
|-&lt;br /&gt;
| annulled || Struck down by a court (e.g. constitutional review) — typically retroactive&lt;br /&gt;
|-&lt;br /&gt;
| transferred || Content moved to a different article or location (renumbering)&lt;br /&gt;
|-&lt;br /&gt;
| denounced || Collective agreement repudiated by one of the parties&lt;br /&gt;
|-&lt;br /&gt;
| disjoined || Version split into multiple separate articles&lt;br /&gt;
|-&lt;br /&gt;
| conditional || In force only under a specific interpretation (constitutional reservation)&lt;br /&gt;
|-&lt;br /&gt;
| pending || Emergency decree or provisional measure awaiting ratification&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The boolean shortcut &amp;lt;code&amp;gt;tags.in_force&amp;lt;/code&amp;gt; (true/false) enables simple filtering. Unlike &amp;lt;code&amp;gt;enforcement_status&amp;lt;/code&amp;gt;, which is set once at ingest from the source data, &amp;lt;code&amp;gt;in_force&amp;lt;/code&amp;gt; is dynamically recomputed by the &amp;lt;code&amp;gt;refresh_in_force&amp;lt;/code&amp;gt; post-ingest job from the article&amp;#039;s &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;date_end&amp;lt;/code&amp;gt; columns. The two tags can therefore diverge over time:&lt;br /&gt;
&lt;br /&gt;
* An article tagged &amp;lt;code&amp;gt;deferred_enforcement&amp;lt;/code&amp;gt; becomes &amp;lt;code&amp;gt;in_force=true&amp;lt;/code&amp;gt; once its effective &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt; is in the past (the tag is not rewritten — only the boolean).&lt;br /&gt;
* An article tagged &amp;lt;code&amp;gt;deferred_repeal&amp;lt;/code&amp;gt; becomes &amp;lt;code&amp;gt;in_force=false&amp;lt;/code&amp;gt; once its &amp;lt;code&amp;gt;date_end&amp;lt;/code&amp;gt; is in the past.&lt;br /&gt;
* An article tagged &amp;lt;code&amp;gt;in_force&amp;lt;/code&amp;gt; becomes &amp;lt;code&amp;gt;in_force=false&amp;lt;/code&amp;gt; if its &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt; is in the future (rare — late-published versions).&lt;br /&gt;
* All other &amp;quot;not in force&amp;quot; states (&amp;lt;code&amp;gt;repealed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;superseded&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;expired&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;annulled&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;transferred&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;denounced&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;never_in_force&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;disjoined&amp;lt;/code&amp;gt;) are always &amp;lt;code&amp;gt;in_force=false&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
In short: &amp;lt;code&amp;gt;enforcement_status&amp;lt;/code&amp;gt; answers &amp;quot;what is the legal lifecycle state of this version?&amp;quot;, while &amp;lt;code&amp;gt;in_force&amp;lt;/code&amp;gt; answers &amp;quot;is this version currently legally applicable?&amp;quot;. Use &amp;lt;code&amp;gt;in_force&amp;lt;/code&amp;gt; for filter queries, &amp;lt;code&amp;gt;enforcement_status&amp;lt;/code&amp;gt; for display and warnings.&lt;br /&gt;
&lt;br /&gt;
== Transitional provisions ==&lt;br /&gt;
&lt;br /&gt;
When a reform includes transitional rules (e.g., the 2016 French contract law reform: contracts signed before Oct 1, 2016 governed by old law), these are modeled as:&lt;br /&gt;
* A separate document (the transitional provision article)&lt;br /&gt;
* With edges to both the old and new versions&lt;br /&gt;
* The knowledge graph (future) encodes transitional provisions as QUALIFY nodes that route to the correct version based on temporal context&lt;br /&gt;
&lt;br /&gt;
[[Category:Corpus]]&lt;/div&gt;</summary>
		<author><name>Nicolas</name></author>
	</entry>
</feed>