canton-network-docs
DA.Time
DA.Time - Canton Network Docs
Skip to main content
The
Adjusts
Returns time offset between two given instants.
Returns the number of whole days in a time offset. Fraction of time is rounded towards zero.
A number of days in relative time.
A number of hours in relative time.
A number of minutes in relative time.
A number of seconds in relative time.
A number of milliseconds in relative time.
A number of microseconds in relative time.
Convert RelTime to microseconds
Use higher level functions instead of the internal microseconds
Convert microseconds to RelTime
Use higher level functions instead of the internal microseconds
True iff the ledger time of the transaction is less than the given time.
True iff the ledger time of the transaction is less than or equal to the given time.
True iff the ledger time of the transaction is greater than the given time.
True iff the ledger time of the transaction is greater than or equal to the given time.
Documentation Index
Fetch the complete documentation index at: https://docs.canton.network/llms.txt
Use this file to discover all available pages before exploring further.
DA.Time
This module provides a set of functions to manipulate Time values. TheTime type represents a specific datetime in UTC,
for example time (date 2007 Apr 5) 14 30 05.
The bounds for Time are 0001-01-01T00:00:00.000000Z and
9999-12-31T23:59:59.999999Z.
Module Snapshot
Lifecycle
Stable.
Notices
Status:
active
Introduced in: 3.4.9
Removed in: -
Warnings: 0
Deprecations: 0
Deprecated since: -Data Types
data RelTime
The RelTime type describes a time offset, i.e. relative time.
Instances:
instance Eq RelTimeinstance Ord RelTimeinstance Bounded RelTimeinstance Additive RelTimeinstance Signed RelTimeinstance Show RelTime
Functions
time
time d h m s turns given UTC date d and the UTC time (given in hours, minutes, seconds)
into a UTC timestamp (Time). Does not handle leap seconds.
addRelTime
Time with given time offset.
subTime
wholeDays
days
hours
minutes
seconds
milliseconds
microseconds
convertRelTimeToMicroseconds
convertMicrosecondsToRelTime
isLedgerTimeLT
isLedgerTimeLE
isLedgerTimeGT
isLedgerTimeGE
Orphan Typeclass Instances
-
instance Eq RelTime -
instance Ord RelTime -
instance Show RelTime -
instance Additive RelTime -
instance Signed RelTime -
instance Bounded RelTime -
instance Bounded Time