@andrew_dominican/date-lib
v1.0.1
Published
![npm](https://img.shields.io/npm/v/%40andrew_dominican%2Fdate-lib) ![NPM](https://img.shields.io/npm/l/%40andrew_dominican%2Fdate-lib) ![npm package minimized gzipped size (select exports)](https://img.shields.io/bundlejs/size/%40andrew_dominican%2Fdate-
Downloads
9
Readme
Date Library
Table of Contents
constructor
Constructor that initializes the date object.
Parameters
args
...any Arguments to be passed to the native Date object.
year
Gets the full year of the date.
Returns [number][16] The full year.
yr
Gets the last two digits of the year.
Returns [string][17] The short form of the year.
month
Gets the full name of the month.
Returns [string][17] The full month name.
mon
Gets the abbreviated form of the month.
Returns [string][17] The short form of the month.
day
Gets the day of the week.
Returns [string][17] The name of the day.
dy
Gets the abbreviated form of the day of the week.
Returns [string][17] The short form of the day name.
date
Gets the day of the month.
Returns [number][16] The date.
hours
Gets the hour of the day.
Returns [number][16] The hour.
mins
Gets the minutes of the hour.
Returns [number][16] The minutes.
secs
Gets the seconds of the minute.
Returns [number][16] The seconds.
format
Formats the date object.
Parameters
mask
[string][17] The mask to format the date. (optional, default"Y M D"
)
Returns [string][17] The formatted date.
when
Describes how long ago or in the future the date is.
Returns [string][17] A string representation of the time difference.