Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The Temporal.PlainDateTime.compare()
static method returns a number (-1, 0, or 1) indicating whether the first date-time comes before, is the same as, or comes after the second date-time. Equivalent to first comparing their dates, then comparing their times if the dates are the same.