modx revo 不比较 getResourses 中的日期类型 TV

Modx revo does not compare date type TV in getResourses

我正在尝试比较来自电视的日期和来自代码段的日期(我正在使用 &tvFilters)(或任何其他日期字符串),但只能使用 == 和 != 操作?但我需要制作 >= 和 <=,怎么了?例子说它必须工作,它会是一些 MYSQL 问题吗?看起来它比较像字符串...

[[!getResources? &showHidden=`1`  &processTVs=`1` &includeTVs=`1` 
 &tpl=`rotatorPost` &includeContent=`1` &parents=`5` &limit=`3` 
&tvFilters=`Date>=2016-01-19 00:00:00` ]]

您将必须确保将两个日期都转换为 unix 时间戳[电视可能已经是] 您将必须检索您的电视 "Date" 未处理的 [&processTVs=0] 或将其输出类型设置为数字。 您的代码段还必须提供数字类型的日期。

在任何情况下,您都必须检查文档以确保 getResources 不会将任何一个值视为字符串,否则:

&tvFilters=1453239348 >= 1453239399 会给你意想不到的结果。

虽然文档在这方面看起来不错:

New filter operators available in 1.4.2-pl Starting with release 1.4.2-pl of getResources, there are a number of new comparison operators for use when creating filter conditions. In addition, when using many of these new operators, numeric comparison values are automatically CAST TV values to numeric before comparison. Here is a list of the valid operators: