跳轉到內容

Rebol 程式設計/now

來自華夏公益教科書
NOW /year /month /day /time /zone /date /weekday /yearday /precise 

返回當前本地日期和時間。

NOW 是一個本機值。

  • /year -- 僅返回年份。
  • /month -- 僅返回月份。
  • /day -- 僅返回月份中的日期。
  • /time -- 僅返回時間。
  • /zone -- 僅返回時區相對於 GMT 的偏移量。
  • /date -- 僅返回日期。
  • /weekday -- 返回一週中的日期作為整數(星期一是第 1 天)。
  • /yearday -- 返回一年中的日期(儒略日)。
  • /precise -- 使用納秒精度

原始碼

[編輯 | 編輯原始碼]
now: native[
    "Returns the current local date and time." 
    /year "Returns the year only." 
    /month "Returns the month only." 
    /day "Returns the day of the month only." 
    /time "Returns the time only." 
    /zone "Returns the time zone offset from GMT only." 
    /date "Returns date only." 
    /weekday {Returns day of the week as integer (Monday is day 1).} 
    /yearday "Returns day of the year (Julian)" 
    /precise "Use nanosecond precision"
]
華夏公益教科書