1.0.1 • Published 12 months ago

nv-time-str v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
12 months ago

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