How to calculate when current pay period ends?
<p>I want to know how to calculate the last date of this pay period?</p>

<p>I know that the pay is bi-weekly and the first period started on 01/09/2012. 
so far here what i have done </p>

<pre><code>    DateTime d = new DateTime();
    d = Convert.ToDateTime("01/09/2012");

    while (d &lt;= Convert.ToDateTime("01/06/2013")) {

        PayPeriod.Items.Add(new ListItem(d.ToString("MM/dd/yyyy"), d.ToString("MM/dd/yyyy")));

        d = d.Date.AddDays(14);
    }
</code></pre>

<p>And this work perfect, but it work perfect because I have manually put the ending of the current pay period "01/06/2013".</p>

<p>My question is how can I automatically figure out the last date of the current pay period?</p>
