Are native non-Gregorian calendars supported?


#1

I tried some themes; produced dates are in the form that is familiar for English/German/French/etc people (e.g Mar 12, 2016, or 12 Mar 2016, …).

Can generator convert Gregorian dates to another locale date for posts, specified somehow in config file?

There some libraries such as moment.js that gives devs possibility to have support for other cals in the core!

What’s Hugo approach?

Also, take a look at:


#2

This is, in short, the time and date support in Hugo:

https://golang.org/pkg/time/

So to answer your question: No.


#3

Maybe we see native support by the Go packages of the standard library in future releases. It’s at least on the roadmap acording to this reddit thread.


#4

I believe that reddit thread is about localization, also important, but not native support for the list of calendars on the @Rea wishlist.


#5

Ah, your right. It’s not the same but they are closely related. Once Go’s package support l10n it should be a must-have.


#6

Ah, You don’t know how much I’m happy of this topic!

Jekyll Persian Calendar Plugin | Go Persian Calendar : By the mixture of ideas behind these tools, would be there a solution for Hugo?

More tools: github.com/search?q=golang+calendar


#7

Since Hugo does not support PLUGINS, it is not possible to change pre-produced date.


#8

@yaa110

What about functions? ( https://discuss.gohugo.io/users/parsedarweb )


#9

Is hugo using moment.js for ‘date’?


#10

Could be wrong but since it’s written in go, I would say no. And it’s mentioned above that it’s using the golang time package.