Created
June 9, 2017 09:02
-
-
Save byplayer/076a3341a4f7b77b78625a1b74e9c94c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TodoTxtJs.TodoManager._compareDueDate = function (left, right) { | |
if (left.dueDate() || right.dueDate()) { | |
if (!left.dueDate()) | |
return 1; | |
if (!right.dueDate()) | |
return -1; | |
if (left.dueDate().getFullYear() !== right.dueDate().getFullYear() | |
|| left.dueDate().getMonth() !== right.dueDate().getMonth() | |
|| left.dueDate().getDay() !== right.dueDate().getDay()) { | |
return left.dueDate() < right.dueDate() ? -1 : 1; | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment