1
0

Update Query.md (#280)

Add in a description of hardcoded variables you can use in queries, seems pretty relevant for bullet journal style scripting of tasks. 

Since this is copied from core/templates, and likely to change(?) maybe it would be best to use an #include directive and break out into a separate file?
This commit is contained in:
Tristan Sokol 2023-01-04 12:54:24 -06:00 committed by GitHub
parent 2e57a40136
commit 09d7e79811
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,6 +51,18 @@ The best part about data sources: there is auto-completion. 🎉
Start writing `<!— #query` or simply use `/query` slash command, it will show you all available data sources. 🤯
Additionally there are some special variables you can use in your queries that are interpereted through simple string replacement:
- `{{today}}`: Todays date in the usual YYYY-MM-DD format
- `{{tomorrow}}`: Tomorrows date in the usual YYY-MM-DD format
- `{{yesterday}}`: Yesterdays date in the usual YYY-MM-DD format
- `{{lastWeek}}`: Current date - 7 days
- `{{nextWeek}}`: Current date + 7 days
- `{{page}}`: The name of the current page
For example, if you wanted a query for all the tasks from a previous day's daily note, you could use the following query:
`<!-- #query task where page = "📅 {{yesterday}}" -->`
#### 4.1. Available data sources
- `page`: list of all pages