date



Contains functions for decoding and encoding date and time.

Declared types

_date: (year: int, month: int, day: int, hour: int, minute: int, second: int)

Functions

1. date::decode

Decodes unix date to its components.

Type definition

func(unix: int -> _date)

List of arguments

Name Type Description
unix int Unix timestamp

List of results

Name Type Description
- _date Struct with date and time components

2. date::encode

Assembles date and time components into unix timestamp.

Type definition

func(date: _date -> int)

List of arguments

Name Type Description
date _date Struct with date and time components

List of results

Name Type Description
- int Unix timestamp

3. date::fmt

Formats unix timestamp, see date and time [format] in additions.

Type definition

func(unix: int, format: string -> string)

List of arguments

Name Type Description
unix int Unix timestamp
format string Date and time format string

List of results

Name Type Description
- string Output string

4. date::parse

Parses date and time string into unix timestamp.

Type definition

func(text: string -> int)

List of arguments

Name Type Description
text string Date and time string in YYYY/MM/DD HH:MM:SS format

List of results

Name Type Description
- int Unix timestamp