New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

dk-time

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dk-time

DK time - library for working with time

latest
Source
npmnpm
Version
1.0.0-pa.24
Version published
Maintainers
1
Created
Source

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

  • This project adheres to Semantic Versioning

License

MIT

Keywords

typescript

FAQs

Package last updated on 22 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts