import { endOfYesterday } from "https://deno.land/x/date_fns@v2.12.0/index.js";
Examples
// If today is 6 October 2014:
var result = endOfYesterday()
//=> Sun Oct 5 2014 23:59:59.999
// If today is 6 October 2014: var result = endOfYesterday() //=> Sun Oct 5 2014 23:59:59.999