Goluca: add period anchor suffixes (^ and $) to datetime #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Proposal
Add two optional suffixes to
datetimethat indicate whether the value represents the start or end of the period implied by the date:^— start of period (e.g.2024-01-15^= start of Jan 15th, i.e.00:00:00)$— end of period (e.g.2024-01-31$= end of Jan 31st, i.e.23:59:59.999...)Motivation
A date like
2024-01-15is ambiguous: it could mean a point in time, or it could represent the whole day as a period. This matters for:2024-01-31$ data monthly:close balance— the closing balance is at the end of the day2024-01-01^ data quarterly:report start— report starts at beginning of the day2024-12-31$T23:59:59 * Year-end close— explicitly end-of-periodMost systems handle this by convention or context. Making it explicit in the syntax removes ambiguity.
Syntax
Borrowed from regex anchor semantics (
^= start,$= end), which are universally understood by developers. This appears to be novel — no other PTA format or date standard uses single-character period anchors on dates.ABNF change
Examples
Implementation
Already implemented in tree-sitter-goluca on branch
task/WTfixwith passing tests.Documentation to update
docs/goluca.md— proposed ABNF, datetime section, characteristics tabledocs/goluca-datetime.md— period anchor semantics and examplesMigrated from Codeberg: originally #1, opened 2026-03-15.