0.2.1 • Published 6 years ago

@weseek/clf-date v0.2.1

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

@weseek/clf-date

Return the current date in CLF format: %d/%b/%Y:%H:%M:%S %z.

The purpose of this package is to fix the bug (lludol/clf-date#7).

Executable

npm install -g @weseek/clf-date # or yarn global add clf-date

# Without parameter
clf-date

# With parameter (everything which works with Date.parse)
clf-date 2042

Node.js library

npm install @weseek/clf-date # or yarn add clf-date
const clfDate = require('@weseek/clf-date');

// Without parameter it will use the current time.
console.log(clfDate());     # Ex) Output log "12/May/2018:19:29:27 +0900"

// With a Date in parameter.
const date = new Date();
date.setFullYear(2042);
console.log(clfDate(date)); # Ex) Output log "12/May/2042:19:29:27 +0900"

License

MIT