Semantic MediaWiki/markup/ask: Difference between revisions
from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
No edit summary |
No edit summary |
||
| Line 5: | Line 5: | ||
* {{fmt/code|::>}} : "greater than" | * {{fmt/code|::>}} : "greater than" | ||
===Dates=== | ===Dates=== | ||
By default, the filter condition {{fmt/code|{{fmt/arg| | By default, the filter condition {{fmt/code|{{fmt/arg|property name}}::{{fmt/arg|date value}}}} means {{fmt/code|WHERE {{fmt/arg|property name}} ''equals'' {{fmt/arg|date value}}}}. Note that even if {{fmt/arg|date value}} has no time, it will ''not'' find pages where {{fmt/arg|property value}} is set to a full timestamp in which the time is not 00:00. | ||
In order to match any timestamp from the same day (00:00 - 23:59)... ''researching this; there are several possible avenues...'' | In order to match any timestamp from the same day (00:00 - 23:59)... ''researching this; there are several possible avenues...'' | ||
====What doesn't work==== | |||
Related | * {{fmt/code|<nowiki>[[</nowiki>{{fmt/arg|property name}}::{{fmt/arg|date of wanted day}}<nowiki>]] [[</nowiki>{{fmt/arg|property name}}::{{fmt/arg|date of next day}}<nowiki>]]</nowiki>}}, i.e. "between 00:00 this morning and 00:00 next morning". This ignores pages where {{fmt/arg|date value}} ''doesn't'' have a time-stamp (despite the claim of {{fmt/code|::>}} actually meaning {{fmt/code|≥}}). | ||
====Related==== | |||
* <code><nowiki>{{</nowiki>#dateformat:{{fmt/arg|date/time string}}|Y/m/d<nowiki>}}</nowiki></code> will normalize all recognized date-time formats into a YYYY/MM/DD string (time omitted). | * <code><nowiki>{{</nowiki>#dateformat:{{fmt/arg|date/time string}}|Y/m/d<nowiki>}}</nowiki></code> will normalize all recognized date-time formats into a YYYY/MM/DD string (time omitted). | ||
==Official Documentation== | ==Official Documentation== | ||
Revision as of 17:34, 6 February 2025
Syntax
Operators
- Template:Fmt/code : "equals"
- Template:Fmt/code : "greater than"
Dates
By default, the filter condition Template:Fmt/code means Template:Fmt/code. Note that even if Template:Fmt/arg has no time, it will not find pages where Template:Fmt/arg is set to a full timestamp in which the time is not 00:00.
In order to match any timestamp from the same day (00:00 - 23:59)... researching this; there are several possible avenues...
What doesn't work
- Template:Fmt/code, i.e. "between 00:00 this morning and 00:00 next morning". This ignores pages where Template:Fmt/arg doesn't have a time-stamp (despite the claim of Template:Fmt/code actually meaning Template:Fmt/code).
Related
{{#dateformat:Template:Fmt/arg|Y/m/d}}will normalize all recognized date-time formats into a YYYY/MM/DD string (time omitted).
Official Documentation
- Inline queries: mostly covers #ask but also #Template:L/same briefly
- Formats:
Operators
Note that there does not seem to be any documentation specifically about available comparison operators. The Template:Fmt/code and Template:Fmt/code operators are mentioned in passing in a couple of places:
- smw:Help:Calendar format - Template:Fmt/quote This doesn't clarify whether this is true in general or only within the Calendar context.
- smw:Help:$smwgQStrictComparators - by default, Template:Fmt/code and Template:Fmt/code are treated as Template:Fmt/code and Template:Fmt/code
