So I have been working with some dates data lately (Like many other people do). I was wondering if there is a tool that can let you select a date format that you are in now from a drop down list of date formats (Like picking a foreign language on google translate), then pick a “destination” format from another drop down that you want it to transform into.
Then it will automatically generate a function snippet for you to copy and paste the transformation that you want into your code as a transform_date function (you can name the function from the UI too)
For example, mmm-dd to yyyy-mm-dd, and you get the function to copy and paste
Hope you all get what I mean haha, just a sudden thought.
All dates in your program should be stored as UNIX epochs anyway and so your function should parse into epoch, and print into whatever output you need. It’s the automatic parsing that’s tricky…
Have a look at the lubridate library in R for a really nice interface, even if you use other languages:
This is a question of locale, not language. There is no way to get a correct answer from one date without a minimum of training or context. If I just give you " 02/12/2019 " without any other form of context, it is impossible to decide whether I’m referring to 2 Dec (European) or 12 Feb (American).