Get the current month in a plugin

37 views
Skip to first unread message

RLM

unread,
Jul 10, 2013, 4:34:22 PM7/10/13
to tiddl...@googlegroups.com
Tiddlywiki 2.7.2

I have a tiddler containing a tabs macro that is opened by default on starting. The tabs contain month names (eg. Jan, Feb,...)

I have placed a line in a systemConfig tiddler zzOpenTabs that says

config.options.monthViewTab="Jul";

and this works (it opens to the Jul tab). However, I'd like to dynamically get the current month.

Is this possible?

Thanks,

Randy

Eric Shulman

unread,
Jul 10, 2013, 5:02:58 PM7/10/13
to tiddl...@googlegroups.com
This should do it:
   config.options.monthViewTab = new Date().formatString("mmm");

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:

 

Randy Murray

unread,
Jul 10, 2013, 5:14:26 PM7/10/13
to tiddl...@googlegroups.com

That certainly did it!!!

 

Thanks,

 

Randy

 


--
You received this message because you are subscribed to a topic in the Google Groups "TiddlyWiki" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tiddlywiki/U66gpAuk_uk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.
 
 


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3349 / Virus Database: 3204/6479 - Release Date: 07/10/13

Reply all
Reply to author
Forward
0 new messages