Getting Details of a future date

41 views
Skip to first unread message

TonyM

unread,
Jul 4, 2011, 2:08:27 AM7/4/11
to tiddl...@googlegroups.com
Folks,

I have some date titled tiddlers named "yyyy-0mm-dd"
I would like to display the day of week for that date

ANy ideas how to do it

eg;
<<dater {{tiddler.title}} "DDD" >>
would display as "Monday" if the tiddler title date was a monday

Thank in advance

TonyM

unread,
Jul 4, 2011, 2:19:42 AM7/4/11
to tiddl...@googlegroups.com
<<date display 2011 08 21 "DDD">> works with the DatePlugin
Anyone tell me how to get the tiddler title 2011-08-21 and change it to 2011 08 21 for use in the macro above ?

Thanks

PMario

unread,
Jul 4, 2011, 1:57:13 PM7/4/11
to TiddlyWiki
The vanilla SideBarOptions [1] tiddler contains:

<<newJournal "DD MMM YYYY" "journal">>

Somewhere in your TW it should be similar. Just change it to your
needed format.
Possible formats [2]

-m

[1] http://www.tiddlywiki.com/#SideBarOptions
[2] http://tiddlywiki.org/#%5B%5BDate%20Formats%5D%5D

HansBKK

unread,
Jul 5, 2011, 12:37:40 AM7/5/11
to tiddl...@googlegroups.com
What Mario said. Just note that any changes you make to the "core" (not in a tiddler) in your .html file will get wiped if you upgrade in the future, so make a note somewhere (in a "maintenance notes" tiddler is what I do) documenting your changes so you can re-instate them later on.

PMario

unread,
Jul 5, 2011, 8:08:20 AM7/5/11
to TiddlyWiki
There is no need to change the HTML file directly.
SideBarOptions is a shadow tiddler, that can be overwritten. Since
Tony posted that his journal title is something like: "yyyy-0mm-dd"
and the vanilla journal title is: "DD MMM YYYY" someone changed it.

That's why I wrote somewhere in your TW. Best place to start with is
SideBarOptions tiddler.

Some TWs also use "config" tiddlers to permanently change the core
behaviour

eg:
http://mptw.tiddlyspot.com/#MptwConfigPlugin
http://mptw.tiddlyspot.com/#MptwUserConfigPlugin

Most of the time I personally use "zzConfig" for this.
http://pmario.tiddlyspace.com/#zzConfig

This are the next places to have a look at.

-m

TonyM

unread,
Jul 12, 2011, 9:24:09 PM7/12/11
to tiddl...@googlegroups.com
Thanks everyone for your contribution however you are a little off targent - possibly my own fault.

I am using the reminders plugin, calendar plugin and date plugin

I have a sophisticated new journal entry
<<newJournal "YYYY-0MM-0DD"  tag:".diary"  text:{{new Date().formatString ('!DDD')}} >><<renameButton  'New Diary Entry for today'>><<date link today "YYYY-0MM-0DD">>

and yyyy-omm-odd is the perfect format because it is sortable. It comes up in my calander view this way and all is good.

The thing is I want to generate 45 future date journal entries to plan my vacation day by day. So I am trying to template the journal entries with Holiday travel and accommodation issues.

You can see from the above newjournal each day I want to log the days activities i create a new tiddler and insert the Day of the week !DDD in the tiddler.

The thing is if I want to generate these entries in advance I do not know how to pu the Day of week in except manually.

All I want yo do is take the tiddler title in yyyy-mm-dd format and use this to determine the day of week for that date and display it in each tiddler when I open it.

Thanks for any ideas you may have.

PMario

unread,
Jul 13, 2011, 9:02:52 AM7/13/11
to TiddlyWiki
haha
Open a TW and put this into your eg: Firebug "console: Command editor"
and execute


new Date(20110714).formatString('!DDD') -> "!Thursday"

-m
Reply all
Reply to author
Forward
0 new messages