npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

dk-time

v1.0.0-pa.24

Published

DK time - library for working with time

Downloads

15

Readme

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.

| Variable | Type |Desc | | ---: | ----- | ------------- | |id| Any_id |Id library |is| Any_is | System library |sec| Num_32 | Time unix seconds |ms| Num_24u | Time milliseconds (3) |key| Num_ty | Id setTimeOut |repeat| Num_ty | Quantity repeat (> 0 - quantity < 0 - time in sec)

Time_num => Num_2u

Float seconds.milliseconds (4.2)

Constants

Default library

| Name | Type |Value|Desc | | --- | ----- | ------------- | ------------- | |TIME_NAME| Str_std | dk-time | Name library |TIME_KEY| Str_std | time | Key library |TIME_ID| Any_id | 12 | Id library |TIME_VER| Str_std | 1.0.0-pa.24 | Version library |TIME_STD_KEY| Str_std | date | Name JS object

Format time

| Name | Type |Value|Desc | | --- | ----- | ------------- | ------------- | |TIME_FV|Num_u8| | Format millisecond |TIME_FS|Num_u8| | Format second |TIME_FI|Num_u8| | Format minute |TIME_FH|Num_u8| | Format hour |TIME_FD|Num_u8| | Format day |TIME_FW|Num_u8| | Format week |TIME_FM|Num_u8| | Format month |TIME_FY|Num_u8| | Format 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