all repos — min @ 505e95942dd8879db3b68ae58c86e9a07bf39556

A small but practical concatenative programming language.

site/contents/reference-time.md

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
-----
content-type: "page"
title: "time Module"
-----
{@ _defs_.md || 0 @}
  
{#op||datetime||{{i}}||{{s}}||
Returns an ISO 8601 string representing the combined date and time in UTC of timestamp {{i}}. #}

{#op||format||{{i}} {{s}}||{{s}}||
> Formats timestamp {{i}} using string {{s}}.
> 
> > %tip%
> > Tip
> > 
> > For information on special characters in the format string, see the [format](https://nim-lang.org/docs/times.html#format,TimeInfo,string) nim method. #}
  
{#op||info||{{i}}||{{tinfo}}||
Returns a timeinfo dictionary from timestamp {{i}}. #}

{#op||now||{{none}}||{{flt}}||
Returns the current time as Unix timestamp with microseconds. #}

{#op||stamp||{{none}}||{{i}}||
Returns the current time as Unix timestamp. #}
  
{#op||to-timestamp||{{tinfo}}||{{i}}||
Converts the timeinfo dictionary {{tinfo}} to the corresponding Unix timestamp. #}