On 02/01/2019 18:15, Junio C Hamano wrote:
We perhaps can use "test-tool date timestamp", like so check_human_date $(test-tool date timestamp "18000 seconds ago") ... or moving the part that munges 18000 into the above form inside check_human_date helper function, e.g. check_human_date () { commit_date=$(test-tool date timestamp "$1 seconds ago") commit_date="$commit_date +0200" expect=$2 ... } which would let us write check_human_date 432000" $THIS_YEAR_REGEX # 5 days ago
Just a quick bikeshed: if used, would this have a year end 5 day roll-over error potential, or will it always use the single date?
(I appreciate it is just suggestion code, not tested) -- Philip