TemporalZ

monthCode

Returns the month code (e.g., "M03").

Parameters

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

Source

Implementation

#
pub fn monthCode(self: PlainDate, allocator: std.mem.Allocator) ![]u8 {
    var write = abi.DiplomatWrite.init(allocator);
    defer write.deinit();

    abi.c.temporal_rs_PlainDate_month_code(self._inner, &write.inner);
    return try write.toOwnedSlice();
}