Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cdellacqua/date-only

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cdellacqua/date-only

A DateOnly class for JavaScript

  • 1.0.9
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

date-only

A DateOnly class for JavaScript

NPM Package

npm install @cdellacqua/date-only

Full documentation:

  • DateOnly

Highlights

Always serializes to YYYY-MM-DD

console.log(new DateOnly(2020, 0, 1).toString());
// -> 2020-01-01
console.log(new DateOnly(2020, 0, 1).toJSON());
// -> "2020-01-01"

Compatible with native Date object

console.log(DateOnly.fromDate(new Date(2020, 0, 1)).toString());
// -> 2020-01-01
console.log(new DateOnly(2020, 0, 1).toDate().toDateString());
// -> Wed Jan 01 2020

Keywords

FAQs

Package last updated on 07 Aug 2021

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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc