Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 1.04 KB

date_library.md

File metadata and controls

40 lines (26 loc) · 1.04 KB

Home Standard library

Date library

Provides date and time utility functions.

Import

The following statement may be used to import the date library:

import date;

Functions

Name Description
localtime Get the system localtime according to provided format string.
localtime_ns Get the system localtime with nanoseconds according to provided format string.

Examples

localtime

string timeFormatted = "";
call localtime : "%Y-%m-%d %H:%M:%S" -> timeFormatted;

println timeFormatted;

localtime_ns

string timeFormatted = "";
call localtime_ns : "%Y-%m-%d %H:%M:%S" -> timeFormatted;

println timeFormatted;