REBOL Programming/to-itime

USAGE:Edit

TO-ITIME time 

DESCRIPTION:Edit

Returns a standard internet time string (two digits for each segment)

TO-ITIME is a function value.

ARGUMENTSEdit

  • time -- (Type: time number block none)

SOURCE CODEEdit

to-itime: func [
    {Returns a standard internet time string (two digits for each segment)} 
    time [time! number! block! none!] 
    /local pad
][
    time: make time! time 
    pad: func [n] [head insert/dup n: form n #"0" 2 - length? n] 
    rejoin [
        pad time/hour ":" pad time/minute ":" 
        pad round/down time/second
    ]
]
Last modified on 13 November 2012, at 10:46