# C1.Win.Calendar.DateTimeRange.GetDateRange

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Calendar_DateTimeRange_GetDateRange_" data-uid="C1.Win.Calendar.DateTimeRange.GetDateRange*">GetDateRange Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Calendar_DateTimeRange_GetDateRange_" data-uid="C1.Win.Calendar.DateTimeRange.GetDateRange*"></a>
<h4 id="C1_Win_Calendar_DateTimeRange_GetDateRange_System_Globalization_Calendar_" data-uid="C1.Win.Calendar.DateTimeRange.GetDateRange(System.Globalization.Calendar)">GetDateRange(Calendar)</h4>
<div class="markdown level1 summary"><p>Generates a sequence of dates between the MinValue and MaxValue dates, inclusive.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public IEnumerable&lt;DateTime&gt; GetDateRange(Calendar calendar = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function GetDateRange(Optional calendar As Calendar = Nothing) As IEnumerable(Of Date)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.globalization.calendar">Calendar</a></td>
      <td><span class="parametername">calendar</span></td>
      <td><p>The calendar system used to iterate through the date range.
If <code>null</code>, the current culture's calendar (<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.globalization.cultureinfo.currentculture">CurrentCulture</a>) is used.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a>&lt;<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a>&gt;</td>
      <td><p>An <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable&lt;T&gt;</a> containing each date from <a class="xref" href="C1.Win.Calendar.DateTimeRange.MinValue.html#C1_Win_Calendar_DateTimeRange_MinValue">MinValue</a> to <a class="xref" href="C1.Win.Calendar.DateTimeRange.MaxValue.html#C1_Win_Calendar_DateTimeRange_MaxValue">MaxValue</a>, inclusive.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
