Sfairadora

  • Reference Guide

time_to_str

time_to_str(t)
time_to_str(t, precision)
time_to_str(t, precision, lang)
time_to_str(t, form)
time_to_str(t, form, precision)
time_to_str(t, form, precision, lang)
The function returns a text representation of a time. The return value is of the type String.

Parameters

t
A value of the type Time to be converted to string.
precision
An integer number specifying the number of digits to use in the time format: 0 – h:00, 1 – h:m0, 2 – h:mm, 3 – h:mm:s0…
lang
The value of one of the language constants. It determines the local conventions of the date and time format. If no language is specified, the value of the language from the document Settings is used.
form
The formatting string (the type String) used to create the text representation. If it is not specified, the standard formatting string for the language is used. The formatting string is composed of symbols described below.

Formatting String

Symbol
Description
h
Hours; twelve hour cycle.
hh
Hours; twelve hour cycle, always two digits.
H
Hours; twenty-four hour cycle.
HH
Hours; twenty-four hour cycle, always two digits.
m
Minutes.
mm
Minutes; always two digits.
s
Seconds
ss
Seconds; always two digits.
t
Morning/afternoon indicator (e.g. for English AM/PM).
'xxx'
A constant string xxx.

See Also