New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@reverse/date

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@reverse/date

Useful functions for handling dates.

latest
Source
npmnpm
Version
1.1.10
Version published
Maintainers
2
Created
Source

@reverse/date

Useful functions for handling dates.

Install

npm install @reverse/date

Table of Contents

  • dateEqualsNow
  • formatDate
  • getEasterDate

Usage

dateEqualsNow(month, date, year)

Checks if a given date is the same date as today.

Parameters

  • month: Number: The month in a number. Leading zero optional.
  • date: Number: The date.
  • year: Number: The full year.

Example

import { dateEqualsNow } from '@reverse/date';

// Assuming the today's date is 6/19/2019.

dateEqualsNow(06, 19, 2019);
// true

dateEqualsNow(04, 20, 2069);
// false

formatDate(date)

A nicely formatted date with time in AM and PM.

Parameters

  • date: Date: A date to format.

Example

import { formatDate } from '@reverse/date';

formatDate(new Date());
// Example Output: "2019-06-21 at 10:53am"

getEasterDate(year)

Finds the month and date of easter of that year.

Paramerters

  • year: Number: The email to check.

Example

import { getEasterDate } from '@reverse/date';

getEasterDate(2020);
// "04.12"

Keywords

date

FAQs

Package last updated on 27 Dec 2019

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