The date.toUTCString() method is used to convert the given date object’s contents into a string according to the universal time zone UTC. The date object is created using the date() constructor....
This article will show you how to check whether the given object is a Date or not. There are two methods to check for date objects, which are described below:...
The date.getTimezoneOffset() method is used to return the time difference between Universal Coordinated Time (UTC) and local time, in minutes. If your time zone is GMT+5, -300 (60*5) minutes will be returned. Daylight savings prevent this value from being constant....
Given a date, and the task is to determine the start and end of the day of the date using JavaScript. We’re going to discuss a few methods. These are:...
Given a date object and the task is to add seconds to the date using JavaScript. We will use a few methods to add seconds to the date, that are discussed below:...
Given a date, the task is to increment the given date by using JavaScript. To increment a date in JavaScript, we’re going to discuss a few methods, some of these are:...
Given a date/year and the task is to get the first day of the year using JavaScript....
Given a date, the task is to add days in milliseconds to it using JavaScript. To add days in milliseconds to date objects in JavaScript, some methods are used which are listed below:...
Given the 2 JavaScript dates and the job is to get the relative time difference between them(eg.. 2 hours ago, 2.5 days ago, etc.) Here 2 approaches are discussed with the help of javaScript....
Given a date and the task is to determine if the given date is a weekend (In this case we are considering Saturday as the weekend. There are two methods to solve this problem which are discussed below:...
Given a date and the task is to check whether the given date is less than 1 hour ago or not with the help of JavaScript....
The JavaScript Date getFullYear() Method is used to fetch the year from a given Date object....