[tw5] Re: Timely help needed

Hey,

i have a similar setup , not sure if this helps , but check this thread https://groups.google.com/g/tiddlywiki/c/OUJlcbbK5v0/m/Wpc2SWMWAgAJ?hl=en

for adding a day , i don’t know how to do it , however i got help to add an hour in this thread https://groups.google.com/g/tiddlywiki/c/uB1RxGj2qz0/m/QYjk6VO_AwAJ?hl=en … i think it will probably be easy to modify the 1 hour value to 24 to achieve what you want

Thanks. I’ll delve into those a bit more next week when I’m at a pc.

Now that I’ve looked I remember seeing the +1hour thread and thinking that would be useful!

Just trying to automate things so the deadline tiddler auto updates from the end date of the assignment for example.

Or setup to self populate week numbers from a given start date.

Ste

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>