Php 是否将获取当前日期添加到此脚本?

Php 是否将获取当前日期添加到此脚本?,php,plugins,Php,Plugins,我正在使用这个名为showtime的插件。我喜欢,但有一个问题,我想打电话给当天的日程安排。这个插件的某些部分调用了短代码来获取所有的日期和日程安排 我应该在下面的代码中添加什么来确保它获得当天的日程安排 function showtime_schedule_handler($atts, $content=null, $code=""){ global $wpdb; global $showtimeTable; //Get the current schedule, divided into

我正在使用这个名为showtime的插件。我喜欢,但有一个问题,我想打电话给当天的日程安排。这个插件的某些部分调用了短代码来获取所有的日期和日程安排

我应该在下面的代码中添加什么来确保它获得当天的日程安排

function showtime_schedule_handler($atts, $content=null, $code=""){

global $wpdb;
global $showtimeTable;

//Get the current schedule, divided into days
$daysOfTheWeek = array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");

$schedule = array();

$output = '';

foreach ($daysOfTheWeek as $day) {
    //Add this day's shows HTML to the $output array
    $showsForThisDay =  $wpdb->get_results( $wpdb->prepare ( "SELECT * FROM $showtimeTable WHERE dayOfTheWeek = '$day' ORDER BY startTime" ));

我想用时间函数来解决

<?php
$nextWeek = time() + (7 * 24 * 60 * 60);
                   // 7 days; 24 hours; 60 mins; 60secs
echo 'Now:       '. date('Y-m-d') ."\n";
echo 'Next Week: '. date('Y-m-d', $nextWeek) ."\n";
// or using strtotime():
echo 'Next Week: '. date('Y-m-d', strtotime('+1 week')) ."\n";
?>

上面的示例将输出类似于:

现在:2005-03-30 下周:2005-04-06
下周:2005-04-06

我不希望它说下周,我希望它只显示当天的日历