Skip to content

Get any file creation date and time.

License

Notifications You must be signed in to change notification settings

mateuszjanusz/file-birth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

file-birth 👶🏻

Get a file's created date. Easily, quickly and formatted!

Install

Install with yarn

yarn add file-birth

Install with npm

npm install file-birth --save

Usage

const birthDate = require('file-birth')

birthDate('myfile.txt')
// => 2017-10-22T12:00:00.000Z

birthDate('myfile.txt', 'DD/MM/YYYY')
// => 22/10/2017

birthDate('myfile.txt', 'yyyy')
// => 2017

birthDate('myfile.txt', 'dd-mm-yy')
// => 22-10-17

birthDate('', 'dd-mm-yy')
// => Error: file not found.

Changelog

  • 22/10/17 version 1.0.0 released.

License

MIT License

Copyright (c) 2017 Mateusz Janusz