0

I am creating a homework organizer for my assignment with Python and Kivy, which involved creating a start date by subtracting a number of days from the due date.

this is how I am planing to subtract the date

However, if it is the beginning of the month and the number of days I am subtracting is greater than the remaining days, the result goes negative. In order to fix this I plan to use an if statement to subtract one from month and then set the date to the number of days in that month and then subtract what remains.

This application is going to work on an Android device and I need a full calendar in other sections of the program, so I am wondering if there is a way to import calendar dates from the Android operating system into Python?

mustaccio
  • 18,234
  • 16
  • 48
  • 57
Jess.D
  • 3
  • 4
  • If your question is about "importing dates", then the picture of your code may not be relevant. Is your question about subtracting dates? Displaying a calendar? Something else? Can you please clarify. – mustaccio May 26 '16 at 23:44
  • @mustaccio .it is about both subtracting dates and displaying a calendar. as further into the program i intend to display the dates on a calendar. essentially i was wondering if there was a way to import a data calendar like [[1,2,3...31],[1,2,3...30]...] that allow me subtract days from a date. eg 03/06/16 - 7 = 27/05/16 . – Jess.D May 27 '16 at 02:50
  • Instead of doing it yourself(the calculations) something like [this](http://stackoverflow.com/a/9725093/5994041) might help you. – Peter Badida May 27 '16 at 08:14
  • cool !!! , that worked perfectly, thank you ! @KeyWeeUsr – Jess.D May 28 '16 at 07:56

0 Answers0