TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What is the best Date and Time library (in any language)?

5 pointsby PaulJuliusabout 6 years ago
Date and time and time zones are notoriously hard to handle correctly. What libraries handle time the best? Which ones make it the most difficult to shoot yourself in the foot? Which language has the best standard library date&#x2F;time module?<p>Various dimensions for comparison include: - handling of timezones - handling of durations - handling of other date&#x2F;time arithmetic - formatting and parsing - explicitness for handling time with timezones vs. UTC

3 comments

dmt314159about 6 years ago
perl5&#x27;s DateTime &quot;is a class for the representation of date&#x2F;time combinations&quot;<p>Apart from the modules included in the DateTimeDistribution, there are many others as returned by <a href="https:&#x2F;&#x2F;metacpan.org&#x2F;search?q=DateTime" rel="nofollow">https:&#x2F;&#x2F;metacpan.org&#x2F;search?q=DateTime</a><p>My favorite use DateTime::Format::Baby;<p>my $Baby = DateTime::Format::Baby-&gt;new(&#x27;en&#x27;); my $dt = $Baby-&gt;parse_datetime(&#x27;The big hand is on the twelve and the little hand is on the six.&#x27;);
smt88about 6 years ago
NodaTime is excellent, especially the way it differentiates between a calendar date and a point in time.
quickthrower2about 6 years ago
.net DateTime class is reasonable out of the box.