Instant Class
Instant Class
The Instant
class is a fundamental component of B2Win Suite Scripting, allowing you to work with instants in time. This class provides methods for creating and manipulating time-related data.
Static Methods
Instant.now(): Instant
Description: Returns an instance representing the current instant.
Example:
Instant.parse(text: String)
Description: Parses a string and returns an instance of Instant.
Example:
Comparison Methods
isBefore(otherInstant: Instant)
Description: Compares this Instant
with another Instant
and returns true
if it is before the other instant or false otherwise.
Example:
Description: Compares this Instant
with another Instant
and returns true
if it is after the other instant or false otherwise.
Example:
Conversion Methods
Description: Converts this Instant
to the number of milliseconds since the epoch (00:00:00 UTC on 1 January 1970) and returns the value in type Long.
Example:
Description: Converts this Instant
to a string representation and returns it.
Example: