Return to Roc packages
Documentation
Date
▶
Date
add
add_days
add_duration
add_months
add_years
after
before
compare
equal
format
from_iso_str
from_iso_u8
from_nanos_since_epoch
from_yd
from_ymd
from_yw
from_ywd
is_leap
sub
to_iso_str
to_iso_u8
to_nanos_since_epoch
unix_epoch
DateTime
▶
DateTime
add
add_days
add_duration
add_minutes
add_months
add_hours
add_nanoseconds
add_seconds
add_years
after
before
compare
equal
format
from_iso_str
from_iso_u8
from_nanos_since_epoch
from_yd
from_ymd
from_yw
from_ywd
from_ymdhms
from_ymdhmsn
sub
to_iso_str
to_iso_u8
to_nanos_since_epoch
unix_epoch
Duration
▶
Duration
add
format
format_unsigned
from_days
from_hms
from_hmsn
from_hours
from_minutes
from_nanoseconds
from_seconds
sub
to_days
to_hours
to_minutes
to_nanoseconds
to_seconds
Time
▶
Time
add
add_duration
add_hours
add_minutes
add_nanoseconds
add_seconds
after
before
compare
equal
format
from_hms
from_hmsn
from_iso_str
from_iso_u8
from_nanos_since_midnight
midnight
normalize
sub
to_iso_str
to_iso_u8
to_nanos_since_midnight
Now
▶
date_time!
date!
time!
(press
s
)
Date
.
Date
Date
.
add
: Date, Duration -> Date
Date
.
add_days
: Date, Int * -> Date
Date
.
add_duration
: Date, Duration -> Date
Date
.
add_months
: Date, Int * -> Date
Date
.
add_years
: Date, Int * -> Date
Date
.
after
: Date, Date -> Bool
Date
.
before
: Date, Date -> Bool
Date
.
compare
: Date, Date -> [ LT, EQ, GT ]
Date
.
equal
: Date, Date -> Bool
Date
.
format
: Date, Str -> Str
Date
.
from_iso_str
: Str -> Result Date [InvalidDateFormat]
Date
.
from_iso_u8
: List U8 -> Result Date [InvalidDateFormat]
Date
.
from_nanos_since_epoch
: Int * -> Date
Date
.
from_yd
: Int *, Int * -> Date
Date
.
from_ymd
: Int *, Int *, Int * -> Date
Date
.
from_yw
: Int *, Int * -> Date
Date
.
from_ywd
: Int *, Int *, Int * -> Date
Date
.
is_leap
: Date -> Bool
Date
.
sub
: Date, Date -> Duration
Date
.
to_iso_str
: Date -> Str
Date
.
to_iso_u8
: Date -> List U8
Date
.
to_nanos_since_epoch
: Date -> I128
Date
.
unix_epoch
: Date
DateTime
.
DateTime
DateTime
.
add
: DateTime, Duration -> DateTime
DateTime
.
add_days
: DateTime, Int * -> DateTime
DateTime
.
add_duration
: DateTime, Duration -> DateTime
DateTime
.
add_minutes
: DateTime, Int * -> DateTime
DateTime
.
add_months
: DateTime, Int * -> DateTime
DateTime
.
add_hours
: DateTime, Int * -> DateTime
DateTime
.
add_nanoseconds
: DateTime, Int * -> DateTime
DateTime
.
add_seconds
: DateTime, Int * -> DateTime
DateTime
.
add_years
: DateTime, Int * -> DateTime
DateTime
.
after
: DateTime, DateTime -> Bool
DateTime
.
before
: DateTime, DateTime -> Bool
DateTime
.
compare
: DateTime, DateTime -> [ LT, EQ, GT ]
DateTime
.
equal
: DateTime, DateTime -> Bool
DateTime
.
format
: DateTime, Str -> Str
DateTime
.
from_iso_str
: Str -> Result DateTime [InvalidDateTimeFormat]
DateTime
.
from_iso_u8
: List U8 -> Result DateTime [InvalidDateTimeFormat]
DateTime
.
from_nanos_since_epoch
: Int * -> DateTime
DateTime
.
from_yd
: Int *, Int * -> DateTime
DateTime
.
from_ymd
: Int *, Int *, Int * -> DateTime
DateTime
.
from_yw
: Int *, Int * -> DateTime
DateTime
.
from_ywd
: Int *, Int *, Int * -> DateTime
DateTime
.
from_ymdhms
: Int *, Int *, Int *, Int *, Int *, Int * -> DateTime
DateTime
.
from_ymdhmsn
: Int *, Int *, Int *, Int *, Int *, Int *, Int * -> DateTime
DateTime
.
sub
: DateTime, DateTime -> Duration
DateTime
.
to_iso_str
: DateTime -> Str
DateTime
.
to_iso_u8
: DateTime -> List U8
DateTime
.
to_nanos_since_epoch
: DateTime -> I128
DateTime
.
unix_epoch
: DateTime
Duration
.
Duration
Duration
.
add
: Duration, Duration -> Duration
Duration
.
format
: Duration, Str -> Str
Duration
.
format_unsigned
: Duration, Str -> Str
Duration
.
from_days
: Int * -> Duration
Duration
.
from_hms
: Int *, Int *, Int * -> Duration
Duration
.
from_hmsn
: Int *, Int *, Int *, Int * -> Duration
Duration
.
from_hours
: Int * -> Duration
Duration
.
from_minutes
: Int * -> Duration
Duration
.
from_nanoseconds
: Int * -> Duration
Duration
.
from_seconds
: Int * -> Duration
Duration
.
sub
: Duration, Duration -> Duration
Duration
.
to_days
: Duration -> I64
Duration
.
to_hours
: Duration -> I64
Duration
.
to_minutes
: Duration -> I64
Duration
.
to_nanoseconds
: Duration -> I128
Duration
.
to_seconds
: Duration -> I64
Time
.
Time
Time
.
add
: Time, Duration -> Time
Time
.
add_duration
: Time, Duration -> Time
Time
.
add_hours
: Time, Int * -> Time
Time
.
add_minutes
: Time, Int * -> Time
Time
.
add_nanoseconds
: Time, Int * -> Time
Time
.
add_seconds
: Time, Int * -> Time
Time
.
after
: Time, Time -> Bool
Time
.
before
: Time, Time -> Bool
Time
.
compare
: Time, Time -> [ LT, EQ, GT ]
Time
.
equal
: Time, Time -> Bool
Time
.
format
: Time, Str -> Str
Time
.
from_hms
: Int *, Int *, Int * -> Time
Time
.
from_hmsn
: Int *, Int *, Int *, Int * -> Time
Time
.
from_iso_str
: Str -> Result Time [InvalidTimeFormat]
Time
.
from_iso_u8
: List U8 -> Result Time [InvalidTimeFormat]
Time
.
from_nanos_since_midnight
: Int * -> Time
Time
.
midnight
: Time
Time
.
normalize
: Time -> Time
Time
.
sub
: Time, Time -> Duration
Time
.
to_iso_str
: Time -> Str
Time
.
to_iso_u8
: Time -> List U8
Time
.
to_nanos_since_midnight
: Time -> I64
Now
.
date_time!
: {} => DateTime
Now
.
date!
: {} => Date
Now
.
time!
: {} => Time
🤖
AI docs
Exposed Modules
Date
DateTime
Duration
Time
Now