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

Allow override of date format #291

Merged
merged 2 commits into from
Oct 1, 2021

Conversation

sumpfralle
Copy link
Contributor

@sumpfralle sumpfralle commented Jun 14, 2020

Previously the default date format (January 2, 2006 ) was used for
blog and single page date visualizations.

The new parameter date_format can be used to override this format.
This allows the visualization of localized dates or a changed precision
(down to the minute or up to the month or year of publication).

Comments

I am not entirely sure, whether such a setting should be implemented in hugo itself or in themes. Maybe you have an opinion?

The hugo-book theme uses the BookDateFormat setting in a similar fashion.

Previously the default date format (`January 2, 2006` ) was used for
blog and single page date visualizations.

The new parameter `date_format` can be used to override this format.
This allows the visualization of localized dates or a changed precision
(down to the minute or up to the month or year of publication).
@regisphilibert regisphilibert merged commit b0bf3cc into theNewDynamic:master Oct 1, 2021
@sumpfralle sumpfralle deleted the localize-date branch October 13, 2021 10:44
Remicck pushed a commit to Remicck/gohugo-theme-ananke that referenced this pull request Mar 7, 2022
Previously the default date format (`January 2, 2006` ) was used for
blog and single page date visualizations.

The new parameter `date_format` can be used to override this format.
This allows the visualization of localized dates or a changed precision
(down to the minute or up to the month or year of publication).

Co-authored-by: Regis Philibert <login@regisphilibert.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants