TemporalZ

toJSON

Returns a string representing this duration in the ISO 8601 format (same as toString). Intended for JSON serialization.

See: Temporal.Duration.toJSON

Parameters

#
self:Duration
Duration
allocator:std.mem.Allocator
std.mem.Allocator

Source

Implementation

#
pub fn toJSON(self: Duration, allocator: std.mem.Allocator) ![]u8 {
    return self.toString(allocator, .{});
}