Capy-Bearer Documentation

time_format_relative

host call

Capy

function time_format_relative(timestamp : u64, very_recent : string = "", medium_seconds : u64 = 0, medium_recent : string = "", not_recent_seconds : u64 = 0, not_recent : string = "") string

Description

time_format_relative formats a timestamp relative to the current time.

Parameters

timestamp : Unix timestamp

very_recent : text for very recent timestamps

medium_seconds : very recent cutoff in seconds

medium_recent : text after the very recent cutoff

notrecentseconds : medium recent cutoff in seconds

not_recent : text after the medium recent cutoff

Return Values

formatted relative time

Example

Capy

print(time_format_relative(time()), "\n")