Need help simplifying piston


#1

1) Give a description of the problem
I created this piston to update my billing cycle dates for another piston which uses said dates to calculate energy usage on a daily basis as well as calculate estimated usage based on the cycle start and end dates
While this iteration works as far as my limited testing has shown, I think there could be a better way to write and implement this . I’m hoping someone can point me in the right direction

2) What is the expected behaviour?
Piston checks current date to see if it is after the cycle reset date.
If after the reset date piston sets the new next reset date to the cycle end date of the new billing cycle and sets the last billing cycle end date

3) What is happening/not happening?
Would [like to simplify. Billing cycle dates are every consecutive 28 days or 4 weeks for 2 months then 35 days or 5 weeks for the 3rd month.

**4) Post a Green Snapshot of the piston!