title: Creating a Dummy Variable for Observations within a date range
body: <p>I want to create a new dummy variable that prints 1 if my observation is within a certain set of date ranges, and a 0 if its not. My dataset is a list of political contributions over a 10 year range and I want to make a dummy variable to mark if the donation came during a certain range of dates. I have 10 date ranges I'm looking at.</p>
  
  <p>Does anyone know if the right way to do this is to create a loop? I've been looking at this question, which seems similar, but I think mine would be a bit more complicated: <a href="https://stackoverflow.com/questions/16945797/creating-a-weekend-dummy-variable">Creating a weekend dummy variable</a></p>
  
  <p>By way of example, what I have a variable listing dates that contributions were recorded and I want to create dummy to show whether this contribution came during a budget crisis. So, if there were a budget crisis from 2010-2-01 until 2010-03-25 and another from 2009-06-05 until 2009-07-30, the variable would ideally look like this:</p>
  
  <p>Contribution Date.......Budget Crisis<br>
  2009-06-01...........................0<br>
  2009-06-06...........................1<br>
  2009-07-30...........................1<br>
  2009-07-31...........................0<br>
  2010-01-31...........................0<br>
  2010-03-05...........................1<br>
  2010-03-26...........................0</p>
  
  <p>Thanks yet again for your help!</p>