Skip to content

Commit

Permalink
Merge pull request #12 from joeriddles/7/fix-timestamp-ordering
Browse files Browse the repository at this point in the history
#7: Order files in generated TODO by creation time, not modified time
  • Loading branch information
joeriddles authored Feb 27, 2024
2 parents 3a132fd + a3671ea commit ce54e72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion findTodos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class TodoService {
let data = ""

// Sort oldest-to-newest
todos.sort((a, b) => a.file.stat.mtime - b.file.stat.mtime)
todos.sort((a, b) => a.file.stat.ctime - b.file.stat.ctime)

// Exclude finished tasks
todos = todos.filter(todo =>
Expand Down

0 comments on commit ce54e72

Please sign in to comment.