1.0.0-pa.24 • Published 6 years ago

dk-time v1.0.0-pa.24

Weekly downloads
1
License
MIT
Repository
-
Last release
6 years ago

npm version


DK-time

На русском

DK time - library for working with time

Install

Exec command

$ npm install --save dk-time

API

OOP - not used in api

Types

*Time_t

An object pointer is a data buffer

Please do not process this indicator, as the data may change at any time.

VariableTypeDesc
idAny_idId library
isAny_isSystem library
secNum_32Time unix seconds
msNum_24uTime milliseconds (3)
keyNum_tyId setTimeOut
repeatNum_tyQuantity repeat (> 0 - quantity < 0 - time in sec)

Time_num => Num_2u

Float seconds.milliseconds (4.2)

Constants

Default library

NameTypeValueDesc
TIME_NAMEStr_stddk-timeName library
TIME_KEYStr_stdtimeKey library
TIME_IDAny_id12Id library
TIME_VERStr_std1.0.0-pa.24Version library
TIME_STD_KEYStr_stddateName JS object

Format time

NameTypeValueDesc
TIME_FVNum_u8Format millisecond
TIME_FSNum_u8Format second
TIME_FINum_u8Format minute
TIME_FHNum_u8Format hour
TIME_FDNum_u8Format day
TIME_FWNum_u8Format week
TIME_FMNum_u8Format month
TIME_FYNum_u8Format year

Functions

Normal

time_sys (): Time_num

Get system time (unix)

time_nil (): Time_s

Make empty (null) new pointer

time_new (num: Time_num): Time_s

Make new time

if sec are empty gets the current date

time_parse (date: Str_s): Time_s

Parse string date and make new Time_s

if sec are empty gets the current date

time_str (time: Time_s): Str_s

Get string for date

time_convert (time: Time_s, format: num_T8u, groups: Num_1): Str_s

Convert time by format

time_duration (time: Time_s): Str_s

get duration time

time_passed (time: Time_s): Str_s

get passed time

time_sleep (delay: Num_2u, handler: Func_s): Time_s

make setTimeout

time_repeat (quantity: Num_2u, delay: Num_3u, handler: Func_s): Time_s

make setInterval

time_stop (time: Time_s): Err_s

Stopping sleep ()setTimeout / setInterval)

time_diff (time: Time_s): Time_s

Difference old time and current

time_set (time: Time_s, num: Time_num): Err_s

Set seconds and milliseconds

time_offset (time: Time_s, num: Time_num, isNext:Bool_s): Err_s

Offset time forward or backward

time_clear (time: Time_s): Err_s

clear all data

About

Notes

License

MIT

1.0.0-pa.24

6 years ago

1.0.0-pa.23

6 years ago

1.0.0-pa.21

6 years ago

1.0.0-pa.20

6 years ago

1.0.0-pa.19

6 years ago

1.0.0-pa.18

6 years ago

1.0.0-pa.17

6 years ago

1.0.0-pa.16

6 years ago

1.0.0-pa.15

6 years ago

1.0.0-pa.14

6 years ago

1.0.0-pa.13

6 years ago

1.0.0-pa.12

6 years ago

1.0.0-pa.11

6 years ago

1.0.0-pa.10

6 years ago

1.0.0-pa.9

6 years ago

1.0.0-pa.8

6 years ago

1.0.0-pa.7

6 years ago

1.0.0-pa.6

6 years ago

1.0.0-pa.5

6 years ago

1.0.0-pa.4

6 years ago

1.0.0-pa.3

6 years ago

1.0.0-pa.2

6 years ago

1.0.0-pa.1

6 years ago

1.0.0-pa

6 years ago

0.3.4

6 years ago

0.2.1

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago