[tw5] Re: date format and the $view widget

2019-08-02 Thread Mohammad
Yep! It also does not use $view widget! :-) Cheers Mohammad On Friday, August 2, 2019 at 8:45:38 PM UTC+4:30, Mark S. wrote: > > That was just a paste-o. > > On Thursday, August 1, 2019 at 11:38:40 PM UTC-7, Mohammad wrote: >> >> The last line also is not required >> >> <$text field="yd"

[tw5] Re: date format and the $view widget

2019-08-02 Thread 'Mark S.' via TiddlyWiki
That was just a paste-o. On Thursday, August 1, 2019 at 11:38:40 PM UTC-7, Mohammad wrote: > > The last line also is not required > > <$text field="yd" format="date" template="mmm 0DD, " /> > > > > On Friday, August 2, 2019 at 4:25:26 AM UTC+4:30, Mark S. wrote: >> >> Here's an implementation

[tw5] Re: date format and the $view widget

2019-08-02 Thread TonyM
Mohammad My key recommendation is store dates as tiddlywiki date fields then all the format options, opperators, search order and more remain available to you. If you want to allow manual entry of dates provide it, but store the result as a standard date field. If you always move to and from

[tw5] Re: date format and the $view widget

2019-08-02 Thread Mohammad
The last line also is not required <$text field="yd" format="date" template="mmm 0DD, " /> On Friday, August 2, 2019 at 4:25:26 AM UTC+4:30, Mark S. wrote: > > Here's an implementation of your suggestion (using pre 20) > > <$set name="year" filter="[{!!yd}split[-]nth[1]]"> > <$set

[tw5] Re: date format and the $view widget

2019-08-02 Thread Mohammad
Mark, Based on your solution, there is no need to use the $view any more! On Friday, August 2, 2019 at 4:25:26 AM UTC+4:30, Mark S. wrote: > > Here's an implementation of your suggestion (using pre 20) > > <$set name="year" filter="[{!!yd}split[-]nth[1]]"> > <$set name="mpos"

[tw5] Re: date format and the $view widget

2019-08-02 Thread Mohammad
I did not get the point! I explain the case in more clear manner to see how I can use from your comment 1. I am developing a timelines plugin 2. The timelines plugin uses a field called date to create a horizontal or vertical flow of events 3. The date field should have year, month

[tw5] Re: date format and the $view widget

2019-08-02 Thread TonyM
Mohammad, My suggestion is still valid the way you are using it. When it comes to date and time handling it is best to go back to the the most complete standard, one which caters for leading zeros, validation, international time zones and formatting via the tools built into tiddlywiki. Sure if

[tw5] Re: date format and the $view widget

2019-08-02 Thread Mohammad
Added to TW-Scripts! On Friday, August 2, 2019 at 4:25:26 AM UTC+4:30, Mark S. wrote: > > Here's an implementation of your suggestion (using pre 20) > > <$set name="year" filter="[{!!yd}split[-]nth[1]]"> > <$set name="mpos" filter="[{!!yd}split[-]nth[2]]"> > <$set name="day"

[tw5] Re: date format and the $view widget

2019-08-02 Thread Mohammad
Tony! I am developing a timelines plugin and it uses a field to keep date and it is not the modified/created system field! So I want user has the flexibility to enter date as 2019-03-01 or 20190301. --Mohammad On Friday, August 2, 2019 at 2:45:13 AM UTC+4:30, TonyM wrote: > > Mohammad, > >

[tw5] Re: date format and the $view widget

2019-08-01 Thread Mohammad
Thanks Mark! It works like a charm! Cheers Mohammad On Friday, August 2, 2019 at 4:25:26 AM UTC+4:30, Mark S. wrote: > > Here's an implementation of your suggestion (using pre 20) > > <$set name="year" filter="[{!!yd}split[-]nth[1]]"> > <$set name="mpos" filter="[{!!yd}split[-]nth[2]]"> > <$set

[tw5] Re: date format and the $view widget

2019-08-01 Thread 'Mark S.' via TiddlyWiki
Here's an implementation of your suggestion (using pre 20) <$set name="year" filter="[{!!yd}split[-]nth[1]]"> <$set name="mpos" filter="[{!!yd}split[-]nth[2]]"> <$set name="day" filter="[{!!yd}split[-]nth[3]]"> <$set name="month" filter="Jan Feb Mar Apr May June July Aug Sep Oct Nov Dec +[nth]">

[tw5] Re: date format and the $view widget

2019-08-01 Thread TonyM
Mohammad, With respect why?, I would keep the dates in system format and produce the output in the required format. My Journal tiddlers put the date in a journal-date field for this very reason. An approach, would be to use the new split operator on "-" then the set widgets select keyword to