That which ought to have been done is to be regarded as done, in favor of him to whom, and against him from whom, performance is due.

(Enacted 1872.)