[Home]  > Snippets  > Languages  > JavaScript  > Date Time

Languages » JavaScript » Date Time (Other)

  • Add AM PM suffix to an hour
  • Calculate the number of difference days between two dates
  • Calculate the number of months between two dates
  • Compare two dates
  • Convert a date to YYYY-MM-DD format
  • Convert seconds to hh:mm:ss format
  • Determine one year from now
  • Extract year, month, day, hour, minute, second and millisecond from a date
  • Format a date for the given locale
  • Get the hours and minutes from the decimal time
  • Get the current quarter of a date
  • Get the current timestamp in seconds
  • Get the day of the year from a date
  • Get the first date in the month of a date
  • Get the last date in the month of a date
  • Get the month name of a date
  • Get the number of days in given month
  • Get the timezone string
  • Get the tomorrow date
  • Get the total number of days in a year
  • Get the weekday of a date
  • Get the yesterday date
  • Initialize the current date but set time to midnight
  • Sort an array of dates
Repo

    Repo: github.com/mrpotatoes

    Code & Repo orginally Phước Nguyễn's 1loc's code/repo

About
©- Anahi LibreSinn. All rights reserved.

Home

Eleventy
    • Website Generator: Eleventy