News for hackers. Stuff that matters.
Re:Show HN: My Weekend Project – Automatically determine dat... by anonfunction on Monday February 12, 2018 @04:36PM (#16362482)
Interesting that there is another tool[1] on Show HN right now that does this but for strftime instead of moment.js, I guess I need to build one for Golang's weird time formatting.

1. http://strftime.guru/

Re:Show HN: My Weekend Project – Automatically determine dat... by strkek on Tuesday February 13, 2018 @06:38PM (#16371997)
There's Fucking Go Date Format [1], which is close enough. Btw, as a Go developer myself, I still can't remember Go's format.

[1]: http://fuckinggodateformat.com/

Re:Show HN: My Weekend Project – Automatically determine dat... by lotkowskim on Monday February 12, 2018 @05:01PM (#16362733)
That's pretty cool, thanks for letting me know!
Re:Show HN: My Weekend Project – Automatically determine dat... by continuational on Tuesday February 13, 2018 @03:00AM (#16365477)
I made a similar tool that could take almost arbitrery text strings like “mar 27, ’09” or “07/08/97” and generate a list of all valid interpretations. Eg. “07/08/97” would generate [{d: 7, m: 8, y: 97}, {d: 8, m: 7, y: 97}], but not any where 97 is a day or month, since that wouldn’t be a valid date.
Re:Show HN: My Weekend Project – Automatically determine dat... by fiatjaf on Monday February 12, 2018 @04:34PM (#16362456)
I don't know how it is supposed to work: https://screenshots.firefox.com/43Qs5xpvJ3Jm1oHi/date-format...

Why are there two different fields? I imagined only one would do the job.

Re:Show HN: My Weekend Project – Automatically determine dat... by lotkowskim on Monday February 12, 2018 @05:00PM (#16362729)
It's to remove ambiguity (not all), i.e. you select a date and then specify how you want it to look. For example, the date 12/05/2017 can be interpreted as either DD/MM/YYYY or MM/DD/YYYY but if you select a date first and then describe your desired format we can exclude one of the possibilities.
Re:Show HN: My Weekend Project – Automatically determine dat... by 0x62 on Tuesday February 13, 2018 @06:09AM (#16366250)
Perhaps consider removing the choice? For example, have only one input (the desired format) and above it some text saying "How would you format '28/03/2018 21:37'?".

This removes the confusion of two inputs, and provided you select an unambiguous baseline date (day & hour > 12) it should be more clear.

Re:Show HN: My Weekend Project – Automatically determine dat... by lotkowskim on Monday February 12, 2018 @03:38PM (#16361857)
Need to clean up the code and then I will upload it to Github :) Also let me know if there are any formats that don't work for you.
Re:Show HN: My Weekend Project – Automatically determine dat... by lozzo on Tuesday February 13, 2018 @04:54AM (#16365969)
just a suggestion but can we get a bit more than one page with a couple of fields ? It's okay to get straight to the point and being minimalistic but a few infos about the author and whether there is a github repo for the code... those things would help
Re:Show HN: My Weekend Project – Automatically determine dat... by jamestimmins on Tuesday February 13, 2018 @03:57PM (#16370695)
I'm genuinely curious, why would that help? Would that change the way you viewed the tool?