Skip to content

Instantly share code, notes, and snippets.

@Ahrengot
Created September 4, 2013 19:41
Show Gist options
  • Save Ahrengot/6441842 to your computer and use it in GitHub Desktop.
Save Ahrengot/6441842 to your computer and use it in GitHub Desktop.
<?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