/** * Check if date is "today" * * @access public * @param object ilDateTime DateTime object to check * @return bool * @static */ public static function isToday(ilDateTime $date) { global $ilUser; if (!is_object(self::$today)) { self::$today = new ilDateTime(time(), IL_CAL_UNIX, $ilUser->getTimeZone()); } return ilDateTime::_equals(self::$today, $date, IL_CAL_DAY, $ilUser->getTimeZone()); }