Expand description
Deterministic ID generators for German energy market identifiers.
Each generator takes a seed: u64 and produces a valid identifier of the
appropriate format. Same seed always produces the same output.
Functions§
- compute_
ymd - Compute (year, month, day) from 2024-01-01 + day_offset days.
- days_
per_ month - Days per month for the given year (January = index 0).
- generate_
date_ edifact102 - Generate a date in CCYYMMDD format (EDIFACT 102).
- generate_
date_ edifact303 - Generate a date in CCYYMMDDHHMMSS+00 format (EDIFACT 303).
- generate_
date_ ymd - Generate a date in YYYY-MM-DD format (HTML5 date input format).
- generate_
datum - Generate an interchange datum in YYMMDD format (used in UNB segment).
- generate_
gln - Generate a Global Location Number (GLN): 13 digits with valid GS1 check digit.
- generate_
malo_ id - Generate a Marktlokation ID: 11 digits, the last one the BDEW check digit.
- generate_
melo_ id - Generate a Messlokation ID: “DE” + 31 digits = 33 chars total.
- generate_
nelo_ id - Generate a Netzlokation ID: “E” + 10 digits = 11 chars.
- generate_
reference_ id - Generate an alphanumeric business reference ID safe for EDIFACT.
- generate_
steuress_ id - Generate a Steuerbare Ressource ID: “C” + 10 digits = 11 chars.
- generate_
techress_ id - Generate a Technische Ressource ID: “D” + 10 digits = 11 chars.
- generate_
zeit - Generate an interchange time in HHMM format (used in UNB segment).
- is_
leap_ year - Return true if
yearis a leap year. - malo_
check_ digit - Check digit of a Marktlokations-ID over its first ten digits (BDEW): the digits at odd positions (1-based, from the left) plus twice those at even positions, and the check digit completes that sum to a multiple of ten. Unlike the Luhn algorithm, doubled digits are not reduced to one digit.