I've always done that with this bit of markup...
{ts}
Entering that in a tiddler always seems to place a timestamp of when the
tiddler was saved. I don't know if it was a standard feature of Tiddlywiki
or if it was an extension that was popular, but it's always seemed to work
for me.
On Friday, December 13, 2013 9:32:57 PM UTC-7, infernoape wrote:
>
> So my use case is that I want the top menu and the first button in the top
> left corner I want it to be with a clock that when I click it stamps the
> time in a form that I have in a tiddler. I found the following but I
> wouldn't know how to put it in a button that would be interactive with the
> form in the tiddler I have open.
>
> <!DOCTYPE html>
> <html>
> <body>
>
> <p>A script on this page starts this clock:</p>
> <p id="demo"></p>
>
> <script>
> var myVar=setInterval(function(){myTimer()},1000);
>
> function myTimer()
> {
> var d=new Date();
> var t=d.toLocaleTimeString();
> document.getElementById("demo").innerHTML=t;
> }
> </script>
>
> </body>
> </html>
>
> Previously when I had TWC there I had modified Eric Shulman's DigitalClock
> from Tiddlytools.com and it has worked wonderfully for a couple years now.
> But now that I am upgrading to TW5, it seems that everything is different.
> I still wouldn't know where to begin with trying to write a widget?
>
>
> On Thu, Dec 5, 2013 at 7:03 AM, PMario <[email protected] <javascript:>>wrote:
>
>> On Thursday, December 5, 2013 2:42:56 PM UTC+1, infernoape wrote:
>>>
>>> Well, I found setTimeout(), setInterval(), clearTimeout(), and
>>> clearInterval() which are supported by node.js but I'm trying to access the
>>> computer's internal clock using what? It's just javascript? I'm confused as
>>> to what language to use to program a widget in TW5? Does it matter if I'm
>>> using TW5 stand alone edition or if it is shared via an actual node.js
>>> install?
>>>
>>
>> Imo it also depends on your usecase. eg:
>>
>> If you just want to show the actual time somewhere, the iframe solution
>> jeremy suggested, imo would be the best solution.
>> If you want to click the watch and record some start / stop timestamps to
>> eg: track working hours, imo it would be the best idea to just get the
>> actual time / date if you click a "start" or "stop" button .....
>>
>> So if you can describe your usecase a bit closer, we may be able to point
>> you in the right direction, that fits your usecase, instead of guessing
>> your usecase.
>>
>> -mario
>>
>>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/groups/opt_out.