我已经测试了Date Comparisons与Javascript SDK一起使用.
(单词是基本的解析模型)
var d = new Date();
var word = new Word();
word.set("dateTo", new Date (2012, 01, 01));
word.save();
var dateTo = new Date (2012, 12, 31);
var query = new Parse.Query(Word);
query.greaterThan("dateTo", dateTo);
query.find({
success: function(results) {
alert("Successfully retrieved " + results.length + " scores.");
},
error: function(error) {
alert("Error: " + error.code + " " + error.message);
}
});
作为一种解决方法,您始终可以将日期转换为Date.getTime()等秒,并使用整数进行比较.
问候