TW Fundamentals: the now system identifier: a use case

The now identifier is a "system" identifier (i.e. it is a "built-in" TiddlyWiki feature.)

When a now transclusion reference (with "<<now>>" when transcluded in the body of a tiddler, or with "<now>" when transcluded in a filter) the transclusion reference is replaced with the current date and time in whatever format if is specified as part of the transclusion.

Example transclusion of now with a date/time format (this is a parameterized transclusion):
  <<now "YYYY-0MM-0DD 0hh:0mm:0ss">>

Here's a small code sample for study, demonstrating a use case for "now":

And the code for you to try in a TiddlyWiki instance:


   $basetitle={{{ [[Captain's Log ]] [<now "YYYY-0MM-0DD 0hh:0mm:0ss">] +[join[]] }}} tags="log" >

Create Captain's Log Entry


No comments: