<commit_before><?php

/**
 * This class defines a 30 day widget containing information for a given month.
 * 
 */

require_once 'UNL/UCBCN.php';
require_once 'Calendar/Calendar.php';
require_once 'Calendar/Month/Weekdays.php';
require_once 'Calendar/Util/Textual.php';

class UNL_UCBCN_MonthWidget extends UNL_UCBCN
{	

	var $year;
	var $month;
	var $caption;
	var $thead;
	var $tfoot;
	var $tbody;
	
	/**
	 * This function constructs the month widget and populates the heading,
	 * caption, footer and body for the MonthWidget.
	 * 
	 * @param int $y Year
	 * @param int $m Month
	 */
	function __construct($y,$m)
	{
		$this->year = $y;
		$this->month = $m;
		$this->table = '';
		$Month = new Calendar_Month_Weekdays($y, $m);
		$PMonth = $Month->prevMonth('object'); // Get previous month as object
		$prev = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&amp;m='.$PMonth->thisMonth().'&amp;d='.$PMonth->thisDay();
		$NMonth = $Month->nextMonth('object');
		$next = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&amp;m='.$NMonth->thisMonth().'&amp;d='.$NMonth->thisDay();
		
		$this->tfoot = 
			'<tr>
				<td abbr="'.Calendar_Util_Textual::thisMonthName($PMonth).'" colspan="3" id="prev">
						<a href="'.$prev.'" title="View events for '.Calendar_Util_Textual::thisMonthName($PMonth).' '.$PMonth->thisYear().'"><< </a></td>
				<td class="pad"> </td>
				<td abbr="'.Calendar_Util_Textual::thisMonthName($NMonth).'" colspan="3" id="next" class="pad">
						<a href="'.$next.'" title="View events for '.Calendar_Util_Textual::thisMonthName($NMonth).' '.$NMonth->thisYear().'"> >></a>
				</td>
			</tr>';
		
		$this->caption = Calendar_Util_Textual::thisMonthName($Month).' '.$Month->thisYear();
		
		//Determine selected days
		$selectedDays = array();
		$Month->build($selectedDays);
		
		while ( $Day = $Month->fetch() ) {
	<commit_msg>Added some comments<commit_after><?php

/**
 * This class defines a 30 day widget containing information for a given month.
 * 
 * 
 * @package UNL_UCBCN_Frontend
 * @author bbieber
 */

require_once 'UNL/UCBCN.php';
require_once 'Calendar/Calendar.php';
require_once 'Calendar/Month/Weekdays.php';
require_once 'Calendar/Util/Textual.php';

class UNL_UCBCN_MonthWidget extends UNL_UCBCN
{	

	/** Year for this month widget */
	var $year;
	/** Month for this month widget. */
	var $month;
	/** Caption for the month widget. */
	var $caption;
	
	var $thead;
	var $tfoot;
	var $tbody;
	
	/**
	 * This function constructs the month widget and populates the heading,
	 * caption, footer and body for the MonthWidget.
	 * 
	 * @param int $y Year
	 * @param int $m Month
	 */
	function __construct($y,$m)
	{
		$this->year = $y;
		$this->month = $m;
		$Month = new Calendar_Month_Weekdays($y, $m);
		$PMonth = $Month->prevMonth('object'); // Get previous month as object
		$prev = $_SERVER['PHP_SELF'].'?y='.$PMonth->thisYear().'&amp;m='.$PMonth->thisMonth().'&amp;d='.$PMonth->thisDay();
		$NMonth = $Month->nextMonth('object');
		$next = $_SERVER['PHP_SELF'].'?y='.$NMonth->thisYear().'&amp;m='.$NMonth->thisMonth().'&amp;d='.$NMonth->thisDay();
		
		$this->tfoot = 
			'<tr>
				<td abbr="'.Calendar_Util_Textual::thisMonthName($PMonth).'" colspan="3" id="prev">
						<a href="'.$prev.'" title="View events for '.Calendar_Util_Textual::thisMonthName($PMonth).' '.$PMonth->thisYear().'"><< </a></td>
				<td class="pad"> </td>
				<td abbr="'.Calendar_Util_Textual::thisMonthName($NMonth).'" colspan="3" id="next" class="pad">
						<a href="'.$next.'" title="View events for '.Calendar_Util_Textual::thisMonthName($NMonth).' '.$NMonth->thisYear().'"> >></a>
				</td>
			</tr>';
		
		$this->caption = Calendar_Util_Textual::thisMonthName($Month).' '.$Month->thisYear();
		
		//Determine selected days
		$selectedDays = array();
		$Month->build($selectedDays);
		
		while ( $Day = $Month->fetch() ) {
	
{'fraction_non_alphanumeric': 0.2067620286085826, 'fraction_numerical': 0.002080624187256177, 'mean_word_length': 4.2684931506849315, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 66, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2097629', 'n_tokens_mistral': 1494, 'n_tokens_neox': 1352, 'n_words': 282}