file.day
Summary
1.My test note such as “dic_20140401” which file.name contains “yyyymmdd” has file.day.
2.Any daily note such as “2014-04-01” which file.name contains “yyyy-mm-dd” has file.day.
3.Your weekly note such as “2021-W22” has not file.day. As a result, it is OK that the dateformat(file.day, “yyyy-MM”) returned null output.
4.The code dateformat(file.day, "yyyy-MM") is copied and modified from the following:
Solutions
Reference
Summary
If the file has a date inside its title (of form yyyy-mm-dd or yyyymmdd), or has a Date field/inline field, it also has the following attributes:
file.day: An explicit date associated with the file.