[tw5] Re: My DATE is misbehavin'

2019-03-21 Thread TonyM
*Converting a time you select to UTC for storage* Using previous macro Save date as is <> Convert to UTC prior to save <> Note: this is useful because the default behaviour of TiddlyWiki is for the stored date and time to be UTC Thus we should convert any time we have to UTC before saving

[tw5] Re: My DATE is misbehavin'

2019-03-21 Thread 'Mark S.' via TiddlyWiki
I should have said "padded" dates. Creating a UTC date by padding creates a UTC representing that date at midnight, which will be number of hours different from local time. -- Mark On Wednesday, March 20, 2019 at 8:07:40 PM UTC-7, TonyM wrote: > > Mark, > > What do you mean "buffered" dates"?

[tw5] Re: My DATE is misbehavin'

2019-03-21 Thread Hubert
Hi all, @Mark, thanks for your clever idea with feeding variables to the view widget. This is really helpful. I've recently built a standalone *UTC converter* in a single tiddler and I've attached it here if anyone finds it helpful. Simply, input your date in the text field and hit enter. The

[tw5] Re: My DATE is misbehavin'

2019-03-20 Thread TonyM
Mark, What do you mean "buffered" dates"? Here is my further research notes, illistrated with below code Review notes - Modified and Created are saved as UTC time, but the field transcluded adjusts it for local time, and shows the offset - If we use the Get filter operator to

[tw5] Re: My DATE is misbehavin'

2019-03-20 Thread 'Mark S.' via TiddlyWiki
I was surprised. All the buffered dates show up correctly. I guess the "[UTC]" designation in the format fixes the offset internally. -- Mark On Wednesday, March 20, 2019 at 4:02:01 PM UTC-7, TonyM wrote: > > Mark, > > The important bit is to set the *title* to the variable. >> > > Yes, as I

[tw5] Re: My DATE is misbehavin'

2019-03-20 Thread TonyM
The generalised macro. Observe my outstanding issue, - passing variables in the source parameter, *and how good is the mixed version?* Regards Tony \define new-date(format:"[UTC]0MM0DD0",source: "<><><>000") <$wikify name="date" text="$source$" > <$view tiddler=<>

[tw5] Re: My DATE is misbehavin'

2019-03-20 Thread TonyM
Mark, The important bit is to set the *title* to the variable. > Yes, as I said this opens many possibilities. As part of my comprehensive review of dates, I used this hack to produce examples of building a date from fields/variables and state tiddlers. This should satisfy the Original post,

[tw5] Re: My DATE is misbehavin'

2019-03-20 Thread 'Mark S.' via TiddlyWiki
The important bit is to set the *title* to the variable. On Wednesday, March 20, 2019 at 3:15:41 PM UTC-7, TonyM wrote: > > Mark and ss > > Good find. So we can say to feed a value into the view template for > formatting you set the tiddler to that value? > > this may be a way to feed other

[tw5] Re: My DATE is misbehavin'

2019-03-20 Thread TonyM
Mark and ss Good find. So we can say to feed a value into the view template for formatting you set the tiddler to that value? this may be a way to feed other variables into other widgets that do not accept variables. Good hack tip. Regards Tony -- You received this message because you are

[tw5] Re: My DATE is misbehavin'

2019-03-20 Thread S. S.
Mark, that's AMAZING! <$set name="date" value="20190317000"> <$view tiddler=<> field="title" format="date" template="[UTC] DDD DDth MMM "/> <$set> Result: *Sunday 17th March 2019* And it matters not if there is a tiddler titled: 20190317000 Thank you so much. Cheers. On

[tw5] Re: My DATE is misbehavin'

2019-03-20 Thread 'Mark S.' via TiddlyWiki
Just looking at the view widget code. There's a loophole that will allow you to display a utc date: <$list filter="201901010" > <$view field="title" format="date"/> This works as long as there is no actual tiddler "201901010" . Actually, maybe it works even if there is, but I

[tw5] Re: My DATE is misbehavin'

2019-03-20 Thread TonyM
S S, Given this reoccurring issue I am taking a deep dive into dates and UTC as I did previously with the days operator. I have gained a much deeper understanding and will share the results shortly (80% completed) The aforementioned inability to convert a variable to a date is clearly a

[tw5] Re: My DATE is misbehavin'

2019-03-20 Thread S. S.
Mark, Don't we already have all the javascript code we need in: $:/core/modules/utils/utils.js exports.formatDateString = function(date,template) { etc. I wish the *<$text>* widget could be extended for date formats, or

[tw5] Re: My DATE is misbehavin'

2019-03-19 Thread @TiddlyTweeter
Very practically helpful Mark, tx. Josiah On Tuesday, 19 March 2019 20:23:13 UTC+1, Mark S. wrote: > > Ok -- don't panic. You can make more than one tiddler a day by changing > the date stamp format to include other units. Like hours, seconds, > milliseconds. So maybe just workout what you

[tw5] Re: My DATE is misbehavin'

2019-03-19 Thread 'Mark S.' via TiddlyWiki
Ok -- don't panic. You can make more than one tiddler a day by changing the date stamp format to include other units. Like hours, seconds, milliseconds. So maybe just workout what you want your journal titles to look like in advance. -- Mark On Tuesday, March 19, 2019 at 12:11:49 PM UTC-7,

[tw5] Re: My DATE is misbehavin'

2019-03-19 Thread @TiddlyTweeter
Mark S. wrote: > > The problem with the Journal button is that it only makes one entry per > day, right? > Eek! I had no idea. That is NO good. Shouldn't a Journal Button give an exact timestamp? Otherwise why bother? I mean you don't just journal only at 00.01 am. Are you using some other

[tw5] Re: My DATE is misbehavin'

2019-03-19 Thread 'Mark S.' via TiddlyWiki
The problem with the Journal button is that it only makes one entry per day, right? Are you using some other logging/recording macro or tool kit? -- Mark On Tuesday, March 19, 2019 at 11:05:53 AM UTC-7, @TiddlyTweeter wrote: > > Mark S. > > Initially just dates and time stamps. > > In Italy

[tw5] Re: My DATE is misbehavin'

2019-03-19 Thread @TiddlyTweeter
Mark S. Initially just dates and time stamps. In Italy which is currently UTC+1. FYI the idea is initially only to log an experiment. The timing matters. There may be later analyses but no original times should be changed. I'm mainly concerned its gonna get complicated if the timings are not

[tw5] Re: My DATE is misbehavin'

2019-03-19 Thread 'Mark S.' via TiddlyWiki
No hypotenuse is good hypotenuse? At the moment you create a tiddler, including a journal tiddler, the created field is populated with the UTC date. Is that the field you plan to use for comparison? Or the title field? Will you want to create post-dated entries, that you may not have had time

[tw5] Re: My DATE is misbehavin'

2019-03-19 Thread @TiddlyTweeter
Ciao Mark S. I naively believe in the Journal button. All I need to do is press a button that registers NOW (not <>)? All I need know is if a Journal Entry works as advertised. I'd rather not have to deal with the square of the hypotenuse. Josiah On Tuesday, 19 March 2019 17:14:30 UTC+1,

[tw5] Re: My DATE is misbehavin'

2019-03-19 Thread 'Mark S.' via TiddlyWiki
Hi TT, How are you capturing dates and times? If you're recording the output of the <> macro as a UTC stamp into a date field, then you should be good to go. The problem comes if, like S.S., you want to roll your own date format so that you have a date that is human-readable. Then there may

[tw5] Re: My DATE is misbehavin'

2019-03-19 Thread @TiddlyTweeter
Mark S. & others The many discussions of dates I find confusing. I see solutions to issues I never knew existed. LIKELY because I never bothered on dates/times. I want to avoid issues next month when I need to track through journal entries a project that needs exact recording of day and time.

[tw5] Re: My DATE is misbehavin'

2019-03-19 Thread 'Mark S.' via TiddlyWiki
I think this might require a JS macro. I'm thinking of a version of the "now" macro that takes a date parameter (in your own date format). Note that padding a date the way you have will lead to a wrong displayed date unless you live very close to, or west of GMZ 0 . If you live in timezone TMZ

[tw5] Re: My DATE is misbehavin'

2019-03-19 Thread TonyM
S S, I would store the date in the full serial number such that you can use the view widget date format when needed. You could accept a year value then append the necessary number of zeros as desired when saving into a date field. I suggest - *Do not call it a date field unless it is in

[tw5] Re: My DATE is misbehavin'

2019-03-19 Thread TonyM
No Problems with Journals. I updated the journal button to include a full "serial" date when created in a journal-date field that I use rather than trying to decode the Journal title. I then use the view widget to present it in any desirable format when I need to. Ask me if you want the code.

[tw5] Re: My DATE is misbehavin'

2019-03-18 Thread S. S.
Thanks Tony. I would find your proposal perfect for my problem, and I made a comment on GitHub to that effect. As for filling in the fields "*in the correct format*" - I did mention that it is not natural to fill in date fields in that way. I want to write quickly and in formats that I can

[tw5] Re: My DATE is misbehavin'

2019-03-17 Thread TonyM
S S Please add support to my request here https://github.com/Jermolene/TiddlyWiki5/issues/3789 on this very subject. I try to fill the fields in the correct format in the first place, rather than convert it on the fly. I expect it may be easier in 5.1.20 because you could multiply a number