How to use the @wordpress/date.getDate function in @wordpress/date

To help you get started, we’ve selected a few @wordpress/date examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github WordPress / gutenberg / packages / editor / src / store / selectors.js View on Github external
export function isEditedPostBeingScheduled( state ) {
	const date = getEditedPostAttribute( state, 'date' );
	// Offset the date by one minute (network latency)
	const checkedDate = new Date( Number( getDate( date ) ) - ONE_MINUTE_IN_MS );

	return isInTheFuture( checkedDate );
}