Skip to content

Replace termijn implementation with a new type #285

@CharString

Description

@CharString

This is a nasty, quick hack, and should get a proper type.

Either the simple NewType treatment that we give some URLs.

Or, if we need to do pass judgements, a ZGWDuration (ZGWTermijn?) type that can do proper date/date time arithmetic according to the ZGW interpretation of ISO 86011, such that these expressions

d: datetime.date
dt: datetime.datetime
p: ZGWDuration

d + p
dt + p

reduce to the well specified reasonable2 values.

Originally posted by @CharString in #284 (comment)

Footnotes

  1. ISO 8601 is open to interpretation. e.g. what's the length of P1Y or P1M? So in principal datetime.timedelta is not a good representation (unless it follows from the interpretation, of course)

  2. Ultimately these timespans will be used by automated systems to judge whether something is "on time" or "due" according to the law. IMHO, the interpretation should be such that it won't flag any "false positives" that may result in fines etc which will get appealed. No Common Ground software should needlessly burden civil service and courts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions