You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm in the process of modifying a js script that generates a weekly chart via customjs. I have everything working except that the dates are too dynamic.
When I get the start of week I have been using dv.date("sow") then grab the next 6 days by incrementing dayNum. However, dv.date("sow") only gives me the current week, meaning all of my charts are exactly the same. I can get a start date for the week, but then startOfWeek.plus({ days: dayNum }) This line fails because the .plus() requires whatever data format dv.date("sow") is.
Does anyone have an idea as to how I can get the start date of the week using the file name? all my daily notes are in the format "YYYY-MM-DD".
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm in the process of modifying a js script that generates a weekly chart via customjs. I have everything working except that the dates are too dynamic.
When I get the start of week I have been using dv.date("sow") then grab the next 6 days by incrementing dayNum. However, dv.date("sow") only gives me the current week, meaning all of my charts are exactly the same. I can get a start date for the week, but then
startOfWeek.plus({ days: dayNum })
This line fails because the .plus() requires whatever data format dv.date("sow") is.Does anyone have an idea as to how I can get the start date of the week using the file name? all my daily notes are in the format "YYYY-MM-DD".
Here is the chunk that is causing issues
Thank you for any help
https://github.com/mulfok/periodic-note-templates
-- Template sourcehttps://github.com/oliviercarizzoni
Script AuthorFull script
Beta Was this translation helpful? Give feedback.
All reactions