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

klg-date

Package Overview
Dependencies
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

klg-date

date util

  • 2.0.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
39
increased by50%
Maintainers
4
Weekly downloads
 
Created
Source

klg-date

date util

QuickStart

安装

npm i klg-date

引入

import {DateUtil} from 'klg-date'

获取凌晨时间

DateUtil.getDayStart()  // Date 对象

获取2天前的凌晨时间

DateUtil.getDayStart(null, -2)

获取指定日期2天前的凌晨时间

DateUtil.getDayStart(new Date('2018/6/15'), -2) // 2018/6/13 00:00

其他用法见测试文件

Test

$ npm i
$ npm test

Keywords

FAQs

Package last updated on 06 Jan 2023

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