Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

date formatting according to locale #422

Open
mariashinoto opened this issue Nov 8, 2021 · 1 comment
Open

date formatting according to locale #422

mariashinoto opened this issue Nov 8, 2021 · 1 comment
Labels
feature request 🗻 a feature request or enhancement

Comments

@mariashinoto
Copy link

Dates seem to be formatted according to the US standards (MM dd, YYYY) regardless the locale of the site of OS.

It is easier to understand the date if formatted according to the language the article is written in, or even better, so set the date format independent of the locale (like YYYY-MM-DD).

@cderv
Copy link
Collaborator

cderv commented Sep 1, 2022

Very sorry for late feedback on this.

The formatting of the published date field in the Distill article header like here
image

is a feature of underlying Distill.js feature itself, which power distill R 📦

<div>
<h3>Published</h3>
${e.publishedDate?`
<p>${e.publishedMonth} ${e.publishedDay}, ${e.publishedYear}</p> `:`
<p><em>Not published yet.</em></p>`}
</div>

It is not an easy thing to add a feature too this, but maybe with some JS it can be possible. it would require some work.

And on a more general note, a new project has been announced called Quarto (https://quarto.org/). We are focusing our effort for new feature into this new tool which extends the R Markdown ecosystem.
Especially regarding distill, most the features offered by Distill.js (like the styling, the layouts, ...) have been redone without the JS library itself.
As an example, the date formatting is much more improved there already : https://quarto.org/docs/reference/dates.html
as the constraint of the JS lib was not there.

Just sharing in case you did not know about it. It is fully compatible with R Markdown ecosystem (R chunks, knitr and all).

I'll mark this as a feature request for future consideration as it is not straightforward. If anyone is interest to try improve their JS skills to help with that, feel free to share your results here! thanks you

@cderv cderv added the feature request 🗻 a feature request or enhancement label Sep 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request 🗻 a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants