Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new terminday = 0, terminmonth = 0, terminyear = 0, days = 0;
- new year, month, day;
- getdate(year, month, day);
- if(month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12)
- {
- terminday = day+14;
- if(terminday > 31)
- {
- terminmonth = month+1;
- if(terminmonth > 12)
- {
- terminyear = year+1;
- terminmonth = 1;
- if(terminmonth == 1 || terminmonth == 3 || terminmonth == 5 || terminmonth == 7 || terminmonth == 8 || terminmonth == 10 || terminmonth == 12)
- {
- days = 31;
- }
- else if(terminmonth == 2)
- {
- days = 28;
- }
- else
- {
- days = 30;
- }
- terminday = terminday-days;
- }
- else
- {
- terminyear = year;
- if(terminmonth == 1 || terminmonth == 3 || terminmonth == 5 || terminmonth == 7 || terminmonth == 8 || terminmonth == 10 || terminmonth == 12)
- {
- days = 31;
- }
- else if(terminmonth == 2)
- {
- days = 28;
- }
- else
- {
- days = 30;
- }
- terminday = terminday-days;
- }
- }
- else
- {
- terminmonth = month;
- terminyear = year;
- }
- }
- else if(month == 2)
- {
- terminday = day+14;
- if(terminday > 28)
- {
- terminmonth = month+1;
- terminyear = year;
- terminday = terminday-28;
- }
- else
- {
- terminmonth = month;
- terminyear = year;
- }
- }
- else
- {
- terminday = day+14;
- if(terminday > 30)
- {
- terminmonth = month+1;
- terminyear = year;
- if(terminmonth == 1 || terminmonth == 3 || terminmonth == 5 || terminmonth == 7 || terminmonth == 8 || terminmonth == 10 || terminmonth == 12)
- {
- days = 31;
- }
- else if(terminmonth == 2)
- {
- days = 28;
- }
- else
- {
- days = 30;
- }
- terminday = terminday-days;
- }
- else
- {
- terminmonth = month;
- terminyear = year;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement