<commit_before>{php}
include("lib/class_calendar.php");
//if(!isset($_SESSION["thedate"])) {
  $date = $tikilib->get_site_date(date('U'), $user);
print get_class($date);
print_r(get_class_methods(get_class($date)));

#  $day = $date->getDay();
#  $mon = $date->getMonth();
#  $year = $date->getYear();
//}
//if(isset($_SESSION["thedate"])) {
//  $day=date("d",$_SESSION["thedate"]);
//  $mon=date("m",$_SESSION["thedate"]);
//  $year=date("Y",$_SESSION["thedate"]);
//}
if(isset($_REQUEST["day"])) {
 $day = $_REQUEST["day"];
}
if(isset($_REQUEST["mon"])) {
 $mon = $_REQUEST["mon"];
}
if(isset($_REQUEST["year"])) {
 $year = $_REQUEST["year"];
}

$thedate = $tikilib->make_time(23, 59, 59, $mon, $day, $year,
  $tikilib->get_display_timezone($user));

#$thedate = $tikilib->mktime(23,59,59,$mon,$day,$year);
$_SESSION["thedate"] = $thedate;
// Calculate number of days in month
// The format is S M T W T F S
$c=new Calendar("en");
$v=substr($c->nameOfMonth($mon),0,3);
$dayofweek=$c->dayOfWeekStr($day,$mon,$year);


$parsed=parse_url($_SERVER["REQUEST_URI"]);
if(!isset($parsed["query"])) {
  $parsed["query"]='';
}
parse_str($parsed["query"],$query);
unset($query["day"]);
unset($query["mon"]);
unset($query["year"]);
$father=httpPrefix().$parsed["path"];
if(count($query)>0) {
  $first=1;
  foreach($query as $name => $val) {
    if($first) {
      $first=false;
      $father.='?'.$name.'='.$val;
    } else {
      $father.='&amp;'.$name.'='.$val;
    }
  }
  $father.='&amp;';
} else {<commit_msg>Removed unfinished code that should not have been checked in the first place!<commit_after>{php}
include("lib/class_calendar.php");
//if(!isset($_SESSION["thedate"])) {
  $day = date("d");
  $mon = date("m");
  $year = date("Y");
//}
//if(isset($_SESSION["thedate"])) {
//  $day=date("d",$_SESSION["thedate"]);
//  $mon=date("m",$_SESSION["thedate"]);
//  $year=date("Y",$_SESSION["thedate"]);
//}
if(isset($_REQUEST["day"])) {
 $day = $_REQUEST["day"];
}
if(isset($_REQUEST["mon"])) {
 $mon = $_REQUEST["mon"];
}
if(isset($_REQUEST["year"])) {
 $year = $_REQUEST["year"];
}

$thedate = mktime(23,59,59,$mon,$day,$year);
$_SESSION["thedate"] = $thedate;
// Calculate number of days in month
// The format is S M T W T F S
$c=new Calendar("en");
$v=substr($c->nameOfMonth($mon),0,3);
$dayofweek=$c->dayOfWeekStr($day,$mon,$year);


$parsed=parse_url($_SERVER["REQUEST_URI"]);
if(!isset($parsed["query"])) {
  $parsed["query"]='';
}
parse_str($parsed["query"],$query);
unset($query["day"]);
unset($query["mon"]);
unset($query["year"]);
$father=httpPrefix().$parsed["path"];
if(count($query)>0) {
  $first=1;
  foreach($query as $name => $val) {
    if($first) {
      $first=false;
      $father.='?'.$name.'='.$val;
    } else {
      $father.='&amp;'.$name.'='.$val;
    }
  }
  $father.='&amp;';
} else {
{'fraction_non_alphanumeric': 0.2846975088967972, 'fraction_numerical': 0.009252669039145907, 'mean_word_length': 5.72488038277512, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, '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': '1061713', 'n_tokens_mistral': 1124, 'n_tokens_neox': 1117, 'n_words': 160}