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
<!-- split time into parts -->
<$vars yyyy={{{ [<time>split[]first[4]join[]] }}}>
<$vars mm={{{ [<time>split[]first[6]last[2]join[]] }}}>
<$vars dd={{{ [<time>split[]first[8]last[2]join[]] }}}>
<$vars hh={{{ [<time>split[]first[10]last[2]join[]] }}}>
<$vars min={{{ [<time>split[]first[12]last[2]join[]] }}}>
<!-- Rearange time -->
<$vars mm={{{ [<mm>pad[2]] }}} dd={{{ [<dd>pad[2]] }}} hh={{{
[<hh>pad[2]] }}} min={{{ [<min>pad[2]] }}}> {{{
[<dd>addsuffix[-]addsuffix<mm>addsuffix[-]addsuffix<yyyy>addsuffix[ at
]addsuffix<hh>addsuffix[:]addsuffix<min>] }}} \end
And the button
<$button> Set Deadline
<$vars time={{ ORIGIN}} offset="-07:29">
<$wikify name="newtime" text=<<adjust_time>>>
<$action-setfield timeline.end=<<newtime>> />
<$action-setfield timeline.start=<<newtime>> />
</$wikify>
</$vars>
<$vars time={{!!timeline.end}}> <$wikify name="readtime"
text=<<readable_time>>> <$action-setfield deadline=<<readtime>> />
</$wikify>
</$vars>
</$button>
On Sunday, August 15, 2021 at 1:55:04 PM UTC+1 Ste wrote:
> 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
>
>
>
> On Sunday, August 15, 2021 at 12:59:50 AM UTC+1 [email protected]
> wrote:
>
>> 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
>>
>>
>> On Friday, August 13, 2021 at 9:38:01 AM UTC+2 Ste wrote:
>>
>>>
>>> For context this is what I'm working on:
>>> https://tmc.stephenteacher.com/Assesment%20Schedule.html
>>> On Thursday, 12 August 2021 at 18:42:18 UTC+1 Ste wrote:
>>>
>>>>
>>>> Hello wonderful people's.
>>>> I need help with time.
>>>> I am sure there have been discussions about this but alas I can't seem
>>>> to find what I'm looking for. Google groups. You know how it is!
>>>>
>>>> I have a date in a field. I would like to use this same date in another
>>>> tiddler, but it needs to be plain text so it can be used by the vis.js
>>>> time
>>>> line plugin..
>>>>
>>>> I'd also like to be able to add/ subtract days and have it back into a
>>>> form the plugin can use.
>>>>
>>>> I'd like a date picker to return the same date in different formats to
>>>> different fields, or be able to convert an existing date into a different
>>>> format, and for it to be useable by the time line or the timely calender.
>>>>
>>>> So not much really...
>>>>
>>>> Thanks for your time :)
>>>>
>>>> Ste
>>>>
>>>> Date picker and timeline
>>>> http://kixam.github.io/TW5-visjsTimeline/
>>>>
>>>> Timely
>>>> https://tiddlytools.com/timer.html
>>>>
>>>>
>>>>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/602a8104-abd8-4865-b781-ffb296e900cbn%40googlegroups.com.