1.0.15 • Published 3 years ago
native-date v1.0.15
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 booleanlast_date(date, format)
Last date of the month
return date
is_leap_year(date)
Check the year is leap year
return booleanadd(date, number, category, type)
Add number of date or month depend on category to the date
return datesub(date, number)
Substruct number of date or month depend on category to the date
return datediff(date1, date2)
Difference of between date1 and date2 in days
return date_format(date)
Format the date to YYYY-MM-DD
return date