Skip to content

Add nanoseconds, and show NOW in the selected format#300

Merged
spring1843 merged 8 commits into
mainfrom
nano-second-epoch
Jun 7, 2026
Merged

Add nanoseconds, and show NOW in the selected format#300
spring1843 merged 8 commits into
mainfrom
nano-second-epoch

Conversation

@spring1843
Copy link
Copy Markdown
Owner

Improvements to the date converter

  • Support unix epoch in nano seconds
  • When now is clicked show now in the selected format

Copilot AI review requested due to automatic review settings June 7, 2026 01:54
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 7, 2026

Deploy Preview for freedevtool ready!

Name Link
🔨 Latest commit 6ed1ab3
🔍 Latest deploy log https://app.netlify.com/projects/freedevtool/deploys/6a24e05e15d34f0008a1cf5f
😎 Deploy Preview https://deploy-preview-300--freedevtool.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Unix epoch nanosecond support to the Date Converter and changes the “Now” action to populate the input using the currently selected input format.

Changes:

  • Added unixns as a selectable input format and as an output format (“Unix Nanoseconds”).
  • Implemented parsing/formatting logic for Unix nanoseconds (explicit format + auto-detect for 19-digit values).
  • Updated the “Now” button behavior to set the input value in the selected format (including mapping shorttext/fulltext to the formatter keys).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
tests/lib/date-converter.test.ts Adds unixns parsing/formatting coverage and updates invalid-date handling in timestamp parsing.
client/src/pages/tools/date-converter.tsx Adds unixns to input/output formats, implements nanosecond parsing/formatting, and updates “Now” behavior to respect the selected format.

Comment thread client/src/pages/tools/date-converter.tsx
Comment thread client/src/pages/tools/date-converter.tsx
Comment thread tests/lib/date-converter.test.ts
Comment thread tests/lib/date-converter.test.ts
Comment thread tests/lib/date-converter.test.ts
Comment on lines +130 to +134
{
name: "Unix Nanoseconds",
format: "unixns",
pattern: "Epoch (nanoseconds)",
description: "Nanoseconds since Jan 1, 1970",
spring1843 and others added 7 commits June 6, 2026 19:16
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@spring1843 spring1843 merged commit d3a1625 into main Jun 7, 2026
5 checks passed
@spring1843 spring1843 deleted the nano-second-epoch branch June 7, 2026 03:24
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.

2 participants