Timely help needed

146 views
Skip to first unread message

Ste

unread,
Aug 12, 2021, 1:42:18 PM8/12/21
to TiddlyWiki

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

Timely


Ste

unread,
Aug 13, 2021, 3:38:01 AM8/13/21
to TiddlyWiki

For context this is what I'm working on:
Message has been deleted

paulgilbert2000

unread,
Aug 14, 2021, 7:59:50 PM8/14/21
to TiddlyWiki
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

Ste

unread,
Aug 15, 2021, 8:55:04 AM8/15/21
to TiddlyWiki
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

Ste

unread,
Aug 17, 2021, 1:37:34 PM8/17/21
to TiddlyWiki
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>
Reply all
Reply to author
Forward
0 new messages