We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
format_date()
Provide a format_date() function from stdlib (https://pkg.go.dev/github.com/zclconf/go-cty/cty/function/stdlib#FormatDate)
Example (by @afflerbach ):
add_response_headers = { # format_date/date_format Last-Modified = format_date("Mon, 2 Jan 2006 15:04:05 MST") # Go Expires = format_date("EEE, d MMM yyyy HH:mm:ss z", unixtime() + 3600) # Java }
However, the FormatDate from stdlib (as used in https://developer.hashicorp.com/terraform/language/functions/formatdate) is
func FormatDate(format cty.Value, timestamp cty.Value) (cty.Value, error) FormatDate reformats a timestamp given in RFC3339 syntax into another time syntax defined by a given format string.
func FormatDate(format cty.Value, timestamp cty.Value) (cty.Value, error)
FormatDate reformats a timestamp given in RFC3339 syntax into another time syntax defined by a given format string.
The text was updated successfully, but these errors were encountered:
For the user we want to simplify the usage with specific parts of a date/timestamp. Which standard we would prefer? e.g. YYYY-MM vs yyyy-mm ?
YYYY-MM
yyyy-mm
Does a go library exist which fulfills this requirements?
Which input formats are valid? RFC3339 # 2006-01-02T15:04:05Z07:00 Unix ISO8601 RFC850 = "Monday, 02-Jan-06 15:04:05 MST" RFC1123 = "Mon, 02 Jan 2006 15:04:05 MST"
RFC3339 # 2006-01-02T15:04:05Z07:00
should we accept number and string?
Sorry, something went wrong.
No branches or pull requests
Provide a
format_date()
function from stdlib (https://pkg.go.dev/github.com/zclconf/go-cty/cty/function/stdlib#FormatDate)Example (by @afflerbach ):
However, the FormatDate from stdlib (as used in https://developer.hashicorp.com/terraform/language/functions/formatdate) is
The text was updated successfully, but these errors were encountered: