Repository navigation
fix: name daily notes with Do and [literal] formats like Obsidian - #153
Open
jayhemnani9910 wants to merge 1 commit into
Open
jayhemnani9910 wants to merge 1 commit into
jayhemnani9910 wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
dailynow formats the note name and{{date:FORMAT}}template variables with a newobsidian.FormatMomentDate. It reads the Moment format left to right:Dobecomes the day with an English ordinal (3rd,12th,21st).[text]is copied as is, without the brackets.MomentToGoFormat, which is unchanged.Motivation and Context
With the daily notes format
dddd, MMMM Do YYYY, Obsidian names today's noteThursday, December 3rd 2026.md, butdailycreatesThursday, December 3o 2026.md.Dois not a known token, soDbecomes the day and theois left over. Text in brackets is not treated as literal, so[Journal]comes out as[Journpml]andYYYY-MM-DD [at] HH:mmin a template gives2026-12-03 [pmt] 12:58.dailytherefore never finds the note Obsidian made for today, anddaily -cappends to a second, misnamed note.Checklist:
Tests:
TestFormatMomentDate(ordinals including 12th/21st, a bracketed literal) and adailytest with[Journal] MMMM Do YYYY. Thedailytest fails on main ([Journpml] December 3o 2026.md) and passes with this change.go test ./...andgo vetpass.