DateTimeOffsetExtensions extension
An extension on the DateTime class to provide additional functionality for formatting DateTime objects with timezone offsets.
- on
Methods
-
getTimezoneOffsetString(
) → String -
Available on DateTime, provided by the DateTimeOffsetExtensions extension
Returns the timezone offset as a string in the format±hh:mm
. If the DateTime is in UTC, it returns "Z". -
toIso8601StringWithOffset(
) → String -
Available on DateTime, provided by the DateTimeOffsetExtensions extension
Returns the DateTime object as an ISO 8601 string with timezone offset. If the DateTime is in UTC, it appends "Z" to the string.