Gathering detailed insights and metrics for time-stamp
Gathering detailed insights and metrics for time-stamp
Gathering detailed insights and metrics for time-stamp
Gathering detailed insights and metrics for time-stamp
tinydate
A tiny (349B) reusable date formatter. Extremely fast!
jsrsasign
opensource free pure JavaScript cryptographic library supports RSA/RSAPSS/ECDSA/DSA signing/validation, ASN.1, PKCS#1/5/8 private/public key, X.509 certificate, CRL, OCSP, CMS SignedData, TimeStamp and CAdES and JSON Web Signature(JWS)/Token(JWT)/Key(JWK)
time-stamp-tool
简单易用的转换时间戳工具 库库
deal-time-stamp
倒计时 计时 时间戳转换为指定格式的日期或星期几
Get a formatted timestamp. Used in gulp, assemble, generate, and many others.
npm install time-stamp
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.8
Supply Chain
99.2
Quality
78
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
1,159,492,346
Last Day
402,116
Last Week
1,863,130
Last Month
8,743,481
Last Year
108,196,776
MIT License
112 Stars
51 Commits
17 Forks
6 Watchers
1 Branches
6 Contributors
Updated on May 07, 2025
Minified
Minified + Gzipped
Latest Version
2.2.0
Package Id
time-stamp@2.2.0
Size
3.79 kB
NPM Version
6.4.1
Node Version
10.10.0
Published on
Oct 26, 2018
Cumulative downloads
Total Downloads
Last Day
10.5%
402,116
Compared to previous day
Last Week
-9.6%
1,863,130
Compared to previous week
Last Month
-1.3%
8,743,481
Compared to previous month
Last Year
-11.3%
108,196,776
Compared to previous year
3
Get a formatted timestamp.
Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your :heart: and support.
(TOC generated by verb using markdown-toc)
Install with npm:
1$ npm install --save time-stamp
1const timestamp = require('time-stamp'); 2 3console.log(timestamp()); 4//=> 2018-10-26 5 6console.log(timestamp.utc()); 7//=> 2018-10-26
You may also pass a string to format the generated timestamp.
1console.log(timestamp('YYYYMMDD')); 2//=> 20181026 3 4console.log(timestamp.utc('YYYYMMDD')); 5//=> 20181026
Supported patterns
YYYY
: full year (ex: 2018)MM
: month (ex: 04)DD
: day (ex: 01)HH
: hours (ex: 12)mm
: minutes (ex: 59)ss
: seconds (ex: 09)ms
: milliseconds (ex: 532)Usage Examples
1console.log(timestamp('YYYYMMDD')); 2//=> 20181026 3console.log(timestamp.utc('YYYYMMDD')); 4//=> 20181026 5 6console.log(timestamp('YYYYMMDD:ss')); 7//=> 20181026:24 8console.log(timestamp.utc('YYYYMMDD:ss')); 9//=> 20181026:24 10 11console.log(timestamp('YYYY/MM/DD:mm:ss')); 12//=> 2018/10/26:46:24 13console.log(timestamp.utc('YYYY/MM/DD:mm:ss')); 14//=> 2018/10/26:46:24 15 16console.log(timestamp('YYYY:MM:DD')); 17//=> 2018:10:26 18console.log(timestamp.utc('YYYY:MM:DD')); 19//=> 2018:10:26 20 21console.log(timestamp('[YYYY:MM:DD]')); 22//=> [2018:10:26] 23console.log(timestamp.utc('[YYYY:MM:DD]')); 24//=> [2018:10:26] 25 26console.log(timestamp('YYYY/MM/DD')); 27//=> 2018/10/26 28console.log(timestamp.utc('YYYY/MM/DD')); 29//=> 2018/10/26 30 31console.log(timestamp('YYYY:MM')); 32//=> 2018:10 33console.log(timestamp.utc('YYYY:MM')); 34//=> 2018:10 35 36console.log(timestamp('YYYY')); 37//=> 2018 38console.log(timestamp.utc('YYYY')); 39//=> 2018 40 41console.log(timestamp('MM')); 42//=> 10 43console.log(timestamp.utc('MM')); 44//=> 10 45 46console.log(timestamp('DD')); 47//=> 26 48console.log(timestamp.utc('DD')); 49//=> 26 50 51console.log(timestamp('HH')); 52//=> 00 53console.log(timestamp.utc('HH')); 54//=> 04 55 56console.log(timestamp('mm')); 57//=> 46 58console.log(timestamp.utc('mm')); 59//=> 46 60 61console.log(timestamp('ss')); 62//=> 24 63console.log(timestamp.utc('ss')); 64//=> 24 65 66console.log(timestamp('ms')); 67//=> 186 68console.log(timestamp.utc('ms')); 69//=> 186
Breaking changes
Default pattern was changed from YYYY:MM:DD
to YYYY-MM-DD
. See issues/3 for more details.
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
1$ npm install && npm test
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
1$ npm install -g verbose/verb#dev verb-generate-readme && verb
You might also be interested in these projects:
Commits | Contributor |
---|---|
31 | jonschlinkert |
7 | doowb |
1 | evocateur |
1 | mendenhallmagic |
1 | mvanroon |
1 | leesei |
1 | sleagon |
Jon Schlinkert
Copyright © 2018, Jon Schlinkert. Released under the MIT License.
This file was generated by verb-generate-readme, v0.8.0, on October 26, 2018.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 4/25 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-04-28
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More