klyn.time.DateTime.operator-
method

    public static operator-(left as DateTime, right as DateTime) as Duration:

Description

Subtracts one DateTime object from another.

Parameters

Parameter | Description
--- | ---
`dt` | The DateTime object to subtract from.
`dt2` | The DateTime object to subtract.

Returns

The duration between the two DateTime objects.

Example

    import klyn.time

    dateTime1 = DateTime(year=2023, month=10, day=5, hour=15, minute=30, second=45)
    dateTime2 = DateTime(year=2023, month=10, day=5, hour=14, minute=30, second=45)
    duration = dateTime1 - dateTime2
    print(duration.totalSeconds())  # Output: 3600