There are a couple of things here.

Some general rules and some more things to consider:

   1. fieldnames are mandatorily lowercase, not sure why, but they are:
   
   *so, MyDateField is invalid whereas mydatefield is valid*
   
   2. dates are always stored as GMT / always store dates are as GMT!
   
   

*therefore, you cannot actually create a meaningful custom date using the 
   now macro, at least not until the macro provides a second parameter that 
   reads GMT:yes returning the date in GMT rather than local time*
   
   3. always *view* dates in local time, because why would you care about 
   the GMT equivalent?
   
   

*looking at a date field using plain transclusion, e.g. via {{!!modified}} 
   only helps insofar as you need to be aware that you're looking at GMT, 
   otherwise use the ViewWidget to get the date displayed in local time*
   
   4. using the *<<now>>* macro without formatting does *not* yield a valid 
   tiddler date format
   
   *use a $set or $vars widget first, to get the value 
   for <<now>> formatted appropriately, first*
   
   5. you cannot use regexp with dates, esp. not when in GMT, because 
   you're not dealing with strings,
   this is more ore less the same issue as 3.
   
   *use or invent proper date handling filters*

So, here's an updated example for you, however, not necessarily solving all 
your problems:

<$button>Make Tiddler with mydatefield=<<now "YYYY0MM0DD0hh0mm">>
<$action-sendmessage $message="tm-new-tiddler" title="Tiddler made now" 
tags="Test" mydatefield=<<now "YYYY0MM0DD0hh0mm">>/>
</$button>

__Tiddlers with sameday in mydatefield as <<now "YYYY0MM0DD">>__<br>
<$vars rightNow=<<now "YYYY0MM0DD">>>
<$list filter="[tag[Test]sameday:mydatefield<rightNow>]" >
<$link><$view field="title"/></$link><br>
<$view field="modified" format="date" template="YYYY0MM0DD0hh0mm"/><br>
<$view field="mydatefield" format="date" template="YYYY0MM0DD0hh0mm"/><br>
</$list>
</$vars>

__Tiddlers with sameday in mydatefield as 20170106__<br>
<$list filter="[tag[Test]sameday:mydatefield[20170106]]" >
<$link><$view field="title"/></$link><br>
<$view field="modified" format="date" template="YYYY0MM0DD0hh0mm"/><br>
<$view field="mydatefield" format="date" template="YYYY0MM0DD0hh0mm"/><br>
</$list>

__Tiddlers with sameday in mydatefield as 20170107__<br>
<$list filter="[tag[Test]sameday:mydatefield[20170107]]" >
<$link><$view field="title"/></$link><br>
<$view field="modified" format="date" template="YYYY0MM0DD0hh0mm"/><br>
<$view field="mydatefield" format="date" template="YYYY0MM0DD0hh0mm"/><br>
</$list>

Best wishes,

Tobias.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/4e66afe4-aaef-40e0-b1ce-021b67acf6e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to