postgres-date
Postgres date column parser
Last updated 8 years ago by bendrucker .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install postgres-date 
SYNC missed versions from official npm registry.

postgres-date tests

Postgres date output parser

This package parses date/time outputs from Postgres into Javascript Date objects. Its goal is to match Postgres behavior and preserve data accuracy.

If you find a case where a valid Postgres output results in incorrect parsing (including loss of precision), please create a pull request and provide a failing test.

Supported Postgres Versions: >= 9.6

All prior versions of Postgres are likely compatible but not officially supported.

Install

npm install --save postgres-date

Usage

const parse = require('postgres-date')
parse('2011-01-23 22:15:51Z')
// => 2011-01-23T22:15:51.000Z

API

parse(isoDate) -> date

isoDate

Required
Type: string

A date string from Postgres.

Releases

The following semantic versioning increments will be used for changes:

  • Major: Removal of support for Node.js versions or Postgres versions (not expected)
  • Minor: Unused, since Postgres returns dates in standard ISO 8601 format
  • Patch: Any fix for parsing behavior

License

MIT © Ben Drucker

Current Tags

  • 2.1.0                                ...           latest (3 years ago)

12 Versions

  • 2.1.0                                ...           3 years ago
  • 2.0.1                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.7                                ...           4 years ago
  • 1.0.6                                ...           4 years ago
  • 1.0.5                                ...           5 years ago
  • 1.0.4                                ...           6 years ago
  • 1.0.3                                ...           8 years ago
  • 1.0.2                                ...           8 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
  • 0.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Total 12
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE