Da

DateTimeMate: A Golang lib and CLI for advanced date/time manipulation

Hacker News

DateTimeMate: A Golang lib and CLI for advanced date/time manipulation

DateTimeMate is a new open-source Golang package and CLI tool I've developed to tackle common date and time manipulation challenges. It's designed to provide a robust, flexible solution for developers working with temporal data in Go or directly from the command line. Key features: * Precise duration calculations between arbitrary dates/times * Date/time arithmetic with support for complex durations * Periodic calculations with customizable repetition * Flexible unit conversion for durations * Date/time reformatting ___ The CLI tool, dtmate, offers commands that mirror these core functionalities: diff: Calculate time differences dur: Perform date/time arithmetic conv: Convert between duration units fmt: Reformat date/time strings ___ What sets DateTimeMate apart: Intuitive syntax: The CLI accepts human-readable duration formats like "1 year 2 months 3 days 4 hours" as well as brief formats like "1Y2M3D4h". Relative date shortcuts: Supports keywords like "now", "today", "yesterday", "tomorrow" for quick calculations. Flexible unit handling: Converts between various time units, including sub-second precision (milliseconds, microseconds, nanoseconds). Consistent year definition: Uses 365.25 days per year for accurate long-term calculations. Dual-purpose design: Functions both as a standalone CLI tool and an importable Go package. ___ CLI Example: $ dtmate diff "2023-01-01 12:00:00" "2024-03-15 18:30:45" 1 year 2 months 14 days 6 hours 30 minutes 45 seconds $ dtmate dur today "1Y 2M 3W 4D 5h 6m 7s" -a 2025-10-19 17:06:07 $ dtmate conv 4321s123456789ns hms.msusns 1h12m1s123ms456us789ns ___ I built DateTimeMate to address the complexities often encountered in date/time manipulation, especially when dealing with mixed units or long-term calculations. It's particularly useful for tasks like: * Project timeline calculations * Age computations * Event scheduling and planning * Log analysis and time-based data processing ___ The project is open-source and available on GitHub: https://github.com/jftuga/DateTimeMate I'm keen to hear thoughts from the HN community. What other date/time challenges do you face in your projects? How could DateTimeMate be extended to better serve your needs?

Share card

Actual performance

1points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: supports, including · Missing: reddit linkedin, podcasting, created
94%94% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: new, tasks, open · Missing: mac, agents, macos
69%69% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: intuitive · Missing: plus, platform, reviews
46%46% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: ide, io, including · Missing: https docs, excited, just released
36%36% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: month · Missing: mobile apps, ios, personal
35%35% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
13%13% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

Ar
Arrow, better date & time manipulation for Python49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Arrow, better date & time manipulation for Python

Hacker News1
The Anchor Archipelago
The Anchor Archipelago53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

The psychological war against AI manipulation

Indie Hackers1$2,000/moai
Co
ColorKit – Advanced Color Manipulation for iOS51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

ColorKit – Advanced Color Manipulation for iOS

Hacker News2
Ar
Array manipulation at compile time in C++1157%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Array manipulation at compile time in C++11

Hacker News2
Th
The worst time/date selectors in the world61%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

The worst time/date selectors in the world

Hacker News3
Py
PyPIup – CLI that checks whether your PyPI requirements are up to date22%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

PyPIup – CLI that checks whether your PyPI requirements are up to date

Hacker News3
Im
Image Manipulation via Triangulation58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Image Manipulation via Triangulation

Hacker News5
Ut
Utdon – Are you up to date or not?58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Utdon – Are you up to date or not?

Hacker News1
Re
Real-time image manipulation with Voronoi/Delaunay58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Real-time image manipulation with Voronoi/Delaunay

Hacker News87
DO
DOM registry for a better DOM Manipulation59%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

DOM registry for a better DOM Manipulation

Hacker News1