I was helping a friend with his project. Actually, he lured me to do it for him in exchange for a treat. After the completion of sudoku, I wanted to make something simpler that added to our daily productivity. It was then that I came up with my next project idea of a calendar/planner application .Nevertheless, the question remains where do we start??
We would start at setting up the basic edit text widgets grid to show dates and events. The reason we chose edit text over normal text widget is as it gives me more control over text formatting. Better text formatting and picture options makes the visual aspect more vibrant and upgradeable. This project doesn’t involve complex calculations as compared to sudoku but required specific hacks to calculate corresponding day to a given date.
What day’s today ???
The most obvious method is to calculate current day from a reference point. One of the most famous reference points would be 1 JAN 2001 which is a Monday(It’s a fact worth remembering). Now, We first calculate the day on 1 JAN of the current year. Now, using this we calculate day on first of the month. After that its pretty easy to associate days with following dates. While allotting days to date we can also load events from the dat file and place it in the grid box. This is the whole core of the program.
Well for visual polishing we added boxes showing current year and month. We added buttons to navigate to next/previous months and year. We even added event types and specific colors to different events from anniversary and dates with events. The project needed addition of event addition dialogue. If anyone you want a personal planner can fork my repository and add dialogues and other necessary feature. It would be great to add functionality for years less than 2001.
I didn’t work further on it as my friend was happy with the current state of being and moreover I was also busy with upcoming college forms and exams.If you don’t wanna work on your all new program, you can make use of this code to practice a few tricks to make the program better and have a good taste of Tkinter library. You can find the repository with the name “Planner” on my github. You could branch the repository and make your own additions. If you wanna share with me you can make a pull request or mail me the code for any help or reviewing.