Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template variables creating single-digit numbers for day and month #2045

Closed
1 of 7 tasks
tyler-dot-earth opened this issue Jan 5, 2022 · 3 comments
Closed
1 of 7 tasks
Assignees
Labels
scope.markdown Relating to markdown features (i.e. supporting new language syntax) status.info-needed More information is needed from filer for issue to be actionable type.bug Something isn't working

Comments

@tyler-dot-earth
Copy link
Contributor

Please select the area your bug applies to. (Multiple selections are Possible. You can leave blank if you're not sure.)

  • Workspace. VSCode workspace, vaults, Intellisense/autocomplete, Dendron settings
  • Lookup. Dendron's Lookup Command
  • Views. Dendron Preview, Tree View, Side Panels in the UI
  • Schema. Dendron Schemas
  • Pod. Data import from / export to Dendron
  • Publish. External Site Publish
  • Markdown. Markdown features, such as syntax support and features

Describe the bug

When using the example provided on the template variables docs, a date such as 2021.1.4 is produced rather than the documented 2021.01.04

To Reproduce

Steps to reproduce the behavior:

  1. Create a template
  2. Fill it with something like: {{ CURRENT_YEAR }}.{{ CURRENT_MONTH }}.{{ CURRENT_DAY }} (per the aforementioned example)
  3. Use the template
  4. Date is 2021.1.4

Expected behavior

I expect a two-digit day & month, (per the aforementioned example):

CURRENT_MONTH: The month as two digits (example '02')
CURRENT_DAY: The day of the month as two digits (example '08')

Screenshots

image

Desktop (please complete the following information)

  • OS: [e.g. iOS] ubuntu
  • Browser: n/a
  • Version: Dendron v0.76.0

Additional context

n/a

Dendron Log file

n/a

@github-actions github-actions bot added scope.markdown Relating to markdown features (i.e. supporting new language syntax) status.triage-needed type.bug Something isn't working labels Jan 5, 2022
@kevinslin
Copy link
Member

Thanks for the catch, we'll get on this right away!

tma66 added a commit that referenced this issue Jan 5, 2022
…iable substitution

Background: #2045

Testing:
Updated unit tests and tested manually using {{ CURRENT_DAY }}
tma66 added a commit that referenced this issue Jan 5, 2022
…iable substitution

Background: #2045

Testing:
Updated unit tests and tested manually using {{ CURRENT_DAY }}
tma66 added a commit that referenced this issue Jan 5, 2022
…iable substitution

Background: #2045

Testing:
Updated unit tests and tested manually using {{ CURRENT_DAY }}
kevinslin pushed a commit that referenced this issue Jan 5, 2022
…iable substitution (#2064)

* fix(schema): Ensure month/day/time has two digits when doing data variable substitution

Background: #2045

Testing:
Updated unit tests and tested manually using {{ CURRENT_DAY }}

* fix(schema): Ensure month/day/time has two digits when doing data variable substitution

Background: #2045

Testing:
Updated unit tests and tested manually using {{ CURRENT_DAY }}

* fix(schema): Ensure month/day/time has two digits when doing data variable substitution

Background: #2045

Testing:
Updated unit tests and tested manually using {{ CURRENT_DAY }}
@kevinslin
Copy link
Member

this has been fixed. heads up that the template variable syntax has changed -> https://wiki.dendron.so/notes/GelEQPZrSgr3CK9y10Nrg.html#template-variable-replacement

@kevinslin kevinslin added the status.info-needed More information is needed from filer for issue to be actionable label Feb 2, 2022
@no-response
Copy link

no-response bot commented Feb 5, 2022

This issue has been automatically closed because there has been no response to our request for more information from the original author. We don't have enough information to take action. Please reopen if the question from the maintainer has been answered and the issue is still valid.

@no-response no-response bot closed this as completed Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope.markdown Relating to markdown features (i.e. supporting new language syntax) status.info-needed More information is needed from filer for issue to be actionable type.bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants