<commit_before>



from Year import Year

class Calendar():
    def __init__ (self,firstYear,secondYear):
        self.year1 = Year(firstYear)
        self.year2 = Year(secondYear)
        self.year1.setNext(self.year2)
        self.year2.setPrev(self.year1)

        self.currentDay = self.year1.months[0].days[0]
        self.currentWeek = self.year1.months[0].weeks[0]

    def getCurrentDay(self):
        return self.currentDay

    def getCurrentWeek(self):
        for week in self.currentDay.month.weeks:
            for day in week:
                if day == self.currentDay:
                    return week

    def getCurrentMonth(self):
        return self.currentDay.month

    def getCurrentYear(self):
        return self.currentDay.month.year

    def getMonth(self, monthName, yearName):
        if self.year1.name == yearName:
            y = self.year1
        elif self.year2.name == yearName:
            y = self.year2

        if(y != None):
            return y.getMonth(monthName)
        else:
            return None
<commit_msg>Fix year getter and add doxygen hooks in Calendar.py<commit_after>## @file Calendar.py
# @author Grant
# @brief Your description here
#
# @details Your details here
#
#

from Year import Year

## @class Calendar
# @author
# @brief
#
# @details
#
class Calendar():
    def __init__ (self,firstYear,secondYear):
        self.year1 = Year(firstYear)
        self.year2 = Year(secondYear)
        self.year1.setNext(self.year2)
        self.year2.setPrev(self.year1)

        self.currentDay = self.year1.months[0].days[0]
        self.currentWeek = self.year1.months[0].weeks[0]

    def getCurrentDay(self):
        return self.currentDay

    def getCurrentWeek(self):
        for week in self.currentDay.month.weeks:
            for day in week:
                if day == self.currentDay:
                    return week

    def getCurrentMonth(self):
        return self.currentDay.month

    def getCurrentYear(self):
        if self.currentDay.month.year == self.year1.name:
            return self.year1
        return self.year2

    def getMonth(self, monthName, yearName):
        if self.year1.name == yearName:
            y = self.year1
        elif self.year2.name == yearName:
            y = self.year2

        if(y != None):
            return y.getMonth(monthName)
        else:
            return None

{'fraction_non_alphanumeric': 0.09932659932659933, 'fraction_numerical': 0.014730639730639731, 'mean_word_length': 2.0631443298969074, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1148671', 'n_tokens_mistral': 740, 'n_tokens_neox': 706, 'n_words': 166}