JavaScript Date toUTCString() Method
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....
read more
How to Check Whether an Object is a Date ?
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:...
read more
JavaScript Date getTimezoneOffset() Method
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....
read more
JavaScript Get the start and end of the day in UTC
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:...
read more
JavaScript Adding seconds to Date object
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:...
read more
JavaScript Increment a given date
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:...
read more
How to get the first day of the year in JavaScript ?
Given a date/year and the task is to get the first day of the year using JavaScript....
read more
JavaScript Adding days in milliseconds to Date object
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:...
read more
Get the relative timestamp difference between dates in JavaScript
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....
read more
How to check if the given date is weekend ?
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:...
read more
How to check if date is less than 1 hour ago using JavaScript ?
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....
read more
JavaScript Date getFullYear() Method
The JavaScript Date getFullYear() Method is used to fetch the year from a given Date object....
read more