<commit_before><?php

class myDateValidator extends sfValidator
{
  public function execute (&$value, &$error)
  {
    $error = $this->getParameter('date_error');

    if (!checkdate($value['month'], $value['day'], $value['year']))
      return false;

    $today = date("Ymd");
    $outing_date = $value['year'].$value['month'].$value['day'];

    return $outing_date <= $today;
  }<commit_msg>properly handle month and days <10 in Date validator<commit_after><?php

class myDateValidator extends sfValidator
{
  public function execute (&$value, &$error)
  {
    $error = $this->getParameter('date_error');

    if (!checkdate($value['month'], $value['day'], $value['year']))
      return false;

    $today = date("Ymd");
    $outing_date = date("Ymd", mktime(0, 0, 0, $value['month'], $value['day'], $value['year']));

    return $outing_date <= $today;
  }
{'fraction_non_alphanumeric': 0.1986062717770035, 'fraction_numerical': 0.005807200929152149, 'mean_word_length': 4.633986928104576, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 5, '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': '4881451', 'n_tokens_mistral': 287, 'n_tokens_neox': 271, 'n_words': 64}