nv-time-str

1.0.1 • Public • Published

nv-time-str

  • simple util to convert Date'isoStr to compatible with nvlang' compile-time date-var-name
  • nvlang support a special Literal begin with "DT": DTYYYYMMDD_hhmmss_xxx

install

  • npm install nv-time-str

splitted

usage

  const x   = require("nv-time-str");

example

	> var dt = new Date
	> 
	> x.encd_dt(dt)
	'DT20230603_073156_291'

            //so  make it a valid js-identifier 
            const DT20230603_073156_291 = dt.getTime();

	> 
	> x.decd('DT20230603_073156_291')
	2023-06-03T07:31:56.291Z
	> 
	> 
	> x.now()
	'DT20230603_073217_140'
	> 

METHODS

APIS

LICENSE

  • ISC

Dependents (2)

Package Sidebar

Install

npm i nv-time-str

Weekly Downloads

0

Version

1.0.1

License

ISC

Unpacked Size

1.77 kB

Total Files

3

Last publish

Collaborators

  • ihgazni2