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

Support multiple date format placeholders for daily notes #46

Open
PaoloCentomani opened this issue Jan 21, 2022 · 3 comments
Open

Support multiple date format placeholders for daily notes #46

PaoloCentomani opened this issue Jan 21, 2022 · 3 comments

Comments

@PaoloCentomani
Copy link

PaoloCentomani commented Jan 21, 2022

I have set up my daily notes as Dailies/YYYY/YYYY-mm-dd. This will not work with the current od script.

It can be fixed by replacing:

date_format = date_format.replace(y_char, yyyy);

with:

date_format = date_format.replaceAll(y_char, yyyy);

TY!

@hauselin
Copy link
Owner

Thanks! Good to know! Will patch it when I have time.

@phalladar
Copy link

+1. My format is YYYY/MMMM/M-D-YY (ddd) which results in the note today being named m-11-yy (Sat)

@minhnhut
Copy link

minhnhut commented Aug 17, 2023

My daily format:
YYYY/MM/YYYY-MM-DD-dddd

I was able to fix this by correcting od script as bellow:
CleanShot 2023-08-17 at 15 39 47@2x

Line 221 ~ 224

date_format = date_format.replaceAll(y_char, yyyy);
date_format = date_format.replaceAll(m_char, mm);
date_format = date_format.replaceAll(d_char, dd);
date_format = date_format.replaceAll(w_char, ww);

Full script attached.
od_fixed.zip

I don't know how to edit the alfreadworkflow file. So could not make a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants