1.1.10 • Published 4 years ago

@reverse/date v1.1.10

Weekly downloads
13
License
MIT
Repository
github
Last release
4 years ago

@reverse/date

Useful functions for handling dates.

Install

npm install @reverse/date

Table of Contents


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"
1.1.10

4 years ago

1.1.9

4 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago