Return to index

date functions

string = date([integer])

top

Returns a date/time string (RFC3339 format). Optional integer defaults to the current date/time, otherwise must be an epoch timestamp.

Example:

# Example for date
println date(1609459200)
println date()


string = date_human([integer])

top

Returns the current date and time in a readable format (RFC822Z).


If optional integer present, uses that as the epoch timestamp to convert.

Example:

# Example for date_human
date_human()  # usage


integer = epoch_nano_time([string])

top

Returns the current epoch (Unix) time in nano-seconds.

Example:

# Example for epoch_nano_time
println epoch_nano_time()


integer = epoch_time([string])

top

Returns the current epoch (Unix) time in seconds. If the optional string is present, then this is converted to epoch int format from RFC3339 format.

Example:

# Example for epoch_time
println epoch_time()


string = format_date([epoch])

top

Format date as string from current time or epoch.

Example:

# Example for format_date
println format_date(1609459200000000000)
println format_date()


string = format_time([epoch])

top

Format time as string from current time or epoch.

Example:

# Example for format_time
println format_time(1609459200000000000)
println format_time()


integer = now()

top

Returns the current epoch (Unix) time in seconds.

Example:

# Example for now
println now()


integer = time_diff(te,ts)

top

Returns difference in micro-seconds between two nano-epoch dates.

Example:

# Example for time_diff
println time_diff(5000, 1000)


integer = time_dom([epochnano])

top

Returns the current day of the month (no arguments) or the day of the epoch nano time specified in epochnano.

Example:

# Example for time_dom
println time_dom(1609459200)
println time_dom()


string = time_dow([epochnano])

top

Returns the current day of the week (no arguments) or the day of the epoch nano time specified in epochnano.

Example:

# Example for time_dow
println time_dow(1609459200)
println time_dow()


integer = time_hours([epochnano])

top

Returns the current hour of the day (no arguments) or the hour of the day specified by the epoch nano time in epochnano.

Example:

# Example for time_hours
println time_hours(42)


integer = time_minutes([epochnano])

top

Returns the current minute of the day (no arguments) or the minute of the day specified by the epoch nano time in epochnano.

Example:

# Example for time_minutes
println time_minutes(42)


integer = time_month([epochnano])

top

Returns the current month of the year (no arguments) or the month of the epoch nano time specified in epochnano.

Example:

# Example for time_month
println time_month(42)


integer = time_nanos([epochnano])

top

Returns the offset within the current second, in nanoseconds, (no arguments) or the

offset within the epoch nano time specified in epochnano.

Example:

# Example for time_nanos
time_nanos()  # usage


integer = time_seconds([epochnano])

top

Returns the current second of the day (no arguments) or the second of the day specified by

the epoch nano time in epochnano.

Example:

# Example for time_seconds
time_seconds()  # usage


integer = time_year([epochnano])

top

Returns the current year (no arguments) or the year of the epoch nano time specified in epochnano.

Example:

# Example for time_year
println time_year(1609459200)
println time_year()


string = time_zone([integer])

top

Returns the time zone.

Example:

# Example for time_zone
println time_zone(1609459200)
println time_zone()


integer = time_zone_offset([integer])

top

Returns the time zone offset in seconds.

Example:

# Example for time_zone_offset
println time_zone_offset(1609459200)
println time_zone_offset()