<commit_before><?php

namespace FSB\ASTT\FrontBundle\Resources\Classes;

use FSB\ASTT\CoreBundle\Entity\Event;

class EventsCalendar
{
    private $_em;
    private $name;
    private $nbDays;
    private $startDay;
    private $events;
    private static $monthsNames = array(
        '01' => 'Janvier',
        '02' => 'Février',
        '03' => 'Mars',
        '04' => 'Avril',
        '05' => 'Mai',
        '06' => 'Juin',
        '07' => 'Juillet',
        '08' => 'Août',
        '09' => 'Septembre',
        '10' => 'Octobre',
        '11' => 'Novembre',
        '12' => 'Décembre',
    );
    
    public function __construct($doctrine = NULL, \DateTime $datetime = NULL)
    {
        if (!$datetime) {
            $datetime = new \DateTime();
        }
        
        $this->_em = $doctrine->getEntityManager();
        
        $datetime->setTimestamp(1327445999);
        
        $time = $datetime->getTimestamp();
        
        
        $this->name = self::$monthsNames[date('m', $time)].' '.date('Y', $time);
        $this->startDay = date('N', mktime(0, 0, 0, date('m', $time), 1, date('Y', $time)));
        $this->nbDays = date('t', $time);
        
        // boucler sur le nombre de jours
        $semaine = 0;
        
        if ($this->startDay != 1) {
            for ($i = 1; $i < $this->startDay; $i++) {
                $this->events[$semaine][($i - $this->startDay + 1)] = date('d', mktime(0, 0, 0, date('m', $time), ($i - $this->startDay + 1), date('Y', $time)));
            }
        }
        <commit_msg>Calendars<commit_after><?php

namespace FSB\ASTT\FrontBundle\Resources\Classes;

use FSB\ASTT\CoreBundle\Entity\Event;

class EventsCalendar
{
    private $_em;
    private $name;
    private $nbDays;
    private $startDay;
    private $events;
    private static $monthsNames = array(
        '01' => 'Janvier',
        '02' => 'Février',
        '03' => 'Mars',
        '04' => 'Avril',
        '05' => 'Mai',
        '06' => 'Juin',
        '07' => 'Juillet',
        '08' => 'Août',
        '09' => 'Septembre',
        '10' => 'Octobre',
        '11' => 'Novembre',
        '12' => 'Décembre',
    );
    
    public function __construct($doctrine = NULL, \DateTime $datetime = NULL)
    {
        if (!$datetime) {
            $datetime = new \DateTime();
        }
        
        $this->_em = $doctrine->getEntityManager();
        
        $time = $datetime->getTimestamp();
        
        
        $this->name = self::$monthsNames[date('m', $time)].' '.date('Y', $time);
        $this->startDay = date('N', mktime(0, 0, 0, date('m', $time), 1, date('Y', $time)));
        $this->nbDays = date('t', $time);
        
        // boucler sur le nombre de jours
        $semaine = 0;
        
        if ($this->startDay != 1) {
            for ($i = 1; $i < $this->startDay; $i++) {
                $this->events[$semaine][($i - $this->startDay + 1)] = date('d', mktime(0, 0, 0, date('m', $time), ($i - $this->startDay + 1), date('Y', $time)));
            }
        }
        
{'fraction_non_alphanumeric': 0.2, 'fraction_numerical': 0.02706270627062706, 'mean_word_length': 1.8648393194706994, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 50, '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': '826988', 'n_tokens_mistral': 1080, 'n_tokens_neox': 1031, 'n_words': 221}