javascript instance method
Temporal.ZonedDateTime.prototype.toPlainDate()
The toPlainDate() method of ZonedDateTime instances returns a new PlainDate object representing the date portion of this date-time.
Syntax
toPlainDate()
Parameters
None.
Return value
A new PlainDate object representing the date portion of this date-time.
Examples
Using toPlainDate()
const zdt = Temporal.ZonedDateTime.from(
"2021-07-01T12:34:56.987654321-04:00[America/New_York]",
);
const plainDate = zdt.toPlainDate();
console.log(plainDate.toString()); // 2021-07-01
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.