Date of tomorrow

JavaScript, Date · Oct 22, 2020

Results in a string representation of tomorrow's date.

const tomorrow = () => {
  let d = new Date();
  d.setDate(d.getDate() + 1);
  return d.toISOString().split('T')[0];
};
tomorrow(); // 2018-10-19 (if current date is 2018-10-18)

More like this

  • Date of yesterday

    Results in a string representation of yesterday's date.

    JavaScript, Date · Oct 22, 2020

  • Last date of month

    Returns the string representation of the last date in the given date's month.

    JavaScript, Date · Oct 9, 2020

  • Number of seconds to ISO format

    Returns the ISO format of the given number of seconds.

    JavaScript, Date · Oct 13, 2021