Re: [tw5] Re: ISO week date format template

2021-09-16 Thread J N
Sounds fine to me. The zero-padded format is probably the common case for the day of year. "yDDD" would be the more shape-similar and mnemonic, but it's already in the proposals and maybe it breaks away from existing patterns. The main thing is that the ISO date parts are represented and available

Re: [tw5] Re: ISO week date format template

2021-09-14 Thread Jeremy Ruston
OK, I'm thinking now: * To change the token for week number to `dd` * To add a new token for day of year `` and `0` Best wishes Jeremy On Tuesday, September 14, 2021 at 12:34:53 PM UTC+1 PMario wrote: > On Tuesday, September 14, 2021 at 10:19:10 AM UTC+2 Jeremy Ruston wrote: > > If we

Re: [tw5] Re: ISO week date format template

2021-09-14 Thread PMario
On Tuesday, September 14, 2021 at 10:19:10 AM UTC+2 Jeremy Ruston wrote: If we stick with `` for day of week, perhaps we'd use `d` for day > of year? They are very similar. For me it's difficult to recognise a difference. ... > Perhaps that's excessively long, but it does seem like

Re: [tw5] Re: ISO week date format template

2021-09-14 Thread Jeremy Ruston
> The "dd" format is reminding of the n umerical notation in the month date, but at the same time may be confusingly similar and suggesting a two digit representation. "" feels more related to the existing weekday name notations, one could think that longer token indicates lesser units in t

Re: [tw5] Re: ISO week date format template

2021-09-13 Thread PMario
On Monday, September 13, 2021 at 8:46:04 PM UTC+2 Jeremy Ruston wrote: Now that I started to write out the rationale for the choice of "", I'm > realising that perhaps I think "dd" might be a better choice. What do > others think? > I think 0dd and dd should be an option. I think 0dd is ne

Re: [tw5] Re: ISO week date format template

2021-09-13 Thread J N
Ok, I see that there is also already a conflict with the ISO notation in the DDD token, which in ISO 8601 is used for three digit day of year. Maybe that could be nice to have as TW date token also. https://en.wikipedia.org/wiki/ISO_8601#Ordinal_dates > As represented above, [] indicates a ye

Re: [tw5] Re: ISO week date format template

2021-09-13 Thread Jeremy Ruston
> Nice to hear it is already taken care of, thank you. > I was almost on my way to make a pull request myself, as an exercise in > contributing to an open source project, but I am not sure about the customs, > if I should create an issue first. It's probably usually best to open an issue (or co

[tw5] Re: ISO week date format template

2021-09-13 Thread J N
Yes, I will probably upgrade to 5.2 then to get that specific feature. Thank you for the doc ref, there seem to be many possibilities to customize functionality. The last block of example code means that I should create the config tiddlers without the $:/ prefix if I want them to appear in the

[tw5] Re: ISO week date format template

2021-09-13 Thread J N
Nice to hear it is already taken care of, thank you. I was almost on my way to make a pull request myself, as an exercise in contributing to an open source project, but I am not sure about the customs, if I should create an issue first. Of curiosity, may I ask why you chose "" as the token f

[tw5] Re: ISO week date format template

2021-09-12 Thread Charlie Veniot
I'm thinking it might be worth you using the 5.2 pre-release version of TiddlyWiki, seeing as it has the ISO date format. However, if you do want to continue with the workaround: I wouldn't bother with javascript. You have all you need in TiddlyWiki: https://tiddlywiki.com/#Making%20a%20custo

[tw5] Re: ISO week date format template

2021-09-12 Thread PMario
Thanks Jeremy, I did just have a look at the code to create a PR. You have been faster to fix it as I've been looking up the code ;) -m -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To unsubscribe from this group and stop receiving emails from

[tw5] Re: ISO week date format template

2021-09-12 Thread Jeremy Ruston
Thanks CJ for the cunning workaround. For v5.2.0 I've now added a new date format string token "" for directly obtaining the ISO weekday number (ie 1=Monday, 7=Sunday): https://tiddlywiki.com/prerelease/#DateFormat (It'll take a few minutes from this posting until the change shows up). Bes

[tw5] Re: ISO week date format template

2021-09-12 Thread J N
Thank you for the suggested workaround. Is it possible to define that operation in a tiddler and then refer to the value in a template for creating a new journal entry? If so, maybe one could also use JavaScript directly to provide the value for the tiddler template. On Saturday, 11 September

[tw5] Re: ISO week date format template

2021-09-12 Thread J N
Thank you for the suggested workaround. Is it possible to define that operation in a tiddler and then refer to the value in a template for creating a new journal entry? If so, maybe one could also use JavaScript directly to provide the value for the tiddler template. lördag 11 september 2021

[tw5] Re: ISO week date format template

2021-09-11 Thread Charlie Veniot
* Oops, typo in the last "search-replace" * "[Thu],[7]" should be "[Sun],[7]" The dangers of mindless cut and paste ... On Saturday, September 11, 2021 at 12:49:23 AM UTC-3 Charlie Veniot wrote: > G'day, > > Just to get the conversation started, try this in a new tiddler in some > tiddlywiki

[tw5] Re: ISO week date format template

2021-09-10 Thread Charlie Veniot
G'day, Just to get the conversation started, try this in a new tiddler in some tiddlywiki: <$vars dateNow= <>> {{{ [search-replace:[Mon],[1]search-replace:[Tue],[2]search-replace:[Wed],[3]search-replace:[Thu],[4]search-replace:[Fri],[5]search-replace:[Sat],[6]search-replace:[Thu],[7]] }}}

[tw5] Re: ISO week date format template

2021-09-09 Thread J N
A correction of the example given for a week date in TiddlyWiki is that the template should use the w token for the ISO week-numbering year, not , since weeks may cross the traditional year boundary with some days of the week falling outside the year the week belongs to. It is a bit sur