Files
gohugoio--hugo/docs/content/en/methods/time/Weekday.md
T
2026-07-13 11:58:46 +08:00

531 B

title, description, categories, keywords, params
title description categories keywords params
Weekday Returns the day of the week of the given time.Time value.
functions_and_methods
returnType signatures
time.Weekday
TIME.Weekday

To convert the time.Weekday value to a string:

{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
{{ $t.Weekday.String }} → Friday

To convert the time.Weekday value to an integer.

{{ $t := time.AsTime "2023-01-27T23:44:58-08:00" }}
{{ $t.Weekday | int }} → 5