Commit c524a84c authored by Volker Krause's avatar Volker Krause
Browse files

Extend the BahnCard extractor to also provide the validity interval

parent e72a9ee7
......@@ -276,5 +276,7 @@ function parseBahncard(code, node) {
bc.membershipNumber = code.ticketLayout.text(14, 11, 16, 1);
bc.member = JsonLd.toJson(code.person);
bc.token = 'aztecbin:' + ByteArray.toBase64(code.rawData);
bc.validFrom = JsonLd.readQDateTime(code, 'validFrom');
bc.validUntil = JsonLd.readQDateTime(code, 'validUntil');
return bc.programName != undefined ? bc : undefined;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment