DOCS v0.1.13 github

@hatch:datetime v0.1.1

Timezone-aware DateTime value type, Duration arithmetic, RFC 3339 parse + format.

stable system updated May 1, 2026 source ↗
README
$ hatch add @hatch:datetime

MOD datetime

CL Duration

NEW Duration.new_(secs)

GET Duration.seconds

GET Duration.minutes

GET Duration.hours

GET Duration.days

GET Duration.toString

FN Duration.static seconds(n)

FN Duration.static minutes(n)

FN Duration.static hours(n)

FN Duration.static days(n)

FN Duration.+(other)

FN Duration.-(other)

FN Duration.-

FN Duration.*(n)

FN Duration.==(other)

FN Duration.!=(other)

FN Duration.<(other)

FN Duration.<=(other)

FN Duration.>(other)

FN Duration.>=(other)

CL DateTime

NEW DateTime.new_(unix, offsetMinutes)

GET DateTime.unix

GET DateTime.offsetMinutes

GET DateTime.year

GET DateTime.month

GET DateTime.day

GET DateTime.hour

GET DateTime.minute

GET DateTime.second

GET DateTime.millisecond

GET DateTime.weekday

GET DateTime.iso

GET DateTime.offsetSuffix_

GET DateTime.offsetCompact_

GET DateTime.toUtc

GET DateTime.toString

FN DateTime.static now

FN DateTime.static fromUnix(seconds)

FN DateTime.static fromUnix(seconds, offsetMinutes)

FN DateTime.static utc(year, month, day)

FN DateTime.static utc(year, month, day, hour, minute, second)

FN DateTime.static parse(text)

FN DateTime.format(pattern)

FN DateTime.add(d)

FN DateTime.subtract(other)

FN DateTime.diff(other)

FN DateTime.withOffset(offsetMinutes)

FN DateTime.==(other)

FN DateTime.!=(other)

FN DateTime.<(other)

FN DateTime.<=(other)

FN DateTime.>(other)

FN DateTime.>=(other)

FN DateTime.toJson()

FN DateTime.static daysFromCivil_(y, m, d)

FN DateTime.static pad_(n, width)

CL Parser_

FN Parser_.static parse_(text)

FN Parser_.static readInt_(s, at, len)

FN Parser_.static expect_(s, at, ch)

FN Parser_.static isDigit_(c)

FN Parser_.static digitValue_(c)