I am trying to pass random date values to moment and check if the date is this week, this month or this year but it seems there is no simple function to achive this without
moment(dateToCheck).isSame(new Date(), 'week'); //true if dates are in the same week
moment(dateToCheck).isSame(new Date(), 'month'); //true if dates are in the same month
moment(dateToCheck).isSame(new Date(), 'year'); //true if dates are in the same year