Skip to content

Conversation

@rossedfort
Copy link
Contributor

@rossedfort rossedfort commented Nov 14, 2025

Description & motivation 💭

  • Allow users to select from 3 timestamp formats: short, medium, and long
  • Create <Timestamp /> component to minimize direct calls to formatDate

Screenshots (if applicable) 📸

Screenshot 2025-11-17 at 10 44 21 AM

Design Considerations 🎨

Testing 🧪

How was this tested 👻

  • Manual testing
  • E2E tests added
  • Unit tests added

Steps for others to test: 🚶🏽‍♂️🚶🏽‍♀️

Checklists

Draft Checklist

Merge Checklist

Issue(s) closed

Docs

Any docs updates needed?

@vercel
Copy link

vercel bot commented Nov 14, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
holocene Ready Ready Preview Comment Nov 18, 2025 8:11pm

@rossedfort rossedfort marked this pull request as ready for review November 17, 2025 17:49
@rossedfort rossedfort requested review from a team and Alex-Tideman as code owners November 17, 2025 17:49
Comment on lines 9 to 15
export const timestampFormats = {
short: 'do MMM yyyy H:mm:ss.SS',
medium: 'yyyy-MM-dd z HH:mm:ss.SS',
long: 'MMMM do yyyy, hh:mm:ss.SS a z',
abbreviated: 'yyyy-MM-dd HH:mm:ss a',
abbreviatedWithoutSeconds: 'yyyy-MM-dd HH:mm a',
} as const;
Copy link
Collaborator

@Alex-Tideman Alex-Tideman Nov 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if we should use 'full' | 'long' | 'medium' | 'short' and map to Intl.DateTimeFormat. What I don't know is if our timezone's locale map correctly.

new Intl.DateTimeFormat('en-US', {
  year: 'numeric',
  month: 'long',
  day: 'numeric'
}).format(new Date()); // "November 17, 2025"

// Short date
new Intl.DateTimeFormat('en-US', {
  year: '2-digit',
  month: '2-digit',
  day: '2-digit'
}).format(new Date()); // "11/17/25"

// Date + Time
new Intl.DateTimeFormat('en-US', {
  dateStyle: 'short',
  timeStyle: 'short'
}).format(new Date()); // "11/17/25, 2:30 PM"
Key options:

dateStyle: 'full' | 'long' | 'medium' | 'short'
timeStyle: 'full' | 'long' | 'medium' | 'short'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. date formats now are:

11/18/25, 09:59:16.00 MST
Nov 18, 2025, 09:59:35.00 MST
November 18, 2025 at 9:59:43.00 AM MST

The short and medium formats use 24 hour clock, so PM times will be 12, 13, 14, etc. and no AM/PM indicator.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the default? Medium? Just might be weird for us 12-hour folks to have that now be 24

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

@rossedfort rossedfort Nov 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with either 24 or 12, although I think you're right that 12 might make more sense for most folks. Just was trying to keep things somewhat aligned with the previous implementation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess leaving hour12 unspecified would do it based on locale, we can do that.

@rossedfort rossedfort merged commit 80b7830 into main Nov 19, 2025
15 checks passed
@rossedfort rossedfort deleted the DT-3307-add-custom-timestamp-formats branch November 19, 2025 17:38
temporal-cicd bot pushed a commit that referenced this pull request Dec 18, 2025
Auto-generated version bump from 2.43.3 to 2.44.0

Bump type: minor

