wppaste
WordPress

is_new_day(): int

Since
0.71
Source
wp-includes/functions.php:1018
Determines whether the publish date of the current post in the loop is different from the publish date of the previous post in the loop.

Description

For more information on this and similar theme functions, check out the <a href="https://developer.wordpress.org/themes/basics/conditional-tags/">https://developer.wordpress.org/themes/basics/conditional-tags/</a> Conditional Tags article in the Theme Developer Handbook.

Return

int
1 when new day, 0 if not a new day.

Used by · 1

  • the_date()Displays or retrieves the date of the post (once per date).

Source

function is_new_day() {	global $currentday, $previousday; 	if ( $currentday !== $previousday ) {		return 1;	} else {		return 0;	}}

History

Introduced in 0.71. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 6.9.7 tag, from src/wp-includes/functions.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.