klyn.time.DateTime.DateTime
constructor
public DateTime(text as String, timeZone as TimeZone = TimeZone.local):
Description

Constructs a DateTime by parsing an ISO 8601 date-time string (e.g., "2025-04-18 14:30:00" or "2025-04-18T14:30:00").

Parameters
ParameterDescription
textThe ISO 8601 formatted string.
timeZoneThe time zone to use (default: TimeZone.local).
Example
import klyn.time
dt = DateTime("2025-04-18 14:30:00")
print(dt.year, dt.month, dt.day)