JavaScript Set Date Methods

Set Date methods let you set date values (years, months, days, hours, minutes, seconds, milliseconds) for a Date Object. Set Date Methods Set Date methods are used for setting a part of a date: Method Description setDate() Set the day as a number (1-31) setFullYear() Set the year (optionally month and day) setHours() Set the […]

JavaScript Date Objects

JavaScript Date Output By default, JavaScript will use the browser’s time zone and display a date as a full text string: Thu Jul 05 2018 12:12:01 GMT+0500 (Pakistan Standard Time) You will learn much more about how to display dates, later in this tutorial. Creating Date Objects Date objects are created with the new Date() constructor. There […]