Use https://momentjs.com instead
moment('2022-02-05').isBetween(moment().startOf('day').subtract(1, 'day'), moment().endOf('day'));
Still requires one import but that's hard to avoid. Don't be afraid of them, the IDE will usually add them automatically and hide them anyway. It's a good way to increase tracability maintainability, instead of magic stuff happening in the background.