Script Loader: Pass startOfWeek setting to @wordpress/date

Allows the block editor to respect the site's Week Starts On setting by defining
`i10n.startOfWeek` when initialising the `@wordpress/date` module.

This is a backport of https://github.com/WordPress/gutenberg/pull/41648.

See #56467.
Props andrewserong.


git-svn-id: https://develop.svn.wordpress.org/trunk@54079 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Robert Anderson 2022-09-06 02:50:35 +00:00
parent 225b6cbe78
commit bb0cbe3f55

View File

@ -404,6 +404,7 @@ function wp_default_packages_inline_scripts( $scripts ) {
/* translators: %s: Duration. */
'past' => __( '%s ago' ),
),
'startOfWeek' => (int) get_option( 'start_of_week', 0 ),
),
'formats' => array(
/* translators: Time format, see https://www.php.net/manual/datetime.format.php */