JavaScript Date Methods Guide

  1. getDate(): Get the day from the date.
  2. Get the month from the date.
  3. getFullYear(): Retrieve the year from the date.
  4. getHours(): retrieve the hour from the time
  5. Retrieve the minutes from the time.
  6. getSeconds(): retrieve the seconds from the time
  7. retrieve the milliseconds from the time
  8. getTime(): Obtain the timestamp of a date object.
  9. setDate(): Set the day in the date.
  10. setMonth(): to set the month in a date
  11. setFullYear(): Set the year in the date
  12. setHours(): set the hours in the time.
  13. SetMinutes(): Set the minutes in the time.
  14. setSeconds(): set the seconds in the time.
  15. setMilliseconds(): To adjust the milliseconds in the time.
  16. toDateString(): Convert the date to a string, displaying only the date portion.
  17. Convert the date to a string, displaying only the time part.
  18. toLocaleDateString(): Convert the date to a localized date string.
  19. toLocaleTimeString(): Convert the date to a localized time string
  20. toString(): Converts the date to a string, displaying the complete date and time information.
bannerAds