Directive
Description
An EU directive (CELEX sector 3, letter L; ELI segment dir) — acts addressed to the member states. Directives print <year>/<number> in both eras (2010/75, 2016/680). The long form may bracket the family and suffix it (Directive (EU) 2016/680/EU); the two captures are separate and must agree — two different families raise.
Syntax
EU identifiers follow the canonical form 'EU <Type> <a>/<b>' (Regulation, Directive, Decision). The Official Journal long form (Regulation (EU) No 1227/2011, Directive 2010/75/EU), the CELEX number (32011R1227 — sector 3, year, type letter R/L/D, number padded to 4; CELEX 32011R1227 and CELEX:32011R1227 both parse) and the ELI URL (http://data.europa.eu/eli/reg/2011/1227/oj) all parse and render canonical; Pubid.parse routes the canonical EU prefix only — call Pubid::Eu.parse for the other forms. #to_celex and #to_eli give the two official identifiers back; the EU has no URN namespace in the IANA registry, so to_urn (urn:eu:reg:2011:1227) is pubid-invented and the round-trip machine form is the pubid-scheme URN. The two-number order is spelling, not identity: before 2015 a regulation printed <number>/<year> while other acts used both orders, and 'No' always marks <number>/<year>. The builder stores number_first only when the input order differs from that rule, and equality ignores it — EU Decision 1082/2013 equals CELEX 32013D1082. When a plain print would read as another act, the renderer prints 'No <number>/<year>' (32014R2015 → EU Regulation No 2015/2014), so every print parses back to its own act. Years run 1952–2099; two-digit years (Directive 95/46/EC), joint families ((EU, Euratom)), two conflicting families (…1227/2011/EC), a pair with no plausible year (12/34) and number 0 are rejected; the author words of the Official Journal title (Commission Implementing Regulation …) are not parsed.
Examples 6
Components Used
EU Directive identifiers are composed of these elements:
Publisher
EnumerationThe issuing organization — kept in the PUBLISHER constant, not an attribute; the canonical face prints the EU prefix
EUAct Type
EnumerationThe legal act type — regulation, directive or decision; the leaf class of the identifier
RegulationNumber
StringThe act number, with CELEX zero padding stripped
1227Year
YearThe year of the act — identity, not an edition: 1227/2011 and 1227/2012 are two acts
2011Legal Family
EnumerationThe bracketed legal family of the Official Journal form
EUNumber Order
EnumerationThe print order flag, set only when the input order differs from the default rule (pre-2015 regulations print <number>/<year>, everything else <year>/<number>)
trueAlgebraic Relations
Relations that can involve Directive identifiers:
| Relation | Description | Syntax | Example |
|---|---|---|---|
| Official Journal long form | The printed form of the Journal parses and renders canonical; it sets the family, which identity treats as a wildcard | <Type> ([<family>]) [No] <number>/<year>[/<family>] | Regulation (EU) No 1227/2011 |
| CELEX number | The CELEX number of the same act — sector 3, year, type letter, number padded to 4; #to_celex gives it back from any form | [CELEX[:| ]]<3><year><R|L|D><number padded to 4> | 32011R1227 |
| ELI | The ELI of the act as published in the Official Journal — the EU's official identifier; #to_eli gives it back from any form | http(s)://data.europa.eu/eli/{reg|dir|dec}/<year>/<number>[/oj] | http://data.europa.eu/eli/reg/2011/1227/oj |
| Number order | The two numbers may print in either order; the order is spelling, not identity — equality ignores number_first, so both faces name one act | EU Decision <number>/<year> ≡ <3><year>D<number> | EU Decision 1082/2013 ≡ 32013D1082 |
| pubid-scheme URN | The always-round-trip machine form; the act type is an atom-level token so a regulation and a decision with one number do not collide | urn:pubid:eu:{reg|dir|dec}:<year>:<number>[:family-<f>][:f:0.numberfirst-<bool>] | urn:pubid:eu:dec:2013:1082:f:0.numberfirst-true |
URN Mapping
urn:pubid:eu:{reg|dir|dec}:{year}:{number}[:family-{EU|EC|EEC|Euratom|CFSP}][:f:0.numberfirst-{true|false}] (the to_urn convenience shape is urn:eu:{reg|dir|dec}:{year}:{number}; the ELI — http://data.europa.eu/eli/… via #to_eli — is the EU's official identifier, so the lossless pubid scheme is the pattern of record here)