us-date

1.2.0 • Public • Published

us-date Build Status

Format dates as US M/D/Y strings

Install

$ npm install --save us-date

Usage

var usDate = require('us-date')
 
usDate(new Date(0))
//=> 1/1/1970

API

usDate([now], [options]) -> string

now

Type: date
Default: new Date()

The date to use for formatting.

options

Type: object / string
Default: {separator: '/', pad: false, utc: false}

Set pad to always use two digit month/day values (01/01/2000). If options is a string, it will be treated as the separtor.

License

MIT © Ben Drucker

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.2.0
    5
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.2.0
    5
  • 1.1.0
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i us-date

Weekly Downloads

7

Version

1.2.0

License

MIT

Last publish

Collaborators

  • bendrucker