Help Calculating Payroll Date

Help Calculating Payroll Date

I need to calculate the payroll date for a terminated employee.

I will enter their termination date and I need to calculate the following Friday from the Friday following their last date of work.

Here's what I've most recently tried...

datetime = input.Termination_Date;

time = datetime.toStartofWeek(datetime);

Date_Final_Pay_Received=time.addDay(12);

Help!

Thanks!

Jesse