JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 108
  • Score
    100M100P100Q69647F
  • License BSD

Takes a string and a date object, returns what you expect

Package Exports

  • format-date

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (format-date) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

format-date

Takes a string and a date object, returns what you expect

Example:

var formatDate = require('format-date')

formatDate('{month}/{day}/{year}', new Date);
// => 21/09/2014

formatDate('{hours}:{minutes}:{seconds} {day-name}', new Date);
// => 13:30:53 Monday

formatDate('{month-name} {year}')
// => January 2014

Install

$ npm install format-date

Reference

* day
* day-name
* month
* month-name
* year
* hours
* minutes
* seconds