跳转到内容

Rebol 编程/to-itime

来自维基教科书,开放世界中的开放书籍
TO-ITIME time 

返回标准互联网时间字符串(每个部分两位数字)

TO-ITIME 是一个函数值。

  • time -- (类型:时间数字块无)

源代码

[编辑 | 编辑源代码]
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
    ]
]
华夏公益教科书