until
Returns the Duration until another PlainDateTime, according to the given settings.
Parameters
- self:PlainDateTime
- PlainDateTime
- other:PlainDateTime
- PlainDateTime
- options:DifferenceSettings
- DifferenceSettings
Source
Implementation
pub fn until(self: PlainDateTime, other: PlainDateTime, options: DifferenceSettings) !Duration {
const result = abi.c.temporal_rs_PlainDateTime_until(self._inner, other._inner, abi.to.diffsettings(options));
const ptr = (try abi.extractResult(result)) orelse return abi.TemporalError.Generic;
return .{ ._inner = ptr };
}