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

date-fns-start-of

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

date-fns-start-of

A collection of the date-fns startOf functions to mirror moment's startOf function.

  • 1.0.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

A collection of the date-fns startOf functions to mirror moment's startOf function.

Installation

    npm install date-fns-start-of --save

Usage

Simply add your date as the first argument, and the startOf type as your second argument and you're done!

dateFnsStartOf(Date, StartOfType one of 'second' 'minute' 'hour' 'day' 'week' 'ISOweek' month 'year' or 'ISOyear');

var dateFnsStartOf = require('date-fns-startOf');

var origDate = new Date('October 13, 2014 11:13:00');
var startMonth = dateFnsStartOf(origDate, 'month');

// startMonth = 'October 1, 2014 12:00:00'

Credits

Built using nothing but the excellent date-fns library.

FAQs

Package last updated on 10 Mar 2017

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