Socket
Socket
Sign inDemoInstall

klg-date

Package Overview
Dependencies
7
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    klg-date

date util


Version published
Maintainers
4
Install size
7.22 MB
Created

Readme

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

Last updated on 08 Jan 2024

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc