Skip to content

Commit

Permalink
Added php.net/date links (WordPress#69280)
Browse files Browse the repository at this point in the history
* Added php.net/date links

* Added php.net/date links

Co-authored-by: shail-mehta <[email protected]>
Co-authored-by: t-hamano <[email protected]>
  • Loading branch information
3 people authored Feb 25, 2025
1 parent d181ce4 commit 77da6c2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions packages/date/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ _Related_

_Parameters_

- _dateFormat_ `string`: PHP-style formatting string. See php.net/date.
- _dateFormat_ `string`: PHP-style formatting string. See [php.net/date](https://www.php.net/manual/en/function.date.php).
- _dateValue_ `Moment | Date | string | undefined`: Date object or string, parsable by moment.js.
- _timezone_ `string | number | undefined`: Timezone to output result in or a UTC offset. Defaults to timezone from site.

Expand All @@ -48,7 +48,7 @@ _Related_

_Parameters_

- _dateFormat_ `string`: PHP-style formatting string. See php.net/date.
- _dateFormat_ `string`: PHP-style formatting string. See [php.net/date](https://www.php.net/manual/en/function.date.php).
- _dateValue_ `Moment | Date | string | undefined`: Date object or string, parsable by moment.js.
- _timezone_ `string | number | boolean | undefined=`: 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.

Expand All @@ -62,7 +62,7 @@ Formats a date. Does not alter the date's timezone.

_Parameters_

- _dateFormat_ `string`: PHP-style formatting string. See php.net/date.
- _dateFormat_ `string`: PHP-style formatting string. See [php.net/date](https://www.php.net/manual/en/function.date.php).
- _dateValue_ `Moment | Date | string | undefined`: Date object or string, parsable by moment.js.

_Returns_
Expand Down Expand Up @@ -95,7 +95,7 @@ Formats a date (like `date()` in PHP), in the UTC timezone.

_Parameters_

- _dateFormat_ `string`: PHP-style formatting string. See php.net/date.
- _dateFormat_ `string`: PHP-style formatting string. See [php.net/date](https://www.php.net/manual/en/function.date.php).
- _dateValue_ `Moment | Date | string | undefined`: Date object or string, parsable by moment.js.

_Returns_
Expand All @@ -108,7 +108,7 @@ Formats a date (like `wp_date()` in PHP), translating it into site's locale and

_Parameters_

- _dateFormat_ `string`: PHP-style formatting string. See php.net/date.
- _dateFormat_ `string`: PHP-style formatting string. See [php.net/date](https://www.php.net/manual/en/function.date.php).
- _dateValue_ `Moment | Date | string | undefined`: Date object or string, parsable by moment.js.

_Returns_
Expand Down
10 changes: 5 additions & 5 deletions packages/date/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ const formatMap = {
* Formats a date. Does not alter the date's timezone.
*
* @param {string} dateFormat PHP-style formatting string.
* See php.net/date.
* See [php.net/date](https://www.php.net/manual/en/function.date.php).
* @param {Moment | Date | string | undefined} dateValue Date object or string,
* parsable by moment.js.
*
Expand Down Expand Up @@ -487,7 +487,7 @@ export function format( dateFormat, dateValue = new Date() ) {
* Formats a date (like `date()` in PHP).
*
* @param {string} dateFormat PHP-style formatting string.
* See php.net/date.
* See [php.net/date](https://www.php.net/manual/en/function.date.php).
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable
* by moment.js.
* @param {string | number | undefined} timezone Timezone to output result in or a
Expand All @@ -508,7 +508,7 @@ export function date( dateFormat, dateValue = new Date(), timezone ) {
* Formats a date (like `date()` in PHP), in the UTC timezone.
*
* @param {string} dateFormat PHP-style formatting string.
* See php.net/date.
* See [php.net/date](https://www.php.net/manual/en/function.date.php).
* @param {Moment | Date | string | undefined} dateValue Date object or string,
* parsable by moment.js.
*
Expand All @@ -526,7 +526,7 @@ export function gmdate( dateFormat, dateValue = new Date() ) {
* behaves like `gmdateI18n`.
*
* @param {string} dateFormat PHP-style formatting string.
* See php.net/date.
* See [php.net/date](https://www.php.net/manual/en/function.date.php).
* @param {Moment | Date | string | undefined} dateValue Date object or string, parsable by
* moment.js.
* @param {string | number | boolean | undefined=} timezone Timezone to output result in or a
Expand Down Expand Up @@ -559,7 +559,7 @@ export function dateI18n( dateFormat, dateValue = new Date(), timezone ) {
* and using the UTC timezone.
*
* @param {string} dateFormat PHP-style formatting string.
* See php.net/date.
* See [php.net/date](https://www.php.net/manual/en/function.date.php).
* @param {Moment | Date | string | undefined} dateValue Date object or string,
* parsable by moment.js.
*
Expand Down

0 comments on commit 77da6c2

Please sign in to comment.