Socket
Socket
Sign inDemoInstall

postgres-date

Package Overview
Dependencies
0
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    postgres-date

Postgres date column parser


Version published
Maintainers
1
Install size
5.82 kB
Created

Package description

What is postgres-date?

The postgres-date npm package is designed to parse and handle dates in PostgreSQL format. It provides functionalities for converting PostgreSQL date and timestamp strings into JavaScript Date objects. This can be particularly useful when working with PostgreSQL databases in Node.js applications, ensuring that date and timestamp data is correctly handled and manipulated.

What are postgres-date's main functionalities?

Parsing PostgreSQL date strings

This feature allows the conversion of PostgreSQL date strings into JavaScript Date objects. It's useful for handling date information retrieved from a PostgreSQL database.

"const parseDate = require('postgres-date');
const dateString = '2023-04-01';
const dateObject = parseDate(dateString);
console.log(dateObject); // Outputs a JavaScript Date object for 2023-04-01"

Parsing PostgreSQL timestamp strings

Similar to parsing date strings, this feature enables the parsing of PostgreSQL timestamp strings, including those with time information, into JavaScript Date objects.

"const parseDate = require('postgres-date');
const timestampString = '2023-04-01 12:00:00';
const dateObject = parseDate(timestampString);
console.log(dateObject); // Outputs a JavaScript Date object for 2023-04-01 12:00:00"

Other packages similar to postgres-date

Readme

Source

postgres-date Build Status Greenkeeper badge

Postgres date column parser

Install

$ npm install --save postgres-date

Usage

var 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.

License

MIT © Ben Drucker

Keywords

FAQs

Last updated on 03 Apr 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc