Task due date: can you set it programatically to be some time after dependancies?

tasks

#1

Is it possible to set a task due date to be some period of time after a dependency? For instance, let’s say I cannot do B until A is complete. Can I set the B due date to A due date plus 2 days?