Hello Tony

Thanks a lot for replying, and I would be highly interested to learn how to 
do it in wikitext and widgets

I tried to explain what I am trying to do in my OP but I will try again. 
Issue is it sounds so clear in my head that I am getting troubles 
explaining it.

Below are 2 entries in the same tiddler of my DailyNotes plugin. The first 
one has the old timestamp (only hours) the second one new timestamp

22:34~Entry with old time stamp <br />

20200520223405903~Entry with new time stamp  <br />

what I am trying to do is a function setting a variable called timestamp to 
22:34 no matter if I feed it with  22:34 or 20200520223405903

thanks again 


 

On Thursday, May 21, 2020 at 2:58:57 AM UTC+3, TonyM wrote:
>
> Tony K,
>
> Fine run with your solution with a JS macro since this is clearly your 
> strength,However I am confident with a little more detail to your request, 
> for clarity I can make a pure wikit text and widget solutions for you.
>
> On the other hand using the title as a time stamp ie the primary key to a 
> tiddler as an attribute (the time) of the tiddler is in my view not a good 
> design choice. I have a much better one available. Just ask
>
> Are you saying some tiddlers are named hhmm and others 
> [UTC]YYYY0MM0DD0hh0mm0ssXXX ? and you want a function to handle them both 
> equally?
>
>    - We can do that with wikitext and widgets.
>    - Why not make a batch operation to standardise the title in one go?
>    - I would move the time stamp date to a separate field what ever you 
>    choose the title to be.
>    - In tiddlywiki the title is both a unique key to its contents and 
>    often an aesthetic easy to read title.
>
> Regards
> Tony 
>
>
>
>
>
> On Thursday, May 21, 2020 at 6:46:14 AM UTC+10, Tony K wrote:
>>
>> Solved, I created a JS macro for it
>>
>> thanks
>>
>> On Wednesday, May 20, 2020 at 7:54:48 PM UTC+3, Tony K wrote:
>>>
>>> is it possible to manipulate a timestamp without the $view?
>>>
>>> I have timestamp saved in 2 formats 
>>>
>>> old format 0hh:0mm and new format <<now "[UTC]YYYY0MM0DD0hh0mm0ssXXX">>
>>>
>>> I am trying to make my code backward compatible so what I need is when I 
>>> read the time stamp from the tiddler and display it in both cases as 
>>> 0hh:0mm 
>>>
>>> I tried to work with length 
>>>
>>> \define long()
>>> <$view tiddler=<<timestamp>> field=title format=date template="0hh:0mm" 
>>> />
>>> \end
>>>
>>>
>>> <$list filter="""[<timestamp>length[]match[9]then<timestamp>else<long>]""" 
>>> variable="type"/>
>>>
>>> but in that case it is being evaluated to the full text and not the 
>>> value :|
>>>
>>> thanks in advance 
>>>
>>

-- 
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/37d570a4-c33e-426a-9ee3-a53617ccc7ad%40googlegroups.com.

Reply via email to