🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

postgres-date

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postgres-date

Postgres date column parser

1.0.7
Source
npm
Version published
Weekly downloads
16M
3.66%
Maintainers
1
Weekly downloads
 
Created

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

Keywords

postgres

FAQs

Package last updated on 28 Aug 2020

Did you know?

Socket

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