mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-06 22:04:19 +00:00
Merge pull request #1520 from roma0104/master
Update the sameday and eachday filter to accept TW5 date strings.
This commit is contained in:
commit
13a5e8f31c
@ -26,7 +26,7 @@ exports.eachday = function(source,operator,options) {
|
|||||||
};
|
};
|
||||||
source(function(tiddler,title) {
|
source(function(tiddler,title) {
|
||||||
if(tiddler && tiddler.fields[fieldName]) {
|
if(tiddler && tiddler.fields[fieldName]) {
|
||||||
var value = toDate(tiddler.fields[fieldName]);
|
var value = toDate($tw.utils.parseDate(tiddler.fields[fieldName]));
|
||||||
if(values.indexOf(value) === -1) {
|
if(values.indexOf(value) === -1) {
|
||||||
values.push(value);
|
values.push(value);
|
||||||
results.push(title);
|
results.push(title);
|
||||||
|
@ -25,7 +25,7 @@ exports.sameday = function(source,operator,options) {
|
|||||||
};
|
};
|
||||||
source(function(tiddler,title) {
|
source(function(tiddler,title) {
|
||||||
if(tiddler && tiddler.fields[fieldName]) {
|
if(tiddler && tiddler.fields[fieldName]) {
|
||||||
if(isSameDay(tiddler.fields[fieldName])) {
|
if(isSameDay($tw.utils.parseDate(tiddler.fields[fieldName]))) {
|
||||||
results.push(title);
|
results.push(title);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user