Changes included:
- [`d2a09d40`](d2a09d4) chore(server): optimize Docker builds with .dockerignore and improved Dockerfile (#3014)
- [`0ae7ce08`](0ae7ce0) Add run Id when fetching initial values for workflow start (#3019)
- [`2abd6ba0`](2abd6ba) Add route for archived event history (#3023)
- [`20c692df`](20c692d) Move ziggy png under src/lib/vendor and import it (#3025)
- [`0ba531d8`](0ba531d) Fix custom public path for render endpoint (#3024)
- [`564dcfa9`](564dcfa) Add deprecate to pluralize. (#3026)
- [`80b78303`](80b7830) DT-3307 - add custom timestamp formats (#3021)
- [`be7fe154`](be7fe15) Remove timestamp from timeline axis (#3031)
- [`07dec31d`](07dec31) Clear Schedule timeouts (#3030)
- [`34fdd3a4`](34fdd3a) Only add link if deployment is defined (#3035)
- [`d59320d1`](d59320d) If greater than 1 attempt, set actions to 0 (#3045)
- [`a7629a24`](a7629a2) Bump mdast-util-to-hast from 13.2.0 to 13.2.1 (#3046)
- [`37159d8f`](37159d8) Bump express from 4.20.0 to 4.22.0 (#3047)
- [`4faf9843`](4faf984) feat(search-attributes): add isDeletable (#3041)
- [`37a0a691`](37a0a69) Audit identity field in APIs (#3018)
- [`fe84adcc`](fe84adc) update Menu and related components to runes mode (#3048)
- [`378a4699`](378a469) Fix empty state png (#3053)
- [`bd4dfba2`](bd4dfba) Dangerfile (#3043)
- [`82a9971f`](82a9971) fix event-details-link href creation (#3055)
- [`23885f39`](23885f3) Support forwarding binary headers (#3000)
- [`f8b38697`](f8b3869) fix(codec-server): add spacing between action buttons (#3058)
- [`4495de9a`](4495de9) Fix poller reduce logic for pollers with different identities (#3057)
- [`271edd95`](271edd9) fix: update Go to 1.24.11 to fix stdlib security vulnerabilities (#3059)
- [`20ab1a28`](20ab1a2) fix batch operation close time (#3060)
- [`19a64bf7`](19a64bf) Add schedule link (#3061)
- [`0c7597c9`](0c7597c) Change from 2 to 1 (#3062)
- [`7c74da94`](7c74da9) Time range bug fix (#3050)
- [`8a5b5fad`](8a5b5fa) fix(select): make Option children a required prop (#3068)
- [`ce4e9a9c`](ce4e9a9) Scheduled by filter updates (#3063)
- [`8faf0420`](8faf042) Update ns picker value based on page params (#3065)
- [`06ca2389`](06ca238) Make custom signal first (#3069)
- [`2f2adc39`](2f2adc3) fix: address security vulnerabilities in dependencies (#3056)
Alex-Tideman added a commit that referenced this pull request Dec 18, 2025
Auto-generated version bump from 2.43.3 to 2.44.0

Bump type: minor

Changes included:
- [`d2a09d40`](d2a09d4) chore(server): optimize Docker builds with .dockerignore and improved Dockerfile (#3014)
- [`0ae7ce08`](0ae7ce0) Add run Id when fetching initial values for workflow start (#3019)
- [`2abd6ba0`](2abd6ba) Add route for archived event history (#3023)
- [`20c692df`](20c692d) Move ziggy png under src/lib/vendor and import it (#3025)
- [`0ba531d8`](0ba531d) Fix custom public path for render endpoint (#3024)
- [`564dcfa9`](564dcfa) Add deprecate to pluralize. (#3026)
- [`80b78303`](80b7830) DT-3307 - add custom timestamp formats (#3021)
- [`be7fe154`](be7fe15) Remove timestamp from timeline axis (#3031)
- [`07dec31d`](07dec31) Clear Schedule timeouts (#3030)
- [`34fdd3a4`](34fdd3a) Only add link if deployment is defined (#3035)
- [`d59320d1`](d59320d) If greater than 1 attempt, set actions to 0 (#3045)
- [`a7629a24`](a7629a2) Bump mdast-util-to-hast from 13.2.0 to 13.2.1 (#3046)
- [`37159d8f`](37159d8) Bump express from 4.20.0 to 4.22.0 (#3047)
- [`4faf9843`](4faf984) feat(search-attributes): add isDeletable (#3041)
- [`37a0a691`](37a0a69) Audit identity field in APIs (#3018)
- [`fe84adcc`](fe84adc) update Menu and related components to runes mode (#3048)
- [`378a4699`](378a469) Fix empty state png (#3053)
- [`bd4dfba2`](bd4dfba) Dangerfile (#3043)
- [`82a9971f`](82a9971) fix event-details-link href creation (#3055)
- [`23885f39`](23885f3) Support forwarding binary headers (#3000)
- [`f8b38697`](f8b3869) fix(codec-server): add spacing between action buttons (#3058)
- [`4495de9a`](4495de9) Fix poller reduce logic for pollers with different identities (#3057)
- [`271edd95`](271edd9) fix: update Go to 1.24.11 to fix stdlib security vulnerabilities (#3059)
- [`20ab1a28`](20ab1a2) fix batch operation close time (#3060)
- [`19a64bf7`](19a64bf) Add schedule link (#3061)
- [`0c7597c9`](0c7597c) Change from 2 to 1 (#3062)
- [`7c74da94`](7c74da9) Time range bug fix (#3050)
- [`8a5b5fad`](8a5b5fa) fix(select): make Option children a required prop (#3068)
- [`ce4e9a9c`](ce4e9a9) Scheduled by filter updates (#3063)
- [`8faf0420`](8faf042) Update ns picker value based on page params (#3065)
- [`06ca2389`](06ca238) Make custom signal first (#3069)
- [`2f2adc39`](2f2adc3) fix: address security vulnerabilities in dependencies (#3056)

Co-authored-by: Alex-Tideman <7967403+Alex-Tideman@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants