fix: include weekday in message timestamps so agent knows the correct…#1098
Open
thomaslok0516 wants to merge 1 commit into
Open
fix: include weekday in message timestamps so agent knows the correct…#1098thomaslok0516 wants to merge 1 commit into
thomaslok0516 wants to merge 1 commit into
Conversation
Contributor
Author
|
Fixs #1097 |
6 tasks
fc21897 to
a2ae929
Compare
… day Without weekday in the formatted timestamp, the agent had to infer the day of the week from its training knowledge and sometimes got it wrong (e.g. treating Monday as Sunday). Adding weekday: 'long' makes the day explicit in every message context passed to the container. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
a2ae929 to
7e2473a
Compare
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.
Type of Change
.claude/skills/Description
formatLocalTime in src/timezone.ts produced timestamps like Mar 9,
2026, 11:59 AM with no weekday. The agent had to infer the day of the week
from the date string alone, and LLMs are unreliable at computing calendar
weekdays for arbitrary dates.
Changes
Added weekday: 'long' to the Intl.DateTimeFormat options in formatLocalTime,
so the output now includes the full weekday name
Updated src/timezone.test.ts to assert the weekday name is present in the
output.
Test plan
npx vitest run src/timezone.test.ts)npm run build)identifies the day of the week without inference errors