That’s hit the spot!
I can now sync the deadline date with the end date of the task.
I’ve even made myself a macro to change a date from all those numbers to something a bit more readable!
Heavily inspired (copy-pasted.) from Eric’s macro in the thread linked above.
I’m sure the button can work better as it needs two presses! I know, TWO!!!
or can the button be removed entirely?!
\define readable_time()
\whitespace trim
<$vars yyyy={{{ [split[]first[4]join[]] }}}>
<$vars mm={{{ [split[]first[6]last[2]join[]] }}}>
<$vars dd={{{ [split[]first[8]last[2]join[]] }}}>
<$vars hh={{{ [split[]first[10]last[2]join[]] }}}>
<$vars min={{{ [split[]first[12]last[2]join[]] }}}>
<$vars mm={{{ [pad[2]] }}} dd={{{ [
pad[2]] }}} hh={{{ [pad[2]] }}} min={{{ [pad[2]] }}}> {{{ [addsuffix[-]addsuffixaddsuffix[-]addsuffixaddsuffix[ at ]addsuffixaddsuffix[:]addsuffix] }}} \end
And the button
<$button> Set Deadline
<$vars time={{ ORIGIN}} offset="-07:29">
<$wikify name=“newtime” text=<<adjust_time>>>
<$action-setfield timeline.end=<> />
<$action-setfield timeline.start=<> />
</$wikify>
</$vars>
<$vars time={{!!timeline.end}}> <$wikify name=“readtime” text=<<readable_time>>> <$action-setfield deadline=<> />
</$wikify>
</$vars>
</$button>