Date format with the Timeline plugin in TW5

146 views
Skip to first unread message

Julien H

unread,
Jul 17, 2017, 5:11:52 PM7/17/17
to TiddlyWiki

Hello,

 

I am using TW5 with the plugin to create a Timeline called "Visual timeline widget plugin v0.8.1". This is a very interesting plugin. You can check an example of the plugin use and the description on the forum

 

In the syntax in the tiddler, I use

<$visjstimeline filter="[tag[Planning]]" startDateField="start" endDateField="end" format="DD/MM/YYYY"/>


And I would like to also use hours and possibly minutes. I tried a different syntax like

format="DD/MM/YYYY HH:MM"

This doesn't work and I would like your input. Have you try this plugin? Did you manage to use hours in your timeline?

 

Julien

Screenshot.PNG

Mark S.

unread,
Jul 17, 2017, 5:42:49 PM7/17/17
to TiddlyWiki
HH:MM should be hh:mm . See if that helps.

Good luck,
Mark

Julien H

unread,
Jul 18, 2017, 5:06:56 PM7/18/17
to TiddlyWiki
Thank you Mark ! This is working now when I put a starting and an ending hour that are in the morning.
Is there is any way to indicate AM or PM? Because if you use hour such as 14:30 it doesn't work.

I tried
<$visjstimeline filter="[tag[Planning]]" startDateField="start" endDateField="end" format="DD/MM/YYYY hh:mm am/pm"/>

And
<$visjstimeline filter="[tag[Planning]]" startDateField="start" endDateField="end" format="DD/MM/YYYY hh:mm AM/PM"/>

Julien

Mark S.

unread,
Jul 18, 2017, 6:07:39 PM7/18/17
to TiddlyWiki
When you show am/pm, did you literally put "am/pm" ? Either just AM or "am" or "PM" or "pm" should do it. If not, try the 12 hour clock indicate "hh12".

If nothing works, you might experiment with updating the TiddlyWiki (make a backup!). That TW is very old now.

Good luck,
Mark

Julien H

unread,
Jul 19, 2017, 6:30:46 AM7/19/17
to TiddlyWiki
Hi Mark,
I tried many variant but I am not sure to fully understand your suggestion about the 12 hour clock..
I publish the example I was talking about at the address https://houss.in/test/
Can you take a look at it?
Regards.
Julien.

Eskha

unread,
Jul 19, 2017, 9:29:23 AM7/19/17
to TiddlyWiki
Hi Julien,

According to moment.js library documentation
(http://momentjs.com/docs/#/parsing/string-format/),

Correct syntax is :
"DD/MM/YYYY HH:mm"

I checked it in your TW with tiddler "2" end date set to "21/07/2017 23:30" and it worked.


Best regards.

Eskha
Auto Generated Inline Image 1

Julien H

unread,
Jul 19, 2017, 4:24:24 PM7/19/17
to TiddlyWiki
Thank you very much Eskha et Marc, you both been very helpful.  I bookmarked the momentjs documentation.
Reply all
Reply to author
Forward
0 new messages