Created
September 4, 2013 19:41
-
-
Save Ahrengot/6441842 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$first_date = "{event_last_date format="%Y%m%d"}"; | |
$next_week = date( "Ymd", strtotime( "+1 Sunday 23:59" ) ); | |
$today = date( "Ymd", strtotime( "now" ) ); | |
echo "<p>First date: " . $first_date . "<br>"; | |
echo "next_week: " . $next_week . "<br>"; | |
echo "today: " . $today . "</p>"; | |
if ( | |
intVal( $today ) <= intVal( $first_date ) | |
AND intVal( $first_date ) <= intVal( $next_week ) | |
) { | |
echo '<p>Add this class</p>'; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment