Template:Rbcal

From OpenWetWare

Jump to: navigation, search

Usage

{{Rbcal|ProjectName}}
(if not supplied, ProjectName defaults to "calendar")

Effect

This template defines the following variables:

  • {{#var:RBnb}}
⇒ Special:Redir/Braun:Notebook
  • {{#var:RBproj}}
⇒ calendar
(NB: If this template is called with {{Rbcal|ProjectName}}, {{#var:RBproj}} will give ProjectName; otherwise, it defaults to "calendar.")
  • {{#var:RBbase}}
⇒ Special:Redir/Braun:Notebook/calendar
  • {{#var:RBtoday}}
⇒ 2016/12/09
  • {{#var:RBtomorrow}}
⇒ 2016/12/10
  • {{#var:RBmocal}}
December
SMTWTFS
123
45678910
11121314151617
18192021222324
25262728293031

Creating Links

The vars can be composed into links & manipulated to give pretty time strings:

  • [[{{#var:RBbase}}|{{#var:RBproj}} home]]
calendar home
  • [[{{#var:RBbase}}/{{#var:RBtoday}}|Today, {{#time: D j M Y|{{#var:RBtoday}} }}]]
Today, Fri 9 Dec 2016
  • [[{{#var:RBbase}}/{{#var:RBtomorrow}}|Tomorrow, {{#time: D j M Y|{{#var:RBtomorrow}} }}]]
Tomorrow, Sat 10 Dec 2016

Vars can also be combined with the Lab Notebook variables, eg:

  • {{#lnvar:thisdate}}, date of current entry
  • {{#lnvar:prevday}}, day before entry
  • {{#lnvar:nextday}}, day after entry
  • {{#lnpreventry:{{FULLPAGENAME}}}}, previous entry IF it exists (empty string otherwise)
  • {{#lnnextentry:{{FULLPAGENAME}}}}, next entry IF it exists (empty string otherwise)
Personal tools