klyn.time.DateTime.toString
method
public toString(format as String) as String:
Description

Returns a string representation using a custom format and the default locale.

Parameters
ParameterDescription
formatThe format string for the output (supports strftime tokens).
Returns

A formatted string representation of this DateTime object.

Example
import klyn.time
dt = DateTime(year=2023, month=10, day=5)
print(dt.toString("%Y/%m/%d"))  # 2023/10/05