TemporalZ

monthCode

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

Parameters

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

Source

Implementation

#
pub fn monthCode(self: PlainDateTime, allocator: std.mem.Allocator) ![]u8 {
    var write = abi.DiplomatWrite.init(allocator);
    defer write.deinit();
    abi.c.temporal_rs_PlainDateTime_month_code(self._inner, &write.inner);
    return try write.toOwnedSlice();
}