@wordpress/date
Advanced tools
Comparing version 4.1.1 to 4.2.0
@@ -21,5 +21,5 @@ /** | ||
* @typedef FormatsConfig | ||
* @property {string} time Time format. | ||
* @property {string} date Date format. | ||
* @property {string} datetime Datetime format. | ||
* @property {string} time Time format. | ||
* @property {string} date Date format. | ||
* @property {string} datetime Datetime format. | ||
* @property {string} datetimeAbbreviated Abbreviated datetime format. | ||
@@ -32,3 +32,3 @@ */ | ||
* @property {string} string The timezone as a string (e.g., `'America/Los_Angeles'`). | ||
* @property {string} abbr Abbreviation for the timezone. | ||
* @property {string} abbr Abbreviation for the timezone. | ||
*/ | ||
@@ -40,9 +40,9 @@ | ||
* @typedef L10nSettings | ||
* @property {string} locale Moment locale. | ||
* @property {MomentLocaleSpecification['months']} months Locale months. | ||
* @property {MomentLocaleSpecification['monthsShort']} monthsShort Locale months short. | ||
* @property {MomentLocaleSpecification['weekdays']} weekdays Locale weekdays. | ||
* @property {string} locale Moment locale. | ||
* @property {MomentLocaleSpecification['months']} months Locale months. | ||
* @property {MomentLocaleSpecification['monthsShort']} monthsShort Locale months short. | ||
* @property {MomentLocaleSpecification['weekdays']} weekdays Locale weekdays. | ||
* @property {MomentLocaleSpecification['weekdaysShort']} weekdaysShort Locale weekdays short. | ||
* @property {MeridiemConfig} meridiem Meridiem config. | ||
* @property {MomentLocaleSpecification['relativeTime']} relative Relative time config. | ||
* @property {MeridiemConfig} meridiem Meridiem config. | ||
* @property {MomentLocaleSpecification['relativeTime']} relative Relative time config. | ||
*/ | ||
@@ -54,4 +54,4 @@ | ||
* @typedef DateSettings | ||
* @property {L10nSettings} l10n Localization settings. | ||
* @property {FormatsConfig} formats Date/time formats config. | ||
* @property {L10nSettings} l10n Localization settings. | ||
* @property {FormatsConfig} formats Date/time formats config. | ||
* @property {TimezoneConfig} timezone Timezone settings. | ||
@@ -347,6 +347,6 @@ */ | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, | ||
* parsable by moment.js. | ||
* parsable by moment.js. | ||
* | ||
@@ -395,9 +395,9 @@ * @return {string} Formatted date. | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable | ||
* by moment.js. | ||
* @param {string | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. | ||
* by moment.js. | ||
* @param {string | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. | ||
* | ||
@@ -417,6 +417,6 @@ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, | ||
* parsable by moment.js. | ||
* parsable by moment.js. | ||
* | ||
@@ -436,11 +436,11 @@ * @return {string} Formatted date in English. | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable by | ||
* moment.js. | ||
* @param {string | boolean | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. Notice: `boolean` is effectively | ||
* deprecated, but still supported for | ||
* backward compatibility reasons. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable by | ||
* moment.js. | ||
* @param {string | boolean | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. Notice: `boolean` is effectively | ||
* deprecated, but still supported for | ||
* backward compatibility reasons. | ||
* | ||
@@ -470,6 +470,6 @@ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, | ||
* parsable by moment.js. | ||
* parsable by moment.js. | ||
* | ||
@@ -516,6 +516,6 @@ * @return {string} Formatted date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable | ||
* by moment.js. | ||
* @param {string | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. | ||
* by moment.js. | ||
* @param {string | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. | ||
* | ||
@@ -522,0 +522,0 @@ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones |
@@ -16,6 +16,6 @@ /** | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, | ||
* parsable by moment.js. | ||
* parsable by moment.js. | ||
* | ||
@@ -28,9 +28,9 @@ * @return {string} Formatted date. | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable | ||
* by moment.js. | ||
* @param {string | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. | ||
* by moment.js. | ||
* @param {string | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. | ||
* | ||
@@ -46,6 +46,6 @@ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, | ||
* parsable by moment.js. | ||
* parsable by moment.js. | ||
* | ||
@@ -61,11 +61,11 @@ * @return {string} Formatted date in English. | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable by | ||
* moment.js. | ||
* @param {string | boolean | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. Notice: `boolean` is effectively | ||
* deprecated, but still supported for | ||
* backward compatibility reasons. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable by | ||
* moment.js. | ||
* @param {string | boolean | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. Notice: `boolean` is effectively | ||
* deprecated, but still supported for | ||
* backward compatibility reasons. | ||
* | ||
@@ -82,6 +82,6 @@ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, | ||
* parsable by moment.js. | ||
* parsable by moment.js. | ||
* | ||
@@ -88,0 +88,0 @@ * @return {string} Formatted date. |
@@ -42,5 +42,5 @@ "use strict"; | ||
* @typedef FormatsConfig | ||
* @property {string} time Time format. | ||
* @property {string} date Date format. | ||
* @property {string} datetime Datetime format. | ||
* @property {string} time Time format. | ||
* @property {string} date Date format. | ||
* @property {string} datetime Datetime format. | ||
* @property {string} datetimeAbbreviated Abbreviated datetime format. | ||
@@ -53,3 +53,3 @@ */ | ||
* @property {string} string The timezone as a string (e.g., `'America/Los_Angeles'`). | ||
* @property {string} abbr Abbreviation for the timezone. | ||
* @property {string} abbr Abbreviation for the timezone. | ||
*/ | ||
@@ -61,9 +61,9 @@ | ||
* @typedef L10nSettings | ||
* @property {string} locale Moment locale. | ||
* @property {MomentLocaleSpecification['months']} months Locale months. | ||
* @property {MomentLocaleSpecification['monthsShort']} monthsShort Locale months short. | ||
* @property {MomentLocaleSpecification['weekdays']} weekdays Locale weekdays. | ||
* @property {string} locale Moment locale. | ||
* @property {MomentLocaleSpecification['months']} months Locale months. | ||
* @property {MomentLocaleSpecification['monthsShort']} monthsShort Locale months short. | ||
* @property {MomentLocaleSpecification['weekdays']} weekdays Locale weekdays. | ||
* @property {MomentLocaleSpecification['weekdaysShort']} weekdaysShort Locale weekdays short. | ||
* @property {MeridiemConfig} meridiem Meridiem config. | ||
* @property {MomentLocaleSpecification['relativeTime']} relative Relative time config. | ||
* @property {MeridiemConfig} meridiem Meridiem config. | ||
* @property {MomentLocaleSpecification['relativeTime']} relative Relative time config. | ||
*/ | ||
@@ -75,4 +75,4 @@ | ||
* @typedef DateSettings | ||
* @property {L10nSettings} l10n Localization settings. | ||
* @property {FormatsConfig} formats Date/time formats config. | ||
* @property {L10nSettings} l10n Localization settings. | ||
* @property {FormatsConfig} formats Date/time formats config. | ||
* @property {TimezoneConfig} timezone Timezone settings. | ||
@@ -371,6 +371,6 @@ */ | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, | ||
* parsable by moment.js. | ||
* parsable by moment.js. | ||
* | ||
@@ -419,9 +419,9 @@ * @return {string} Formatted date. | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable | ||
* by moment.js. | ||
* @param {string | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. | ||
* by moment.js. | ||
* @param {string | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. | ||
* | ||
@@ -442,6 +442,6 @@ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, | ||
* parsable by moment.js. | ||
* parsable by moment.js. | ||
* | ||
@@ -462,11 +462,11 @@ * @return {string} Formatted date in English. | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable by | ||
* moment.js. | ||
* @param {string | boolean | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. Notice: `boolean` is effectively | ||
* deprecated, but still supported for | ||
* backward compatibility reasons. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable by | ||
* moment.js. | ||
* @param {string | boolean | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. Notice: `boolean` is effectively | ||
* deprecated, but still supported for | ||
* backward compatibility reasons. | ||
* | ||
@@ -497,6 +497,6 @@ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, | ||
* parsable by moment.js. | ||
* parsable by moment.js. | ||
* | ||
@@ -548,6 +548,6 @@ * @return {string} Formatted date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable | ||
* by moment.js. | ||
* @param {string | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. | ||
* by moment.js. | ||
* @param {string | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. | ||
* | ||
@@ -554,0 +554,0 @@ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones |
@@ -5,2 +5,4 @@ <!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/HEAD/packages#maintaining-changelogs. --> | ||
## 4.2.0 (2021-07-21) | ||
## 4.1.0 (2021-05-20) | ||
@@ -7,0 +9,0 @@ |
{ | ||
"name": "@wordpress/date", | ||
"version": "4.1.1", | ||
"version": "4.2.0", | ||
"description": "Date module for WordPress.", | ||
@@ -36,3 +36,3 @@ "author": "The WordPress Contributors", | ||
}, | ||
"gitHead": "954d6776be2ee80b5975e4ced6a3d481d8a89354" | ||
"gitHead": "743b70f86f1e75fd66a583bf659f2b2fe5daf1cc" | ||
} |
@@ -19,3 +19,3 @@ # Date | ||
<a name="date" href="#date">#</a> **date** | ||
### date | ||
@@ -39,3 +39,3 @@ Formats a date (like `date()` in PHP). | ||
<a name="dateI18n" href="#dateI18n">#</a> **dateI18n** | ||
### dateI18n | ||
@@ -62,3 +62,3 @@ Formats a date (like `wp_date()` in PHP), translating it into site's locale. | ||
<a name="format" href="#format">#</a> **format** | ||
### format | ||
@@ -76,3 +76,3 @@ Formats a date. Does not alter the date's timezone. | ||
<a name="getDate" href="#getDate">#</a> **getDate** | ||
### getDate | ||
@@ -89,3 +89,3 @@ Create and return a JavaScript Date Object from a date string in the WP timezone. | ||
<a name="gmdate" href="#gmdate">#</a> **gmdate** | ||
### gmdate | ||
@@ -103,3 +103,3 @@ Formats a date (like `date()` in PHP), in the UTC timezone. | ||
<a name="gmdateI18n" href="#gmdateI18n">#</a> **gmdateI18n** | ||
### gmdateI18n | ||
@@ -118,3 +118,3 @@ Formats a date (like `wp_date()` in PHP), translating it into site's locale | ||
<a name="isInTheFuture" href="#isInTheFuture">#</a> **isInTheFuture** | ||
### isInTheFuture | ||
@@ -131,3 +131,3 @@ Check whether a date is considered in the future according to the WordPress settings. | ||
<a name="setSettings" href="#setSettings">#</a> **setSettings** | ||
### setSettings | ||
@@ -134,0 +134,0 @@ Adds a locale to moment, using the format supplied by `wp_localize_script()`. |
@@ -21,5 +21,5 @@ /** | ||
* @typedef FormatsConfig | ||
* @property {string} time Time format. | ||
* @property {string} date Date format. | ||
* @property {string} datetime Datetime format. | ||
* @property {string} time Time format. | ||
* @property {string} date Date format. | ||
* @property {string} datetime Datetime format. | ||
* @property {string} datetimeAbbreviated Abbreviated datetime format. | ||
@@ -32,3 +32,3 @@ */ | ||
* @property {string} string The timezone as a string (e.g., `'America/Los_Angeles'`). | ||
* @property {string} abbr Abbreviation for the timezone. | ||
* @property {string} abbr Abbreviation for the timezone. | ||
*/ | ||
@@ -39,9 +39,9 @@ | ||
* @typedef L10nSettings | ||
* @property {string} locale Moment locale. | ||
* @property {MomentLocaleSpecification['months']} months Locale months. | ||
* @property {MomentLocaleSpecification['monthsShort']} monthsShort Locale months short. | ||
* @property {MomentLocaleSpecification['weekdays']} weekdays Locale weekdays. | ||
* @property {string} locale Moment locale. | ||
* @property {MomentLocaleSpecification['months']} months Locale months. | ||
* @property {MomentLocaleSpecification['monthsShort']} monthsShort Locale months short. | ||
* @property {MomentLocaleSpecification['weekdays']} weekdays Locale weekdays. | ||
* @property {MomentLocaleSpecification['weekdaysShort']} weekdaysShort Locale weekdays short. | ||
* @property {MeridiemConfig} meridiem Meridiem config. | ||
* @property {MomentLocaleSpecification['relativeTime']} relative Relative time config. | ||
* @property {MeridiemConfig} meridiem Meridiem config. | ||
* @property {MomentLocaleSpecification['relativeTime']} relative Relative time config. | ||
*/ | ||
@@ -52,4 +52,4 @@ /* eslint-enable jsdoc/valid-types */ | ||
* @typedef DateSettings | ||
* @property {L10nSettings} l10n Localization settings. | ||
* @property {FormatsConfig} formats Date/time formats config. | ||
* @property {L10nSettings} l10n Localization settings. | ||
* @property {FormatsConfig} formats Date/time formats config. | ||
* @property {TimezoneConfig} timezone Timezone settings. | ||
@@ -380,6 +380,6 @@ */ | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, | ||
* parsable by moment.js. | ||
* parsable by moment.js. | ||
* | ||
@@ -423,9 +423,9 @@ * @return {string} Formatted date. | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable | ||
* by moment.js. | ||
* @param {string | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. | ||
* by moment.js. | ||
* @param {string | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. | ||
* | ||
@@ -445,6 +445,6 @@ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, | ||
* parsable by moment.js. | ||
* parsable by moment.js. | ||
* | ||
@@ -464,11 +464,11 @@ * @return {string} Formatted date in English. | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable by | ||
* moment.js. | ||
* @param {string | boolean | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. Notice: `boolean` is effectively | ||
* deprecated, but still supported for | ||
* backward compatibility reasons. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable by | ||
* moment.js. | ||
* @param {string | boolean | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. Notice: `boolean` is effectively | ||
* deprecated, but still supported for | ||
* backward compatibility reasons. | ||
* | ||
@@ -498,6 +498,6 @@ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones | ||
* | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {string} dateFormat PHP-style formatting string. | ||
* See php.net/date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, | ||
* parsable by moment.js. | ||
* parsable by moment.js. | ||
* | ||
@@ -545,6 +545,6 @@ * @return {string} Formatted date. | ||
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable | ||
* by moment.js. | ||
* @param {string | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. | ||
* by moment.js. | ||
* @param {string | undefined} timezone Timezone to output result in or a | ||
* UTC offset. Defaults to timezone from | ||
* site. | ||
* | ||
@@ -551,0 +551,0 @@ * @see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
187996