Show HN: A simple time conversion site for developers
time.lolPretty neat!
Some UI suggestions:
* When adding a custom format, allow for an "X" to remove it as well.
* Clicking on any of the output formats should automatically copy the text to the clipboard. I like that it selects it, but it also selects the label as well (at least on FF). A straight copy would be more useful.
And some date/time suggestions from someone who's had to deal a LOT with dates and times. I realize you're using libraries for a lot of the heavy lifting, and maybe some of the ideas below aren't what you want to do with it, but they are real needs:
* Allow setting a custom epoch for both input and output.
* Allow setting a location other than the current location for output. Likewise, allow enabling/disabling of daylight savings for the user-provided location.
* It's currently impossible to represent any date before Jan 1, 100 AD.
* Non-Gregorian calendar support would be really, really nice, too (e.g. it's currently 4718 AH using the Chinese calendar and 1442 in the Islamic calendar).
To date I've just been using https://www.epochconverter.com/ for a lot of my day-to-day work, but I like your input more. You may find some ideas there as well.
Wow, thank you for this detailed feedback! Some of this was on my list, but most of it wasn't even on my radar.
I've been planning to make it auto-select just the time for easy copying, but auto-copy may be better. I'm always somewhat hesitant to hijack the user's clipboard (what if they had some text copied that they needed?), but maybe it's expected enough these days that users wouldn't mind.
really cool project! Selecting only the value on click, and also having a small copy button would be my personal preference.
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
This is very cool! I’ve been playing with timefhuman and recurrant plus GPT-3 for really tricky user input.
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").
You don’t need GPT-3 for that, you need Perl ;)
https://metacpan.org/dist/Date-Manip/view/lib/Date/Manip/Exa...