• 1.2.0 3df01c6ede

    1.2.0 Stable

    olivier released this 2026-09-07 18:11:21 +02:00 | 0 commits to master since this release

    Syntax changes

    • countdown is now always relative to now and no longer accepts a from field — it computed the exact same math as diff with a custom from, just different message framing. For a comparison between two fixed dates, use diff.
    • Relative dates: parseMoment now understands today, now, tomorrow, yesterday, and offsets like +7d / -3mo / +2w (always relative to now). Fixes diff's biggest weakness — it previously required hardcoded dates that go stale immediately.
    • Frontmatter fallback is now symmetric across all four types (previously birthday-only): countdown reads to/deadline, diff reads from/start and to/end, since reads since/created.
    • label is verbatim everywhere — birthday's convention (include your own punctuation, e.g. label: "New Year:") now applies to countdown too, instead of countdown silently auto-appending ": ".
    • New type aliases: age (birthday), remaining (countdown), elapsed (since), alongside the existing bday/until/difference.
    • Unresolvable inline type now shows an explicit error (Missing or unrecognized "type") instead of silently rendering nothing — this previously affected bare date=X/from=X and typo'd fields.
    • Removed the "YAML-like" comma-separated inline format from the docs — it wasn't valid non-flow YAML and silently produced nothing. Only key=value and {flow-mapping} are supported/documented.

    Settings

    • Settings tab rewritten as a compact syntax reference: all four types with their aliases, fields, and one-line descriptions, plus relative dates, frontmatter fallback, and inline/fenced examples.
    • Doc link now points to this repo's README on Gitea (was a stale/nonexistent GitHub URL).

    Docs

    • README fully updated to match: field references, per-type frontmatter docs, relative-dates section, and the expanded alias list.

    Note: this is a behavioral break for any note using countdown with a from field, or relying on countdown's old auto-colon label — both now work differently (see README).

    Verified against the real bundled logic and live in Obsidian (Live Preview and Reading View) via CDP automation.

    Downloads
  • 1.1.0 526f54a640

    1.1.0 Stable

    olivier released this 2026-09-07 17:46:32 +02:00 | 3 commits to master since this release

    Fixes

    • Crash fix: Live Preview could throw and break the editor whenever a fenced date-calc block appeared before inline date-calc: code in the same note (CodeMirror's RangeSetBuilder requires ranges added in ascending order; the two decoration passes weren't merged/sorted). Decorations are now collected and sorted before being added.
    • verbose=false bug: inline date-calc: ... verbose=false was silently truthy (a non-empty string), so it never actually disabled verbose output. Now coerced to a real boolean.
    • Dead code fix: diff could never be auto-inferred from from/to alone (an earlier countdown check always matched first). Reordered so from+to or start+end correctly infer diff.
    • Declared @codemirror/state and @codemirror/view as explicit devDependencies (previously only pulled in transitively via @codemirror/language).

    New

    • Reading View support for inline code: `date-calc: ...` spans now render in Reading View, not just Live Preview (via a markdown post-processor, same approach as Dataview's inline queries).
    • Birthday label support: previously documented but not implemented. label:/label= now works, falling back to a frontmatter name property ("Jane's age:"), then the default "Age:".

    Internal

    • Split the 777-line main.ts into focused src/ modules (types, config parsing, calculations, widgets, Live Preview extension, settings tab) per repo conventions.
    • Fixed command-palette entries showing a duplicated plugin-name prefix.
    • Moved settings-tab inline JS styles into styles.css.

    Verified with unit tests against the real bundled logic, a reproduction of the RangeSetBuilder crash against the real @codemirror/state package, and live end-to-end testing in Obsidian.

    Downloads
  • v1.0.0 978181b27d

    v1.0.0 Stable

    olivier released this 2026-05-25 03:13:47 +02:00 | 4 commits to master since this release

    Calculate ages, countdowns, and date differences dynamically in your notes using inline code or fenced blocks.

    Downloads