<commit_before><commit_msg>add date_to_weekday finder method (#4599)<commit_after>from calendar import day_name
from datetime import datetime


def date_to_weekday(inp_date: str) -> str:
    """
    It returns the day name of the given date string.
    :param inp_date:
    :return: String
    >>> date_to_weekday("7/8/2035")
    'Tuesday'
    >>> date_to_weekday("7/8/2021")
    'Saturday'
    >>> date_to_weekday("1/1/2021")
    'Friday'
    """
    day, month, year = [int(x) for x in inp_date.split("/")]
    if year % 100 == 0:
        year = "00"
    new_base_date: str = f"{day}/{month}/{year%100} 0:0:0"
    date_time_obj: datetime.date = datetime.strptime(new_base_date, "%d/%m/%y %H:%M:%S")
    out_put_day: int = date_time_obj.weekday()
    return day_name[out_put_day]


if __name__ == "__main__":
    print(date_to_weekday("1/1/2021"), end=" ")
{'fraction_non_alphanumeric': 0.15985997666277713, 'fraction_numerical': 0.046674445740956826, 'mean_word_length': 3.588235294117647, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 13, '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': '3186072', 'n_tokens_mistral': 354, 'n_tokens_neox': 328, 'n_words': 69}