Make WordPress Core

Changeset 46958


Ignore:
Timestamp:
12/13/2019 09:43:06 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Docs: Clarify descriptions for get_gmt_from_date() and get_date_from_gmt().

Props johnbillion, Rarst.
Fixes #48650.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/formatting.php

    r46896 r46958  
    34983498
    34993499/**
    3500  * Returns a date in the GMT equivalent.
     3500 * Given a date in the timezone of the site, returns that date in UTC timezone.
    35013501 *
    35023502 * Requires and returns a date in the Y-m-d H:i:s format.
     
    35053505 * @since 1.2.0
    35063506 *
    3507  * @param string $string The date to be converted.
     3507 * @param string $string The date to be converted, in the timezone of the site.
    35083508 * @param string $format The format string for the returned date. Default 'Y-m-d H:i:s'.
    3509  * @return string GMT version of the date provided.
     3509 * @return string Formatted version of the date, in UTC timezone.
    35103510 */
    35113511function get_gmt_from_date( $string, $format = 'Y-m-d H:i:s' ) {
     
    35203520
    35213521/**
    3522  * Converts a GMT date into the correct format for the blog.
     3522 * Given a date in UTC timezone, returns that date in the timezone of the site.
    35233523 *
    35243524 * Requires and returns a date in the Y-m-d H:i:s format.
     
    35273527 * @since 1.2.0
    35283528 *
    3529  * @param string $string The date to be converted.
     3529 * @param string $string The date to be converted, in UTC timezone.
    35303530 * @param string $format The format string for the returned date. Default 'Y-m-d H:i:s'.
    3531  * @return string Formatted date relative to the timezone.
     3531 * @return string Formatted version of the date, in the site's timezone.
    35323532 */
    35333533function get_date_from_gmt( $string, $format = 'Y-m-d H:i:s' ) {
Note: See TracChangeset for help on using the changeset viewer.