# GrapeCity.ActiveReports.Core.Rendering.JpCalendar.JapaneseCalendarEx.GetWeekOfYear

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_ActiveReports_Core_Rendering_JpCalendar_JapaneseCalendarEx_GetWeekOfYear_" data-uid="GrapeCity.ActiveReports.Core.Rendering.JpCalendar.JapaneseCalendarEx.GetWeekOfYear*">GetWeekOfYear Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_Core_Rendering_JpCalendar_JapaneseCalendarEx_GetWeekOfYear_" data-uid="GrapeCity.ActiveReports.Core.Rendering.JpCalendar.JapaneseCalendarEx.GetWeekOfYear*"></a>
<h4 id="GrapeCity_ActiveReports_Core_Rendering_JpCalendar_JapaneseCalendarEx_GetWeekOfYear_System_DateTime_System_Globalization_CalendarWeekRule_System_DayOfWeek_" data-uid="GrapeCity.ActiveReports.Core.Rendering.JpCalendar.JapaneseCalendarEx.GetWeekOfYear(System.DateTime,System.Globalization.CalendarWeekRule,System.DayOfWeek)">GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek)</h4>
<div class="markdown level1 summary"><p>Returns the week of the year that includes the date in the specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> object.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">[ComVisible(false)]
public override int GetWeekOfYear(DateTime time, CalendarWeekRule rule, DayOfWeek firstDayOfWeek)</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.datetime">DateTime</a></td>
      <td><span class="parametername">time</span></td>
      <td><p>The <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.datetime">DateTime</a> object to read.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.globalization.calendarweekrule">CalendarWeekRule</a></td>
      <td><span class="parametername">rule</span></td>
      <td><p>One of the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.globalization.calendarweekrule">CalendarWeekRule</a> values that defines a calendar week.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.dayofweek">DayOfWeek</a></td>
      <td><span class="parametername">firstDayOfWeek</span></td>
      <td><p>One of the <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.dayofweek">DayOfWeek</a> values that represents the first day of the week.</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.int32">int</a></td>
      <td><p>A 1-based integer that represents the week of the year that includes the date in the time parameter.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="overrides">Overrides</h5>
<div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.globalization.calendar.getweekofyear">Calendar.GetWeekOfYear(DateTime, CalendarWeekRule, DayOfWeek)</a></div>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentoutofrangeexception">ArgumentOutOfRangeException</a></td>
      <td><p>time or firstDayOfWeek is outside the range supported by the calendar.
-or- rule is not a valid <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.globalization.calendarweekrule">CalendarWeekRule</a> value.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
