Showing posts from August, 2021
How to get current year in JavaScript

How to get current year in JavaScript

Using new Date() object we can get current year.  Steps: Get current date-time using new Date() object. Get year from…

How to get next day date in php

How to get next day date in php

Method 1 :   Use strtotime date('Y-m-d',strtotime('+1 day')); Method 2:  Use  DateTime  Class $date =…

How to get previous day date in php

How to get previous day date in php

Method 1 : Use strtotime date('Y-m-d',strtotime('-1 day')); Method 2: Use DateTime Class $date = new D…