Loading lesson path
The Temporal.PlainDate Object
Temporal.PlainDate object represents a calendar date without a time. A Temporal.PlainDate is typically in ISO 8601 format (
Formula
2026 - 05 - 01). It is easier to use and safer to compare than DateTime objects for dates that are the same regardless of time zone, such as birthdays and holidays.
How to use JavaScript Temporal.PlainDate
An PlainDateTime object can be created in several different ways:
Constructor (new) new Temporal.PlainDate()
Temporal.PlainDate.from() Now (current time) Temporal.Now.plainDateISO()
PlainDate object using the new constructor. The constructor takes year, month, and day parameters.
// Create a PlainDate object const date = new Temporal.PlainDate(2026, 5, 17);Temporal.PlainDate() method above:
(year, month, day). Returns a calendar date without a time like
Formula
2026 - 05 - 17.JavaScript Date, Temporal months start at 1.
Formula
ISO 8601 / RFC 9557 string.// Create a PlainDate object const date = Temporal.PlainDate.from("2026-05-17");The input is parsed using ISO 8601 parsing rules ISO 8601 accepts strings like "
Formula
2026 - 05 - 01" Parsing means validation pluss automatic conversion.
PlainDate object from an object.