I am looking for the best way to implement the creation of a new variable,numWithin365, defined as follows:
numWithin365
Given a column of dates, dates,
dates