Date format preview for Daily Notes changed "Journal" to "Journpm11"

Steps to reproduce

  • Open the “Daily Notes” settings
  • Set Journal/YYYY/MM/YYYY-MM-DD as the “Date format”
  • Notice how the preview via “syntax looks like this:” changed “Journal” to “Journpm11”

Did you follow the troubleshooting guide? [Y/N] Y

Expected result

The preview to say “Journal” as part of the path

Actual result

Says “Journpm11” (is NPM 11 being used under the hood?).

Environment

SYSTEM INFO:
Obsidian version: v1.4.16
Installer version: v1.4.16
Operating system: Windows 10 Enterprise 10.0.22621
Login status: logged in
Catalyst license: insider
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: off
Plugins installed: 1
Plugins enabled: 1
1: Paste URL into selection v1.7.0

RECOMMENDATIONS:
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.


Additional information

This is not a bug, but documented behaviour. The string you enter is interpreted as a moment.js format string, and a and l happen to be the placeholders for “am/pm” and “localized month numeral, day of month, year”, respectively (see the documentation). In order to “mask” your input from being interpreted as placeholders, you have to enclose it in square brackets, like so: [Journal]/YYYY/MM/YYYY-MM-DD

Hope that helps :slight_smile:

Edit: You can also open the documentation via the link right next to where you enter the format. The link can even be seen in your screenshot

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.