I need help figuring out how to dynamically display or hide a link based on whether there are less than two weeks remaining in the current month using moment.js.
Currently, my code snippet looks like this:
if (moment().endOf('month') <= (13, 'days'))
{
// code for link manipulation goes here
}
However, I suspect that this approach is incorrect as it doesn't seem to be producing any results. Can anyone offer some guidance on how to achieve this functionality correctly? Thanks in advance!