structstd.tz.Timetype[src]

Fields

offset: i32
flags: u8
name_data: [6:0]u8

Functions

Functionname[src]

pub fn name(self: *const Timetype) [:0]const u8

Parameters

self: *const Timetype

Source Code

Source code
pub fn name(self: *const Timetype) [:0]const u8 {
    return std.mem.sliceTo(self.name_data[0..], 0);
}

FunctionisDst[src]

pub fn isDst(self: Timetype) bool

Parameters

self: Timetype

Source Code

Source code
pub fn isDst(self: Timetype) bool {
    return (self.flags & 0x01) > 0;
}

FunctionstandardTimeIndicator[src]

pub fn standardTimeIndicator(self: Timetype) bool

Parameters

self: Timetype

Source Code

Source code
pub fn standardTimeIndicator(self: Timetype) bool {
    return (self.flags & 0x02) > 0;
}

FunctionutIndicator[src]

pub fn utIndicator(self: Timetype) bool

Parameters

self: Timetype

Source Code

Source code
pub fn utIndicator(self: Timetype) bool {
    return (self.flags & 0x04) > 0;
}

Source Code

Source code
pub const Timetype = struct {
    offset: i32,
    flags: u8,
    name_data: [6:0]u8,

    pub fn name(self: *const Timetype) [:0]const u8 {
        return std.mem.sliceTo(self.name_data[0..], 0);
    }

    pub fn isDst(self: Timetype) bool {
        return (self.flags & 0x01) > 0;
    }

    pub fn standardTimeIndicator(self: Timetype) bool {
        return (self.flags & 0x02) > 0;
    }

    pub fn utIndicator(self: Timetype) bool {
        return (self.flags & 0x04) > 0;
    }
}