Correct timestamp.format help text to reference date-fns, not dayjs - #527
Merged
Conversation
The format string is passed to date-fns, which escapes literals with single quotes rather than dayjs's square brackets. The example was also unescaped, so 'at' rendered as AM plus a unix timestamp.
Greptile SummaryCorrects the
Confidence Score: 5/5The PR appears safe to merge. The changes are limited to correcting user-facing help text and introduce no runtime behavior changes or actionable defects.
|
| Filename | Overview |
|---|---|
| plugins/template-function-timestamp/src/index.ts | Updates timestamp formatting documentation and its example to match the existing date-fns implementation. |
Reviews (1): Last reviewed commit: "Correct timestamp.format help text to re..." | Re-trigger Greptile
|
Thanks for fixing @gschier 👍 Would it be possible to mention how to escape the escaping symbol, or link to the |
Member
Author
|
Ah yes @thePanz, I'll add the docs link. date-fns escapes with single quotes like
|
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.

timestamp.formatpasses the format string to date-fns, but the description advertised dayjs. The two disagree on escaping ('MM'vs[MM]) and on tokens —yyyy-MM-dd HH:mm:ssrenders asyyyy-08-Weunder dayjs, so switching libraries was not an option.The example was also unescaped:
yyyy-MM-dd at HH:mm:ssrenders as2026-08-12 AM1786548645 08:30:45, sinceaandtare live tokens.Reported in https://yaak.app/feedback/posts/timestamp-formatting-not-escaping