Yes, that worked! Thank you very much. I also realized that the template note was being included so I changed it to only include #daily notes in the _daily folder. Now I just need it to ignore today’s note. For now I’m just subtracting 1 since today’s note is “open” until the end of the day generally. Would be better to extend it to filter to notes before today.Also, the requirement is to use the property Date of the note and not the created time or modified time because I constantly create or modify past and future Daily notes.
$= dv.pages('#daily and "_daily"').where(page => page.Status == "open").length - 1