Skip to content

Modern Chrono LocalTime TryParseIso

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Date and Time (Chrono) › Chrono Date and Time › LocalTime.TryParseIso

LocalTime.TryParseIso

Reads ISO text into a time of day; returns false and sets it Invalid on failure.

Syntax

LocalTime.TryParseIso

Examples

#import "std/chrono"
using chrono

dim as LocalTime t

if LocalTime.TryParseIso( "14:30:05", t ) then print t.ToIsoString( )

'' FALSE on a bad string -- and the output is CLOBBERED, not preserved:
'' it is set to Invalid before the parse is attempted
print LocalTime.TryParseIso( "25:00:00", t )      '' false
print t.IsValid                                   '' false

'' ParseIso is the same parse, returning Invalid instead of answering
'' with a boolean

Library: Chrono Date and Time
Category: Date and Time (Chrono)
Documented under: The Members

Clone this wiki locally