nustack
ReferenceStd

nu.std.datetime

Mirrors datetime 1-1: five Forms, no module-level functions. Property reads (.year, .hour, .days, ...) reuse core GetAttr; arithmetic and comparison reuse the core atoms.

from nu.std.datetime import date, timedelta

NameSortSignatureEffectMeaning
timedeltaFormtimedelta.of(days=, seconds=, ..., weeks=)purea span of time; .days/.seconds/.microseconds, total_seconds(), arithmetic, comparison
timeFormtime.of(hour, minute, second, microsecond)purea wall-clock time of day; from_iso, isoformat(), strftime(), replace(), comparison
dateFormdate.of(year, month, day)purea calendar date; today(), from_iso/from_ordinal/from_timestamp, weekday(), +/- with timedelta, comparison
datetimeFormdatetime.of(year, month, day, hour=, ...)purea date and a time; now(tz), from_iso/from_timestamp, combine(), date()/time() parts, +/-, comparison
timezoneFormtimezone.of(offset, name=None)purea fixed UTC offset; utc(), utcoffset(), tzname(), dst() (always None), eq/ne