@annapawl/date_library v1.0.0
JavaScript Date Library
This is a date library wrapper that extends the functionality of the built-in javascript Date object.
Getting Started
Run the following command in your project folder:
npm install @annapawl/date_library --save
Then add this to your index.js file
require('@annapawl/src/date_library')
Date & Time Methods
year()
This method capitalizes the first letter of an entire string
'string cheese'.capitalizeFirst()
→ "String cheese"
yearShort()
This method capitalizes the first letter of an entire string
'string cheese'.capitalizeFirst()
→ "String cheese"
month()
This method capitalizes the first letter of an entire string
'string cheese'.capitalizeFirst()
→ "String cheese"
monthShort()
This method capitalizes the first letter of an entire string
'string cheese'.capitalizeFirst()
→ "String cheese"
day()
This method capitalizes the first letter of an entire string
'string cheese'.capitalizeFirst()
→ "String cheese"
hrs()
This method capitalizes the first letter of an entire string
'string cheese'.capitalizeFirst()
→ "String cheese"
mins()
This method capitalizes the first letter of an entire string
'string cheese'.capitalizeFirst()
→ "String cheese"
secs()
This method capitalizes the first letter of an entire string
'string cheese'.capitalizeFirst()
→ "String cheese"
Date Formatting Methods
'When' Method
Returns human readble description of 'when' a date will occur. Compares date owned by class instance with current date.
4 years ago