obsidian-alfred
obsidian-alfred copied to clipboard
Support multiple date format placeholders for daily notes
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!
Thanks! Good to know! Will patch it when I have time.
+1. My format is YYYY/MMMM/M-D-YY (ddd) which results in the note today being named m-11-yy (Sat)
My daily format:
YYYY/MM/YYYY-MM-DD-dddd
I was able to fix this by correcting od script as bellow:
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.