Does Hugo support Persian Calendar?

Hi!
I’m creating a Persian theme for my Hugo website… Does Hugo support the Persian/Hijri Shami Calendar?
is there a {{ .Date.Format }} for non-Georgian calendars?

I do not think that is possible… There was a discussion about this once and the library used for dates in Hugo is this one: https://golang.org/pkg/time/ - I don’t think that will enable you to use different calendars.

1 Like

So you say it’s because of the limitation of the GoLang… Is it possible that Hugo itself could be updated in the future to include this feature?

No, Hugo cannot support non Gregorian calendars, if Go does not.

Also see this 4 years old topic: Are native non-Gregorian calendars supported?

1 Like

Too bad, will Go will be updated in the future to include this feature… ?
I heard in a conference that GOLANG is really proud of its minimal features. but here we see can one of the cons of this approach… it’s really bad for global scalability

Hugo cannot support non Gregorian calendars, if Go does not.

Well, not exactly. The Go standard time package only supports a Gregorian calendar. The Go language itself doesn’t prevent 3rd party time packages (such as this Persian calendar one) from being creating.

Hugo could support it, but it would take some work (how much? not sure) and we have no serious developers in the Hugo community willing to support it (yet?).

1 Like

Thank you for the clarification.

Perhaps an issue should be raised at the main Hugo repo, to track the addition of a Persian calendar.

Happy New Year’s Eve to you too, by the way @moorereason

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.