This implements the same behavior as the payable/receivable date in
7caa97a96b95 ensuring that the cumulate balance is the same as the today field.
Also it allows to customize the date considered as today from the context date
key or _datetime (when browsing history).
Closes#14228