is_new_day

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

(int) is_new_day(); 

Returns (int)

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


Usage

  1. if ( !function_exists( 'is_new_day' ) ) { 
  2. require_once ABSPATH . WPINC . '/functions.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = is_new_day(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/functions.php  
  1. function is_new_day() { 
  2. global $currentday, $previousday; 
  3. if ( $currentday != $previousday ) 
  4. return 1; 
  5. else 
  6. return 0;