date_helper

Creator: coderz1093

Last updated:

0 purchases

date_helper Image
date_helper Images

Languages

Categories

Add to Cart

Description:

date helper

date_helper #
Provide a set of utils and helper methods to deal with dates. This is an extension for embedded DateTime library so you can use this methods in every DateTime instance
Features #
Day Start #
Returns the start (midnight) of the date
new DateTime().dayStart //2021-05-21 00:00
copied to clipboard
Day End #
Returns the end (11:59PM) of the date
new DateTime().dayEnd //2021-05-21 23:59
copied to clipboard
AM #
Determine if the date is AM
new DateTime().isAM //true if hour is beetween 12AM and 11:59AM
copied to clipboard
PM #
Determine if the date is PM
new DateTime().isPM //true if hour is beetween 12PM and 11:59PM
copied to clipboard
Tomorrow #
Returns the day after of the date
new DateTime().tomorrow //2021-05-21 => 2021-05-22
copied to clipboard
Yesterday #
Returns the day before the date
new DateTime().yesterday //2021-05-21 => 2021-05-20
copied to clipboard
Following #
Returns the following specified weekday
new DateTime().following(DateTime.monday) //Since 2021-05-21 is Friday => 2021-05-24
copied to clipboard
Previous #
Returns the previous specified weekday
new DateTime().previous(DateTime.monday) //Since 2021-05-21 is Friday => 2021-05-17
copied to clipboard

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.