If you need this method in both modals, and don't want to duplicate the code, you can create a base class TimeAdjustmentModal (if you have a better name go for it :) ) that both OneTimeModal and WeeklyModal will inherit from.