diff --git a/material/plugins/blog/plugin.py b/material/plugins/blog/plugin.py index a99e93cc9..05f76e3ab 100644 --- a/material/plugins/blog/plugin.py +++ b/material/plugins/blog/plugin.py @@ -25,7 +25,7 @@ import os import posixpath import yaml -from babel.dates import format_date +from babel.dates import format_datetime from datetime import datetime from jinja2 import pass_context from jinja2.runtime import Context @@ -783,7 +783,7 @@ class BlogPlugin(BasePlugin[BlogConfig]): # Format date def _format_date(self, date: datetime, format: str, config: MkDocsConfig): locale: str = config.theme["language"].replace("-", "_") - return format_date(date, format = format, locale = locale) + return format_datetime(date, format = format, locale = locale) # Format date for post def _format_date_for_post(self, date: datetime, config: MkDocsConfig): diff --git a/src/plugins/blog/plugin.py b/src/plugins/blog/plugin.py index a99e93cc9..05f76e3ab 100644 --- a/src/plugins/blog/plugin.py +++ b/src/plugins/blog/plugin.py @@ -25,7 +25,7 @@ import os import posixpath import yaml -from babel.dates import format_date +from babel.dates import format_datetime from datetime import datetime from jinja2 import pass_context from jinja2.runtime import Context @@ -783,7 +783,7 @@ class BlogPlugin(BasePlugin[BlogConfig]): # Format date def _format_date(self, date: datetime, format: str, config: MkDocsConfig): locale: str = config.theme["language"].replace("-", "_") - return format_date(date, format = format, locale = locale) + return format_datetime(date, format = format, locale = locale) # Format date for post def _format_date_for_post(self, date: datetime, config: MkDocsConfig):