Is it possible to be able to set the date format, as currently it's mm/dd/yyyy I'd like something like dd/mm/yyyy?
Agreed, this is a good idea.
Alternatively, yyyy/mm/dd if adding the configuration option is too much work
@jfurrow would you be OK with "2 days ago" instead of the date?
@jfurrow I'm happy to do this if you are OK with it
I'll be the necromancer on this issue.
I've looked into how the date rendering is done. At the moment, the date in the torrent list overview is done here: https://github.com/jfurrow/flood/blob/b88c7ff11984c9a9fd71dae97e799f8624459f44/client/src/javascript/components/torrent-list/TorrentDetail.js#L28
This FormattedDate component is a part of react-intl, the documentation for this component can be found here: https://github.com/yahoo/react-intl/wiki/Components#formatteddate
There is no provision to change the string formatting of the date, which is entirely reliant on the locales setting here: https://github.com/jfurrow/flood/blob/aa095625ab8c2255e309b5466e026167a73d3b67/client/src/javascript/app.js#L80
So if you set your language in the settings to en, it assumes en-US. And en-us do the mm/dd/yyyy thing.
I'm not really sure what the best way to proceed would be, besides not using FormattedDate, and using a different component that does allow passing a string formatter. Options here would be Moment.js or Globalize.
I hope this can help you make some progress.
This bothers me too. It should really just be ISO standard yyyy-mm-dd if it can't be configured with the locale.
Most helpful comment
I'll be the necromancer on this issue.
I've looked into how the date rendering is done. At the moment, the date in the torrent list overview is done here: https://github.com/jfurrow/flood/blob/b88c7ff11984c9a9fd71dae97e799f8624459f44/client/src/javascript/components/torrent-list/TorrentDetail.js#L28
This
FormattedDatecomponent is a part ofreact-intl, the documentation for this component can be found here: https://github.com/yahoo/react-intl/wiki/Components#formatteddateThere is no provision to change the string formatting of the date, which is entirely reliant on the
localessetting here: https://github.com/jfurrow/flood/blob/aa095625ab8c2255e309b5466e026167a73d3b67/client/src/javascript/app.js#L80So if you set your
languagein the settings toen, it assumesen-US. Anden-usdo themm/dd/yyyything.I'm not really sure what the best way to proceed would be, besides not using
FormattedDate, and using a different component that does allow passing a string formatter. Options here would be Moment.js or Globalize.I hope this can help you make some progress.