Sign in

    joanna/moonfeed/src/datetime does not have a README file

    DateTimeError

    pub(all) suberror DateTimeError {
    InvalidFormat
    InvalidYear
    InvalidMonth
    InvalidDay
    InvalidTime
    InvalidOffset
    UnsupportedTimezone(String)
    } derive(Eq,
    Debug
    )

    Date parsing failures are typed so callers can distinguish malformed and unsupported input.

    DateTimeError::equal

    fn DateTimeError::equal(self : DateTimeError, other : DateTimeError) -> Bool

    DateTimeError::not_equal

    fn DateTimeError::not_equal(self : DateTimeError, other : DateTimeError) -> Bool

    DateTimeError::to_repr

    DateTime

    pub(all) struct DateTime {
    raw : String
    unix_seconds : Int64
    } derive(Eq,
    Debug
    )

    Retains the source date while exposing its UTC Unix timestamp at whole-second precision. Fractional seconds are validated and truncated toward the beginning of the represented second.

    DateTime::compare

    fn DateTime::compare(self : DateTime, other : DateTime) -> Int

    Compare normalized UTC instants, ignoring source spelling and timezone offset.

    DateTime::equal

    fn DateTime::equal(self : DateTime, other : DateTime) -> Bool

    DateTime::not_equal

    fn DateTime::not_equal(self : DateTime, other : DateTime) -> Bool

    DateTime::to_repr

    parse_datetime

    fn parse_datetime(input : String) -> DateTime raise DateTimeError

    Parse RFC 3339 first, then common RSS/RFC 822 date spellings.

    parse_optional_datetime

    fn parse_optional_datetime(input : String?) -> DateTime?

    Parse an optional source date without rejecting the containing feed when it is malformed.

    parse_rfc3339

    fn parse_rfc3339(input : String) -> DateTime raise DateTimeError

    Parse strict RFC 3339 timestamps with optional fractional seconds and explicit UTC offset.

    parse_rss_datetime

    fn parse_rss_datetime(input : String) -> DateTime raise DateTimeError

    Parse common RSS/RFC 822 and RFC 1123 dates. Unknown timezone abbreviations are rejected.

    Powered by MoonBit

    Site sourceReport issuePackagesBuild queueSkillsStatistics

    © 2026 mooncakes.io