🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@basichelpers/date

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

@basichelpers/date

```bash import { dateFormat, stringtoDate } from '@basichelpers/date'

0.1.0
latest
npm
Version published
Maintainers
1
Created
Source

Install the dependencies

npm install @basichelpers/date

how to use

import { dateFormat } from '@basichelpers/date'

/**
 * @returns {string} '2000/12/31'
 */
dateFormat(new Date('2000-12-31'), 'YYYY/MM/DD')
import { stringtoDate } from '@basichelpers/date'
/**
 * @returns {date} Sun Dec 31 2000 09:00:00 GMT+0900 (日本標準時)
 */
stringtoDate('2000/12/31', '/')
/**
 * @returns {date} Sun Dec 31 2000 12:30:00 GMT+0900 (日本標準時)
 */
stringtoDate('2000-12-31', '-', '12:30')
import { featureCheck } from '@basichelpers/date'
/**
 * 与えられた日付が将来のものかを判定する関数
 * falseが返ってきたら将来ではない
 * @param  {string} date '2021/12/31'
 * @returns {boolean} false
 */
featureCheck('2020/12/31')
import { getYoubi } from '@basichelpers/date'
/**
 * 与えられた日付から対象の日付の曜日を返す関数
 * @param  {string} date '2021/12/31'
 * @returns {string} 木
 */
getYoubi('2020/12/31')

FAQs

Package last updated on 25 Jan 2022

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