Test /
MarkupExpressions
Try embedded Markup Expressions
Try embedded Markup Expressions
(:CurrentYear:(ftime fmt=%Y when=tomorrow):) Date {{$:CurrentYear}}-02-14 is a {(ftime fmt="%A" when='{$:CurrentYear}-02-14')} Date {{$:CurrentYear}}-02-18 is a {(ftime fmt="%A" when="{$:CurrentYear}-02-18")} Date {{$:CurrentYear}}-02-18 is a {(ftime fmt="%A" when={$:CurrentYear}-02-18)} |
Date 2025-02-14 is a Wednesday Date 2025-02-18 is a Wednesday Date 2025-02-18 is a Tuesday |
(:NextYear:(ftime fmt="%Y" when="next year"):) Date {{$:NextYear}}-02-14 is a {(ftime fmt="%A" when='{$:NextYear}-02-14')} Date {{$:NextYear}}-02-18 is a {(ftime fmt="%A" when="{$:NextYear}-02-18")} Date {{$:NextYear}}-02-18 is a {(ftime fmt="%A" when={$:NextYear}-02-18)} |
Date 2026-02-14 is a Wednesday Date 2026-02-18 is a Wednesday Date 2026-02-18 is a Wednesday |
What I learned:
- Don't include braces in PTV definition.
- Add braces to stand-alone references.
- Don't put quotation marks around embedded embedded PTV reference so it can "execute".
The problem with substr:
:First try didn't work: "{(substr {$:Last} 0 1)}" :Add quotes to fix: "{(substr "{$:Last}" 0 1)}" (:Last:the end:) |
|