question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discussion on Date format.

See original GitHub issue

I checked out documentation and It looks like Datepicker take moment object. I do not understand why Date picker of this world cannot adopt the world most simple and unconfusing format. YYYY-MM-DD. As per my experience, IMHO, A date picker must communicate in YYYY-MM-DD format which is most simple and minimum sufficient.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
ljharbcommented, Sep 4, 2016

@nsisodiya in either case, you can go from one format to the other. The question is, is the more common case “you want a powerful/flexible moment object, that you can use to produce a multitude of formats including YYYY-MM-DD”, or “you want a YYYY-MM-DD string”?

In either case you don’t want to blindly JSON.stringify it and send it to the server, so in every case you may need to do your own formatting. It seems far more preferable to use a moment object to do that formatting, rather than to force every user of the library to either reinvent the wheel, or convert to moment themselves?

1reaction
majapwcommented, Dec 21, 2016

Nah, I think you are right that the default value should be in a standardized format. Pretty much, 90% of my woes at Airbnb in the past have stemmed from using internationalized dates on the server-side/in urls/etc.

I’ve created https://github.com/airbnb/react-dates/pull/229 to address this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Discussion on Date format. · Issue #59 - GitHub
Hello! If you are talking about the display format, currently the date picker defaults to moment's L format which changes from locale to...
Read more >
Wikipedia:Overview of date formatting guidelines
Wikipedia's guidelines for formatting dates (MOS:DATEFORMAT) set out the three date formats acceptable for use in Wikipedia articles, namely:.
Read more >
Change discourse date display format - Meta Discussion
Hi! I find the way discourse displays dates extremely annoying. E.g. Oct '16 vs Oct 16; the quote is just not visible enough....
Read more >
Discourse uses USA date and time format - Site discussion
Date and time notation in the United Kingdom records the date using the day-month-year format (21 October 2011 or 21/10/11). The ISO 8601...
Read more >
[SOLVED] Date format - Get Help - Metabase Discussion
I need a date in this format " DD/MM/YYY "( not using native query). Now date in string format “Friday, January 26, 2018...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found