@andrew_dominican/date-lib v1.0.1
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 The full year.
yr
Gets the last two digits of the year.
Returns string The short form of the year.
month
Gets the full name of the month.
Returns string The full month name.
mon
Gets the abbreviated form of the month.
Returns string The short form of the month.
day
Gets the day of the week.
Returns string The name of the day.
dy
Gets the abbreviated form of the day of the week.
Returns string The short form of the day name.
date
Gets the day of the month.
Returns number The date.
hours
Gets the hour of the day.
Returns number The hour.
mins
Gets the minutes of the hour.
Returns number The minutes.
secs
Gets the seconds of the minute.
Returns number The seconds.
format
Formats the date object.
Parameters
mask
string The mask to format the date. (optional, default"Y M D"
)
Returns string The formatted date.
when
Describes how long ago or in the future the date is.
Returns string A string representation of the time difference.