toInstant
Returns a new Instant representing the same instant as this ZonedDateTime.
Parameters
- self:ZonedDateTime
- ZonedDateTime
Source
Implementation
pub fn toInstant(self: ZonedDateTime) !Instant {
const instant_ptr = abi.c.temporal_rs_ZonedDateTime_to_instant(self._inner) orelse return error.TemporalError;
return .{ ._inner = instant_ptr };
}