Skip to content

levchenkod/formatDate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

formatDate


Example

var date = new Date(),
    format = "YYYY MMMM DD",
    formatedDate = formatDate(date, format);
    
console.log(formatedDate) /* 2017 February 05 */

Formats

YYYY MMMM DD - 2017 February 05

YYYY MM DD - 2017 Feb 05

YYYY MMMM DD - 2017 February 05

MMMM DD - February 05

DD.M.YY - 05.02.17

DD.M - 05.02

DD MM hh:mm:ss:ms - 05 Feb 18:03:04:272

%dif% - less than a minute

%dif% ago - less than a minute ago

In %dif% - In less than a minute


License

No license. Just use it as you need.

Releases

No releases published

Packages

No packages published