Add new constant MONTH_IN_SECONDS and expand time convenience documentation.
The "month" isn't really a month. It's a WordPress Month. As the docs make clear, it's not about accuracy as much as it about convenience. This adds a missing step in the time convenience constants. Props egill Fixes #33397 Built from https://develop.svn.wordpress.org/trunk@33698 git-svn-id: http://core.svn.wordpress.org/trunk@33665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0fa7f817c4
commit
ece59bf72a
|
@ -95,12 +95,21 @@ function wp_initial_constants() {
|
|||
// Constants for features added to WP that should short-circuit their plugin implementations
|
||||
define( 'WP_FEATURE_BETTER_PASSWORDS', true );
|
||||
|
||||
// Constants for expressing human-readable intervals
|
||||
// in their respective number of seconds.
|
||||
/**
|
||||
* Constants for expressing human-readable intervals
|
||||
* in their respective number of seconds.
|
||||
*
|
||||
* Please note that these values are approximate and are provided for convenience.
|
||||
* For example, MONTH_IN_SECONDS wrongly assumes every month has 30 days and
|
||||
* YEAR_IN_SECONDS does not take leap years into account.
|
||||
*
|
||||
* If you need more accuracy please consider using the DateTime class (http://php.net/manual/class.datetime.php).
|
||||
*/
|
||||
define( 'MINUTE_IN_SECONDS', 60 );
|
||||
define( 'HOUR_IN_SECONDS', 60 * MINUTE_IN_SECONDS );
|
||||
define( 'DAY_IN_SECONDS', 24 * HOUR_IN_SECONDS );
|
||||
define( 'WEEK_IN_SECONDS', 7 * DAY_IN_SECONDS );
|
||||
define( 'MONTH_IN_SECONDS', 30 * DAY_IN_SECONDS );
|
||||
define( 'YEAR_IN_SECONDS', 365 * DAY_IN_SECONDS );
|
||||
}
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.4-alpha-33697';
|
||||
$wp_version = '4.4-alpha-33698';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue