http://evanbalster.com/ where are you!!!!

248 views
Skip to first unread message

needco...@gmail.com

unread,
Jul 9, 2020, 7:22:55 AM7/9/20
to TiddlyWiki
seems to have gone! :(
I'm sure this cam up before, and someone cloned the formula plugin somewhere (with an update?), but my google groups searches can't seem to find the thread...
The wayback machine has a snapshot from Nov last year.
Was just hoping I could get some date examples and usage from the site.
Hope your ok Evan!

Stephen

Mat

unread,
Jul 9, 2020, 7:36:20 AM7/9/20
to TiddlyWiki
Whupp! That site is clearly hijacked leading to some "bitcoin news" in my local language(!). I did some malware searches on my own computer and nothing comes up so I conclude it is the site.

<:-)

Stephen Wilson

unread,
Jul 9, 2020, 8:04:00 AM7/9/20
to TiddlyWiki
Found it...discussion which mentions Evans site going down.

currently hosting.

At the risk of hijacking my own thread, does anyone have examples of using it to manipulate dates?

I have a field, 'start' containing a date.  Want the field 'end' to contain a date six days after the start.

In the next tiddler I want 'start' and end to be +7 days after the start and end in tiddler two.

Will keep poking in the meantime.

Stephen Wilson

unread,
Jul 9, 2020, 8:05:02 AM7/9/20
to TiddlyWiki
Edit..

In the next tiddler I want 'start' and end to be +7 days after the start and end in tiddler one.

Mat

unread,
Jul 9, 2020, 11:49:10 AM7/9/20
to TiddlyWiki
Ste, it may be worth considering that TW now has math functionality that was not available when Evan made his plugin. Also, I recall digging up some algo for how to calculate future dates that Mark used for some problem. Maybe he has a ready made solution that you can use.

<:-)

Mark S.

unread,
Jul 9, 2020, 12:40:46 PM7/9/20
to TiddlyWiki
https://marxsal.github.io/various/playground.html#Date%20Conversion%20Macros

You can calculate future dates. Coupled with the range widget, you could calculate a series of dates every X days apart. To poke it back into a field requires a button or other action widget, as always.

If you have an app that depends on thousands of dates being calculated when the TW loads, then this might not be the solution for you. Javascript will always be faster. However, even Javascript has some serious date range limitations built in, surprisingly enough.

Mark S.

unread,
Jul 9, 2020, 2:32:27 PM7/9/20
to TiddlyWiki
 tiddlymap has now been updated to reflect these changes.

TW Tones

unread,
Jul 9, 2020, 8:47:53 PM7/9/20
to TiddlyWiki
Ste,

A Quick reminder, that on numerous occasions I have raised the idea of using a "now time stamp" rather than a future dated field and in the listing of such tiddler use the days operator to determine you are now +7 days from the timestamp. That is avoid such date manipulation and let the search/listing deal with it.

Eg review-date older than 7 days then it is due (in the weekly queue), but this also allows the same date field to be listed in fortnightly and monthly, even quarterly and annually. Just change the days operators, a caparison of the date field with now. All this without a single date manipulation. If you want to use a weekly-date and flag/tag it Monday and only list it on any day of the week if not done, but only Monday if done.

Regards
Tony

Stephen Wilson

unread,
Jul 10, 2020, 4:16:49 AM7/10/20
to TiddlyWiki
@Mark S
Thanks, will have a look!

Perhaps a fuller explanation of what I'm trying to achieve...

Last year I cobbled together an assessment schedule, handcrafting all the dates for each toddler and feeding it into vis.js timeline plugin.  It's about that time again to update this for the next academic year, so I was hoping to make this a little more robust/ spreadsheet-like in that I could set the start date and watch and smile as all the other dates set themselves from that, and from that set up forms to more easily add/ edit dates etc.

Then I can host the thing and stick it in teams!!  Yay Microsoft Teams....

file:///C:/PortableApps/Documents/Tiddlywikis/Testing%20Schedule.html_backup/Testing%20Schedule.20200709135916295.html#Assessment%20Schedule

@TW Tones
So when you say 'NOW' is that any now, ie it could be a future now, or does it have to be a now now?   I keep getting stuck on NOW... :) !

Thanks!

Stephen Wilson

unread,
Jul 10, 2020, 4:34:38 AM7/10/20
to TiddlyWiki
A link thats NOT pointing to my C:\ drive...!

TW Tones

unread,
Jul 10, 2020, 4:41:05 AM7/10/20
to TiddlyWiki
Stephan,

I know its a conceptual leap. Now is a time date stamp of the current time and date. The point is then lists are the ones that choose which tiddlers to include, using the days operator , not calculating the date when you are touching/modifying the tiddler.

In your case however the timeline plugin demands start and end dates. So perhaps this will not help you.

I use the plugin here https://github.com/kixam/TW5-datepicker for selecting actual dates past present or future.

I use UTC in the date format see the view Widget and DateFormat details

I hope this helps
TW Tones

Ste

unread,
Jul 10, 2020, 10:37:36 AM7/10/20
to TiddlyWiki

Hi Mark, sorry to mither...

I've created buttons which copy the entire macro to a new tiddler, create error messages and do nothing at all (I swear once I heard it laughing at me...) but not one of my bumbling attempts at tiddlywiki-speak have made the text of the date, and only the text of the date, appear in another field or tiddler.

To clarify...

enter a date in a field.

Use your wonderful macro to add a number of days (probably in another field)

Put the text output of that in a final field.   <------This be the bit that killing me :)

Smile as vis.js finally recognises the output!

:)

Mark S.

unread,
Jul 10, 2020, 4:20:23 PM7/10/20
to TiddlyWiki
Are you using native input fields? Or dates like "yyyy-mm-dd" ?

The date macros currently use either a field with native TW date built in or dates broken out by year, month , day as input.
Unfortunately they output dates like yyyy-mm-dd. I suppose it would be possible to add a function that can also take your Timezone and calculate a yyyymmddHHMMSS0000 date like TW uses. Maybe. I guess if it was me I'd dispense with TW dates altogether since there are so few operators that make use of them any-ways. UTZ precision is usually not necessary if all your users are living in the same timezone.

As far as inputting into a field, the result of the macro probably just needs to be wikified.

TW Tones

unread,
Jul 10, 2020, 6:29:34 PM7/10/20
to TiddlyWiki
Mark,

I am not sure what Time Zone you are in but I find time of day issues when I don't add UTC into the tiddlywiki data format. The date can be the day before for me because of this. 

I don't recall which but one plugin does not use the UTC format and one Tiddlywiki feature does not work correctly unless its used. I can't recall but I just use UTC to avoid it as much as possible. Since I am in the +10 timezone this can be a substantial error.

But the html date input is not too bad 

<$edit-text field=fieldname type=date tag="input"/>

<$edit-text field=fieldname2 type=datetime-local tag="input"/>
At least In my locality the date returned is YYYY-MM-DD which is at least sortable

However there is real value capturing the full tiddlywiki serial date because the days operator and other need it.


Even this works returning 0 to 100
<$edit-text field=fieldname type=range tag="input"/>

I just discovered that online the following added C:\fakepath\ to the selected filename
<$edit-text field=fieldname type=file tag="input"/>
however on TiddlyDesktop wikis this returns the full pathname

In conclusion the edit-text is far more useful that first appears.

Regards
Tony

TW Tones

unread,
Jul 10, 2020, 6:40:15 PM7/10/20
to TiddlyWiki
Warning some of the input tags throw an error but most work.

Regards
Tony

Mark S.

unread,
Jul 10, 2020, 8:07:46 PM7/10/20
to TiddlyWiki


On Friday, July 10, 2020 at 3:29:34 PM UTC-7, TW Tones wrote:
Mark,

I am not sure what Time Zone you are in but I find time of day issues when I don't add UTC into the tiddlywiki data format. The date can be the day before for me because of this. 


Yes. That's exactly why using a human-readable format like yyyy-mm-dd makes more sense for manipulation. I often want to know what a date will be 50 days from a field date. I'm almost never concerned whether that date is 2 in the morning or 2 in the afternoon.

TW Tones

unread,
Jul 10, 2020, 8:37:23 PM7/10/20
to TiddlyWiki
Mark,

To be clear a time stamp like this
<<now "YYYY0MM0DD000000000">>
is a date only, however also midnight

I have used
<<now "YYYY0MM0DD120000000">>

For noon, but one could use 6am etc...
or add "[UTC]YYYY0MM0DD120000000"

Regards
Tony
Reply all
Reply to author
Forward
0 new messages