Localize all the GroupBy*Date methods

Fixes #9745
This commit is contained in:
Bjørn Erik Pedersen
2022-04-05 09:57:58 +02:00
parent e0a882fd3b
commit 658e11ebaa
13 changed files with 144 additions and 42 deletions

View File

@@ -21,15 +21,13 @@ import (
"github.com/gohugoio/hugo/common/htime"
"github.com/gohugoio/locales"
"github.com/spf13/cast"
)
// New returns a new instance of the time-namespaced template functions.
func New(translator locales.Translator, location *time.Location) *Namespace {
func New(timeFormatter htime.TimeFormatter, location *time.Location) *Namespace {
return &Namespace{
timeFormatter: htime.NewTimeFormatter(translator),
timeFormatter: timeFormatter,
location: location,
}
}