API reference Dodo 0.1.4

std/time/iso8601

Public declarations, types, methods, and source contracts for std/time/iso8601.

On this page

Library guide · API index and notation

This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.

import "std/time/iso8601"

Names used in signatures

Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.

Alias Package Source file
fmt std/fmt iso8601.dodo
text std/text iso8601.dodo
time std/time iso8601.dodo

TextError

Enum · Source

pub enum TextError {
    InvalidSyntax, InvalidDateTime, BufferTooSmall
}

parse_date

Function · Source

Exactly YYYY-MM-DD, years 0000..9999.

pub fn parse_date(data: &[u8]) -> time.Date!TextError

parse_time

Function · Source

HH:MM:SS optionally followed by 1..9 fractional decimal digits.

pub fn parse_time(data: &[u8]) -> time.TimeOfDay!TextError

parse_timestamp

Function · Source

Explicit UTC suffix Z; numeric offsets and leap seconds are rejected.

pub fn parse_timestamp(data: &[u8]) -> time.Timestamp!TextError

format_date

Function · Source

Fixed field sizes; preflight ensures all errors leave the buffer unchanged.

pub fn format_date(output: &mut[u8], value: &time.Date) -> usize!TextError

format_time

Function · Source

Always nine fractional digits: HH:MM:SS.nnnnnnnnn (18 bytes).

pub fn format_time(output: &mut[u8], value: &time.TimeOfDay) -> usize!TextError

format_timestamp

Function · Source

pub fn format_timestamp(output: &mut[u8], value: &time.Timestamp) -> usize!TextError

Type to search all documentation.

Keyboard shortcuts

Search documentation
Ctrl K or /
Move through results
↑ ↓
Open selected result
Enter
Close a dialog
Esc
Show these shortcuts
?