Skip to content

Modern Chrono LocalTime ToIsoString

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

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

LocalTime.ToIsoString

Returns the time of day as ISO 8601 text, such as 14:30:05.

Syntax

LocalTime.ToIsoString

Examples

#import "std/chrono"
using chrono

print LocalTime( 14, 30, 5, 0 ).ToIsoString( )         '' 14:30:05
print LocalTime( 14, 30, 5, 123 ).ToIsoString( )    '' 14:30:05.1230000
print LocalTime.Midnight( ).ToIsoString( )          '' 00:00:00

'' ISO 8601, so it round-trips through ParseIso. The fraction appears
'' only when it is non-zero, and then always with seven digits.

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

Clone this wiki locally