getYesterday()function

getYesterday(): Date
Return
Date
A new Date instance at midnight yesterday.

Get a date representing midnight of the previous day.