Socket
Socket
Sign inDemoInstall

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


Version published
Weekly downloads
61
increased by27.08%
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 08 Jan 2024

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