Conservative pure-MoonBit EDTF subset parser that preserves uncertainty and rejects guesswork.
import {
"yyqdbngt/moon_edtf" @edtf,
}///|
fn main {
let value = try! @edtf.parse("1984?")
println(value.to_string())
let rows = @edtf.diagnose_batch(["1984?", "1984-13"])
println(rows[0].normalized)
}pub(all) struct CatalogFinding {
record_id : String
input : String
normalized : String
decision : CatalogDecision
error_code : String
error_offset : Int
envelope : DateEnvelope?
} derive(Eq, Debug)pub(all) struct CatalogReport {
findings : Array[CatalogFinding]
invalid : Int
needs_review : Int
outside : Int
within : Int
possible_overlap : Int
} derive(Eq, Debug)fn audit_catalog(entries : Array[CatalogEntry], query_start : String, query_end : String) -> CatalogReport raise EdtfErrorfn window_relation(value : EdtfValue, query_start : String, query_end : String) -> WindowRelation raise EdtfErrorInstall
Download zipConservative pure-MoonBit EDTF subset parser that preserves uncertainty and rejects guesswork.