Skip to content

OlgaTsuban/Birthday_Greeter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Birthday Greeter

This name reflects the main purpose of the program, which is to greet colleagues with upcoming birthdays during the week.

Why we have 2 files?

File main2.py has better code style(I recommend you to use it), but main.py is working too

What this project can do ?

Here is an implementation of the program to display a list of colleagues who need to be greeted with their upcoming birthdays during the week.

Details about the program ?

You have a list of dictionaries called "users," where each dictionary must have the keys "name" and "birthday." This structure represents a model of a user list with their names and birth dates. Where "name" is a string with the user's name, and "birthday" is a datetime.date object containing the birth date.

For example: {"name": "Bob", "birthday": datetime.datetime(1995, 9, 30)},

The project has a function called "get_birthdays_per_week" that takes the "users" list as input and returns a dictionary of users who need to be greeted by their birthdays on the upcoming week. What does this mean? You get days from Monday till Friday and the names of your friends

For example: Monday: Bob

If the birthday is on weekend, program accurately considers weekends and shift them to Monday.

How to use?

  1. First of all you should clone the repository, you can use:
  2. git clone https://github.com/OlgaTsuban/Birthday-Greeter.git

  3. You can write this for MacOS python3 main.py

    You can write this for Windows python main.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages