native-date

1.0.15 • Public • Published

Native Date

Some common methods to calculate and formatting date.

is_date(date)

Check the date is valid

return boolean


is_leap_year(date)

Check the year is leap year

return boolean

last_date(date, format)

Last date of the month

return date


is_leap_year(date)

Check the year is leap year

return boolean


add(date, number, category, type)

Add [number] of date or month depend on category to the date

return date


sub(date, number)

Substruct [number] of date or month depend on category to the date

return date


diff(date1, date2)

_Difference of between date1 and date2 in days

return date


format(date)

Format the date to YYYY-MM-DD

return date

Package Sidebar

Install

npm i native-date

Weekly Downloads

1

Version

1.0.15

License

MIT

Unpacked Size

7.41 kB

Total Files

3

Last publish

Collaborators

  • icelimon