Add remaining type aliases, rewrite settings tab as syntax TL;DR
- Add age (birthday), remaining (countdown), elapsed (since) aliases, alongside the existing bday/until/difference. - README: document new aliases in each type's header and the Type Aliases section. - Settings tab rewritten: drop the stale GitHub doc link and hardcoded pre-redesign examples (countdown+from, auto-colon labels). Replace with a compact syntax TL;DR \u2014 all four types with their aliases, fields, and one-line descriptions, plus relative dates, frontmatter fallback, and inline/fenced examples \u2014 and link to the README on Gitea (was pointing at a stale GitHub URL). Verified: aliases tested against the real shipped config parser; the settings tab's actual display() (found via app.setting.pluginTabs) was invoked live in Obsidian and rendered exactly the intended content with no errors.
This commit is contained in:
@@ -21,7 +21,7 @@ Use inline code for quick calculations: `date-calc: birthday=1992-08-16`
|
||||
|
||||
## Supported Calculation Types
|
||||
|
||||
### Birthday (`birthday`)
|
||||
### Birthday (`birthday`, `bday`, `age`)
|
||||
|
||||
Calculates age and time until next birthday.
|
||||
|
||||
@@ -45,7 +45,7 @@ birthday: 2000-05-21
|
||||
label: "John's age:"
|
||||
```
|
||||
|
||||
### Countdown (`countdown` or `until`)
|
||||
### Countdown (`countdown`, `until`, `remaining`)
|
||||
|
||||
Time remaining until a target date, **always measured from now**. For a comparison between two fixed dates, use `diff` instead.
|
||||
|
||||
@@ -64,7 +64,7 @@ label: "New Year:"
|
||||
to: 2025-12-31 23:59
|
||||
```
|
||||
|
||||
### Since (`since`)
|
||||
### Since (`since`, `elapsed`)
|
||||
|
||||
Time elapsed since an event (or time until, if the event is in the future) — always measured against now.
|
||||
|
||||
@@ -81,7 +81,7 @@ type: since
|
||||
since: 2024-12-20
|
||||
```
|
||||
|
||||
### Difference (`diff`)
|
||||
### Difference (`diff`, `difference`)
|
||||
|
||||
The time difference between two fixed dates — neither has to be "now". For a countdown relative to the present moment, use `countdown` instead.
|
||||
|
||||
@@ -187,8 +187,9 @@ Settings → "Hide result while cursor inside" prevents rendered output from sho
|
||||
|
||||
For convenience, use these shortcuts:
|
||||
|
||||
- `birthday` = `bday`
|
||||
- `countdown` = `until`
|
||||
- `birthday` = `bday` = `age`
|
||||
- `countdown` = `until` = `remaining`
|
||||
- `since` = `elapsed`
|
||||
- `diff` = `difference`
|
||||
|
||||
## Custom Styling
|
||||
|
||||
Reference in New Issue
Block a user