- Get link
- X
- Other Apps
- Get link
- X
- Other Apps
Math with Dates:
The min() Method:
- The min() method is used to return the smallest date (or item).- The min() method can take two or more arguments.
The max() Method:
- The max() method is used to return the biggest date (or item).- The max() method can take two or more arguments.
In the below code, we subtract two dates in the x variable and we get the total number of days by using the days property in the print function:
- Get link
- X
- Other Apps
Comments
Post a Comment