News for hackers. Stuff that matters.
Re:Show HN: A simple time conversion site for developers by nobody_nothing on Friday June 18, 2021 @11:57AM (#27551703)
As someone who maintains an eCommerce WordPress site, I find writing code that deals with datetimes to be extremely onerous.

I’m always bopping between various conversion sites to debug my outputs. I wanted a simple, uncluttered page where I could do all my conversions in one place. I’m hoping https://time.lol becomes that spot.

I'd appreciate any feedback you have to offer!

Planned improvements:

- Make copying outputted dates easier

- Add a timezone picker for the input

- Add an output row that allows you to see the date in any timezone you wish

- Make the design more legible / aesthetically pleasing

Re:Show HN: A simple time conversion site for developers by amayne on Friday June 18, 2021 @01:11PM (#27552555)
This is very cool! I’ve been playing with timefhuman and recurrant plus GPT-3 for really tricky user input.
Re:Show HN: A simple time conversion site for developers by nobody_nothing on Friday June 18, 2021 @02:11PM (#27553165)
Thanks! Never heard of timefhuman, but now I'll look into it.

To parse human-written dates, time.lol currently uses a combination of the JavaScript libraries Day.js [1] and Sugar [2].

If Day.js can't determine a valid date from the given input, then Sugar is invoked to try even harder :) Seems to work well so far, but indeed it falls short with complex input (e.g. "The Tuesday after July 4th").

[1] https://day.js.org [2] https://sugarjs.com

Re:Show HN: A simple time conversion site for developers by darrenwestall on Sunday June 20, 2021 @06:19PM (#27574390)
You don’t need GPT-3 for that, you need Perl ;)

https://metacpan.org/dist/Date-Manip/view/lib/Date/Manip/Exa...