package htime
import "github.com/gohugoio/hugo/common/htime"
Index ¶
- Variables
- func Now() time.Time
- func Since(t time.Time) time.Duration
- func ToTimeInDefaultLocationE(i any, location *time.Location) (tim time.Time, err error)
- type AsTimeProvider
- type TimeFormatter
Variables ¶
Functions ¶
func Now ¶
Now returns time.Now() or time value based on the `clock` flag. Use this function to fake time inside hugo.
func Since ¶
func ToTimeInDefaultLocationE ¶
Types ¶
type AsTimeProvider ¶
AsTimeProvider is implemented by go-toml's LocalDate and LocalDateTime.
type TimeFormatter ¶
type TimeFormatter struct {
// contains filtered or unexported fields
}
TimeFormatter is locale aware.
func NewTimeFormatter ¶
func NewTimeFormatter(ltr locales.Translator) TimeFormatter
func (TimeFormatter) Format ¶
func (f TimeFormatter) Format(t time.Time, layout string) string
Source Files ¶
- Version
- v0.111.0
- Published
- Mar 1, 2023
- Platform
- linux/amd64
- Imports
- 5 packages
- Last checked
- 5 minutes ago –
Tools for package owners.