You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{offset, Offset} - The offset, either a string or an integer, to be included in the formatted string. An empty string, which is the default, is interpreted as local time. A non-empty string is included as is. The time unit of the integer is the same as the one of Time.
Expected behavior
Either the documentation (and type) should say only "Z" is allowed, or the function should allow any string as documented.
Affected versions
27.1.2
Additional context
The RFC's grammar only allows Z as a letter, so the documentation and type should probably be fixed instead. If that is the desired outcome, I can make a PR for that.
The text was updated successfully, but these errors were encountered:
eproxus
changed the title
Wrong offset documentation for calendar:system_time_to_rfc3339
Wrong offset documentation for calendar:system_time_to_rfc3339/2
Nov 18, 2024
Hello! Yes, the documentation should be updated to only specify "Z" / "z" / "+HH:MM" / "-HH:MM". I don't think we can make the type any more precise as the closest we get is [$Z,$z,$+,$-,$0,$1,$2,$3,$4,$5,$6,$7,$8,$9,$:] which is not a lot more helpful versus the current type.
Describe the bug
The type
offset()
is defined as:The documentation for
calendar:system_time_to_rfc3339/2
states:(my emphasis)
However, only the value
"Z"
is allowed.To Reproduce
Expected behavior
Either the documentation (and type) should say only
"Z"
is allowed, or the function should allow any string as documented.Affected versions
27.1.2
Additional context
The RFC's grammar only allows
Z
as a letter, so the documentation and type should probably be fixed instead. If that is the desired outcome, I can make a PR for that.The text was updated successfully, but these errors were encountered: