mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-10 03:45:41 +00:00
711 lines
32 KiB
HTML
711 lines
32 KiB
HTML
|
<!DOCTYPE html>
|
|||
|
<!--[if IE]><![endif]-->
|
|||
|
<html>
|
|||
|
|
|||
|
<head>
|
|||
|
<meta charset="utf-8">
|
|||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|||
|
<title>Class DateTimeExtensions
|
|||
|
| X10D </title>
|
|||
|
<meta name="viewport" content="width=device-width">
|
|||
|
<meta name="title" content="Class DateTimeExtensions
|
|||
|
| X10D ">
|
|||
|
<meta name="generator" content="docfx 2.56.7.0">
|
|||
|
|
|||
|
<link rel="shortcut icon" href="../images/favicon.png">
|
|||
|
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet">
|
|||
|
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/styles/night-owl.min.css">
|
|||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css" integrity="sha384-EvBWSlnoFgZlXJvpzS+MAUEjvN7+gcCwH+qh7GRFOGgZO0PuwOFro7qPOJnLfe7l" crossorigin="anonymous">
|
|||
|
<link rel="stylesheet" href="../styles/config.css">
|
|||
|
<link rel="stylesheet" href="../styles/discord.css">
|
|||
|
<link rel="stylesheet" href="../styles/singulink.css">
|
|||
|
<link rel="stylesheet" href="../styles/main.css">
|
|||
|
<meta property="docfx:navrel" content="../toc.html">
|
|||
|
<meta property="docfx:tocrel" content="toc.html">
|
|||
|
|
|||
|
<meta property="docfx:rel" content="../">
|
|||
|
<meta property="docfx:newtab" content="true">
|
|||
|
</head>
|
|||
|
<body>
|
|||
|
<div class="top-navbar">
|
|||
|
<a class="burger-icon" onclick="toggleMenu()">
|
|||
|
<svg name="Hamburger" style="vertical-align: middle;" width="34" height="34" viewbox="0 0 24 24"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M20 6H4V9H20V6ZM4 10.999H20V13.999H4V10.999ZM4 15.999H20V18.999H4V15.999Z"></path></svg>
|
|||
|
</a>
|
|||
|
|
|||
|
|
|||
|
<a class="brand" href="../index.html">
|
|||
|
<img src="../images/favicon.png" alt="X10D" class="logomark">
|
|||
|
<span class="brand-title">X10D</span>
|
|||
|
</a> </div>
|
|||
|
|
|||
|
<div class="body-content">
|
|||
|
<div id="blackout" class="blackout" onclick="toggleMenu()"></div>
|
|||
|
|
|||
|
<nav id="sidebar" role="navigation">
|
|||
|
<div class="sidebar">
|
|||
|
|
|||
|
<div>
|
|||
|
<div class="mobile-hide">
|
|||
|
|
|||
|
<a class="brand" href="../index.html">
|
|||
|
<img src="../images/favicon.png" alt="X10D" class="logomark">
|
|||
|
<span class="brand-title">X10D</span>
|
|||
|
</a> </div>
|
|||
|
|
|||
|
<div class="sidesearch">
|
|||
|
<form id="search" role="search" class="search">
|
|||
|
<i class="bi bi-search search-icon"></i>
|
|||
|
<input type="text" id="search-query" placeholder="Search" autocomplete="off">
|
|||
|
</form>
|
|||
|
</div>
|
|||
|
|
|||
|
<div id="navbar">
|
|||
|
</div>
|
|||
|
</div> <div class="sidebar-item-separator"></div>
|
|||
|
|
|||
|
<div id="sidetoggle">
|
|||
|
<div id="sidetoc"></div>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
<div class="footer">
|
|||
|
<strong>DocFX + Singulink = ♥</strong>
|
|||
|
|
|||
|
</div> </nav>
|
|||
|
|
|||
|
<main class="main-panel">
|
|||
|
|
|||
|
<div id="search-results" style="display: none;">
|
|||
|
<h1 class="search-list">Search Results for <span></span></h1>
|
|||
|
<div class="sr-items">
|
|||
|
<p><i class="bi bi-hourglass-split index-loading"></i></p>
|
|||
|
</div>
|
|||
|
<ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
|
|||
|
</div>
|
|||
|
<div role="main" class="hide-when-search">
|
|||
|
|
|||
|
<div class="subnav navbar navbar-default">
|
|||
|
<div class="container hide-when-search" id="breadcrumb">
|
|||
|
<ul class="breadcrumb">
|
|||
|
<li></li>
|
|||
|
</ul>
|
|||
|
</div>
|
|||
|
</div>
|
|||
|
|
|||
|
<article class="content wrap" id="_content" data-uid="X10D.Time.DateTimeExtensions">
|
|||
|
|
|||
|
|
|||
|
<h1 id="X10D_Time_DateTimeExtensions" data-uid="X10D.Time.DateTimeExtensions" class="text-break">Class DateTimeExtensions
|
|||
|
</h1>
|
|||
|
<div class="markdown level0 summary"><p>Extension methods for <see cref="!:DateTime"></see>.</p>
|
|||
|
</div>
|
|||
|
<div class="markdown level0 conceptual"></div>
|
|||
|
<div class="inheritance">
|
|||
|
<h5>Inheritance</h5>
|
|||
|
<div class="level0"><span class="xref">System.Object</span></div>
|
|||
|
<div class="level1"><span class="xref">DateTimeExtensions</span></div>
|
|||
|
</div>
|
|||
|
<h6><strong>Namespace</strong>: <a class="xref" href="X10D.Time.html">X10D.Time</a></h6>
|
|||
|
<h6><strong>Assembly</strong>: X10D.dll</h6>
|
|||
|
<h5 id="X10D_Time_DateTimeExtensions_syntax">Syntax</h5>
|
|||
|
<div class="codewrapper">
|
|||
|
<pre><code class="lang-csharp hljs">public static class DateTimeExtensions : object</code></pre>
|
|||
|
</div>
|
|||
|
<h3 id="methods">Methods
|
|||
|
</h3>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<span class="divider">|</span>
|
|||
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Time_DateTimeExtensions_Age_DateTime_.md&value=---%0Auid%3A%20X10D.Time.DateTimeExtensions.Age(DateTime)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|||
|
</span>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Time/DateTimeExtensions.cs/#L15">View Source</a>
|
|||
|
</span>
|
|||
|
<a id="X10D_Time_DateTimeExtensions_Age_" data-uid="X10D.Time.DateTimeExtensions.Age*"></a>
|
|||
|
<h4 id="X10D_Time_DateTimeExtensions_Age_DateTime_" data-uid="X10D.Time.DateTimeExtensions.Age(DateTime)">Age(DateTime)</h4>
|
|||
|
<div class="markdown level1 summary"><p>Returns the rounded-down integer number of years since a given date as of today.</p>
|
|||
|
</div>
|
|||
|
<div class="markdown level1 conceptual"></div>
|
|||
|
<h5 class="decalaration">Declaration</h5>
|
|||
|
<div class="codewrapper">
|
|||
|
<pre><code class="lang-csharp hljs">public static int Age(this DateTime value)</code></pre>
|
|||
|
</div>
|
|||
|
<h5 class="parameters">Parameters</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Name</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><span class="parametername">value</span></td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<h5 class="returns">Returns</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">System.Int32</span></td>
|
|||
|
<td><p>The rounded-down integer number of years since <code data-dev-comment-type="paramref" class="paramref">value</code> as of today.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<span class="divider">|</span>
|
|||
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Time_DateTimeExtensions_Age_DateTime_DateTime_.md&value=---%0Auid%3A%20X10D.Time.DateTimeExtensions.Age(DateTime%2CDateTime)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|||
|
</span>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Time/DateTimeExtensions.cs/#L24">View Source</a>
|
|||
|
</span>
|
|||
|
<a id="X10D_Time_DateTimeExtensions_Age_" data-uid="X10D.Time.DateTimeExtensions.Age*"></a>
|
|||
|
<h4 id="X10D_Time_DateTimeExtensions_Age_DateTime_DateTime_" data-uid="X10D.Time.DateTimeExtensions.Age(DateTime,DateTime)">Age(DateTime, DateTime)</h4>
|
|||
|
<div class="markdown level1 summary"><p>Returns the rounded-down integer number of years since a given date as of another specified date.</p>
|
|||
|
</div>
|
|||
|
<div class="markdown level1 conceptual"></div>
|
|||
|
<h5 class="decalaration">Declaration</h5>
|
|||
|
<div class="codewrapper">
|
|||
|
<pre><code class="lang-csharp hljs">public static int Age(this DateTime value, DateTime referenceDate)</code></pre>
|
|||
|
</div>
|
|||
|
<h5 class="parameters">Parameters</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Name</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><span class="parametername">value</span></td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><span class="parametername">referenceDate</span></td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<h5 class="returns">Returns</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">System.Int32</span></td>
|
|||
|
<td><p>The rounded-down integer number of years since <code data-dev-comment-type="paramref" class="paramref">value</code> as of the date specified by
|
|||
|
<code data-dev-comment-type="paramref" class="paramref">referenceDate</code>.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<span class="divider">|</span>
|
|||
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Time_DateTimeExtensions_First_DateTime_DayOfWeek_.md&value=---%0Auid%3A%20X10D.Time.DateTimeExtensions.First(DateTime%2CDayOfWeek)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|||
|
</span>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Time/DateTimeExtensions.cs/#L33">View Source</a>
|
|||
|
</span>
|
|||
|
<a id="X10D_Time_DateTimeExtensions_First_" data-uid="X10D.Time.DateTimeExtensions.First*"></a>
|
|||
|
<h4 id="X10D_Time_DateTimeExtensions_First_DateTime_DayOfWeek_" data-uid="X10D.Time.DateTimeExtensions.First(DateTime,DayOfWeek)">First(DateTime, DayOfWeek)</h4>
|
|||
|
<div class="markdown level1 summary"><p>Gets a date representing the first occurence of a specified day of the week in the current month.</p>
|
|||
|
</div>
|
|||
|
<div class="markdown level1 conceptual"></div>
|
|||
|
<h5 class="decalaration">Declaration</h5>
|
|||
|
<div class="codewrapper">
|
|||
|
<pre><code class="lang-csharp hljs">public static DateTime First(this DateTime value, DayOfWeek dayOfWeek)</code></pre>
|
|||
|
</div>
|
|||
|
<h5 class="parameters">Parameters</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Name</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><span class="parametername">value</span></td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DayOfWeek</span></td>
|
|||
|
<td><span class="parametername">dayOfWeek</span></td>
|
|||
|
<td><p>The day of the week.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<h5 class="returns">Returns</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><p>A <see cref="!:DateTime"></see> representing the first occurence of <code data-dev-comment-type="paramref" class="paramref">dayOfWeek</code>.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<span class="divider">|</span>
|
|||
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Time_DateTimeExtensions_FirstDayOfMonth_DateTime_.md&value=---%0Auid%3A%20X10D.Time.DateTimeExtensions.FirstDayOfMonth(DateTime)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|||
|
</span>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Time/DateTimeExtensions.cs/#L42">View Source</a>
|
|||
|
</span>
|
|||
|
<a id="X10D_Time_DateTimeExtensions_FirstDayOfMonth_" data-uid="X10D.Time.DateTimeExtensions.FirstDayOfMonth*"></a>
|
|||
|
<h4 id="X10D_Time_DateTimeExtensions_FirstDayOfMonth_DateTime_" data-uid="X10D.Time.DateTimeExtensions.FirstDayOfMonth(DateTime)">FirstDayOfMonth(DateTime)</h4>
|
|||
|
<div class="markdown level1 summary"><p>Gets a date representing the first day of the current month.</p>
|
|||
|
</div>
|
|||
|
<div class="markdown level1 conceptual"></div>
|
|||
|
<h5 class="decalaration">Declaration</h5>
|
|||
|
<div class="codewrapper">
|
|||
|
<pre><code class="lang-csharp hljs">public static DateTime FirstDayOfMonth(this DateTime value)</code></pre>
|
|||
|
</div>
|
|||
|
<h5 class="parameters">Parameters</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Name</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><span class="parametername">value</span></td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<h5 class="returns">Returns</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><p>A <see cref="!:DateTime"></see> representing the first day of the current month.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<span class="divider">|</span>
|
|||
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Time_DateTimeExtensions_GetIso8601WeekOfYear_DateTime_.md&value=---%0Auid%3A%20X10D.Time.DateTimeExtensions.GetIso8601WeekOfYear(DateTime)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|||
|
</span>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Time/DateTimeExtensions.cs/#L62">View Source</a>
|
|||
|
</span>
|
|||
|
<a id="X10D_Time_DateTimeExtensions_GetIso8601WeekOfYear_" data-uid="X10D.Time.DateTimeExtensions.GetIso8601WeekOfYear*"></a>
|
|||
|
<h4 id="X10D_Time_DateTimeExtensions_GetIso8601WeekOfYear_DateTime_" data-uid="X10D.Time.DateTimeExtensions.GetIso8601WeekOfYear(DateTime)">GetIso8601WeekOfYear(DateTime)</h4>
|
|||
|
<div class="markdown level1 summary"><p>Gets the ISO-8601 week number of the year for the current date.</p>
|
|||
|
</div>
|
|||
|
<div class="markdown level1 conceptual"></div>
|
|||
|
<h5 class="decalaration">Declaration</h5>
|
|||
|
<div class="codewrapper">
|
|||
|
<pre><code class="lang-csharp hljs">public static int GetIso8601WeekOfYear(this DateTime value)</code></pre>
|
|||
|
</div>
|
|||
|
<h5 class="parameters">Parameters</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Name</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><span class="parametername">value</span></td>
|
|||
|
<td><p>The date whose week number to return.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<h5 class="returns">Returns</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">System.Int32</span></td>
|
|||
|
<td><p>The ISO-8601 week number of the year.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<h5 id="X10D_Time_DateTimeExtensions_GetIso8601WeekOfYear_DateTime__remarks">Remarks</h5>
|
|||
|
<div class="markdown level1 remarks"><p>This implementation is directly inspired from a
|
|||
|
<a href="https://docs.microsoft.com/en-gb/archive/blogs/shawnste/iso-8601-week-of-year-format-in-microsoft-net">
|
|||
|
blog post
|
|||
|
</a>.
|
|||
|
about this subject.</p>
|
|||
|
</div>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<span class="divider">|</span>
|
|||
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Time_DateTimeExtensions_IsLeapYear_DateTime_.md&value=---%0Auid%3A%20X10D.Time.DateTimeExtensions.IsLeapYear(DateTime)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|||
|
</span>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Time/DateTimeExtensions.cs/#L83">View Source</a>
|
|||
|
</span>
|
|||
|
<a id="X10D_Time_DateTimeExtensions_IsLeapYear_" data-uid="X10D.Time.DateTimeExtensions.IsLeapYear*"></a>
|
|||
|
<h4 id="X10D_Time_DateTimeExtensions_IsLeapYear_DateTime_" data-uid="X10D.Time.DateTimeExtensions.IsLeapYear(DateTime)">IsLeapYear(DateTime)</h4>
|
|||
|
<div class="markdown level1 summary"><p>Returns a value indicating whether the year represented by the current <see cref="!:DateTime"></see> is a leap year.</p>
|
|||
|
</div>
|
|||
|
<div class="markdown level1 conceptual"></div>
|
|||
|
<h5 class="decalaration">Declaration</h5>
|
|||
|
<div class="codewrapper">
|
|||
|
<pre><code class="lang-csharp hljs">public static bool IsLeapYear(this DateTime value)</code></pre>
|
|||
|
</div>
|
|||
|
<h5 class="parameters">Parameters</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Name</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><span class="parametername">value</span></td>
|
|||
|
<td><p>The date whose year to check.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<h5 class="returns">Returns</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">System.Boolean</span></td>
|
|||
|
<td><p><span class="xref">true</span> if the year represented by <code data-dev-comment-type="paramref" class="paramref">value</code> is a leap year; otherwise,
|
|||
|
<span class="xref">false</span>.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<span class="divider">|</span>
|
|||
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Time_DateTimeExtensions_Last_DateTime_DayOfWeek_.md&value=---%0Auid%3A%20X10D.Time.DateTimeExtensions.Last(DateTime%2CDayOfWeek)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|||
|
</span>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Time/DateTimeExtensions.cs/#L92">View Source</a>
|
|||
|
</span>
|
|||
|
<a id="X10D_Time_DateTimeExtensions_Last_" data-uid="X10D.Time.DateTimeExtensions.Last*"></a>
|
|||
|
<h4 id="X10D_Time_DateTimeExtensions_Last_DateTime_DayOfWeek_" data-uid="X10D.Time.DateTimeExtensions.Last(DateTime,DayOfWeek)">Last(DateTime, DayOfWeek)</h4>
|
|||
|
<div class="markdown level1 summary"><p>Gets a date representing the final occurence of a specified day of the week in the current month.</p>
|
|||
|
</div>
|
|||
|
<div class="markdown level1 conceptual"></div>
|
|||
|
<h5 class="decalaration">Declaration</h5>
|
|||
|
<div class="codewrapper">
|
|||
|
<pre><code class="lang-csharp hljs">public static DateTime Last(this DateTime value, DayOfWeek dayOfWeek)</code></pre>
|
|||
|
</div>
|
|||
|
<h5 class="parameters">Parameters</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Name</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><span class="parametername">value</span></td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DayOfWeek</span></td>
|
|||
|
<td><span class="parametername">dayOfWeek</span></td>
|
|||
|
<td><p>The day of the week.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<h5 class="returns">Returns</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><p>A <see cref="!:DateTimeOffset"></see> representing the final occurence of <code data-dev-comment-type="paramref" class="paramref">dayOfWeek</code>.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<span class="divider">|</span>
|
|||
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Time_DateTimeExtensions_LastDayOfMonth_DateTime_.md&value=---%0Auid%3A%20X10D.Time.DateTimeExtensions.LastDayOfMonth(DateTime)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|||
|
</span>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Time/DateTimeExtensions.cs/#L101">View Source</a>
|
|||
|
</span>
|
|||
|
<a id="X10D_Time_DateTimeExtensions_LastDayOfMonth_" data-uid="X10D.Time.DateTimeExtensions.LastDayOfMonth*"></a>
|
|||
|
<h4 id="X10D_Time_DateTimeExtensions_LastDayOfMonth_DateTime_" data-uid="X10D.Time.DateTimeExtensions.LastDayOfMonth(DateTime)">LastDayOfMonth(DateTime)</h4>
|
|||
|
<div class="markdown level1 summary"><p>Gets a date representing the last day of the current month.</p>
|
|||
|
</div>
|
|||
|
<div class="markdown level1 conceptual"></div>
|
|||
|
<h5 class="decalaration">Declaration</h5>
|
|||
|
<div class="codewrapper">
|
|||
|
<pre><code class="lang-csharp hljs">public static DateTime LastDayOfMonth(this DateTime value)</code></pre>
|
|||
|
</div>
|
|||
|
<h5 class="parameters">Parameters</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Name</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><span class="parametername">value</span></td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<h5 class="returns">Returns</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><p>A <see cref="!:DateTimeOffset"></see> representing the last day of the current month.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<span class="divider">|</span>
|
|||
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Time_DateTimeExtensions_Next_DateTime_DayOfWeek_.md&value=---%0Auid%3A%20X10D.Time.DateTimeExtensions.Next(DateTime%2CDayOfWeek)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|||
|
</span>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Time/DateTimeExtensions.cs/#L110">View Source</a>
|
|||
|
</span>
|
|||
|
<a id="X10D_Time_DateTimeExtensions_Next_" data-uid="X10D.Time.DateTimeExtensions.Next*"></a>
|
|||
|
<h4 id="X10D_Time_DateTimeExtensions_Next_DateTime_DayOfWeek_" data-uid="X10D.Time.DateTimeExtensions.Next(DateTime,DayOfWeek)">Next(DateTime, DayOfWeek)</h4>
|
|||
|
<div class="markdown level1 summary"><p>Gets a date representing the next occurence of a specified day of the week in the current month.</p>
|
|||
|
</div>
|
|||
|
<div class="markdown level1 conceptual"></div>
|
|||
|
<h5 class="decalaration">Declaration</h5>
|
|||
|
<div class="codewrapper">
|
|||
|
<pre><code class="lang-csharp hljs">public static DateTime Next(this DateTime value, DayOfWeek dayOfWeek)</code></pre>
|
|||
|
</div>
|
|||
|
<h5 class="parameters">Parameters</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Name</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><span class="parametername">value</span></td>
|
|||
|
<td></td>
|
|||
|
</tr>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DayOfWeek</span></td>
|
|||
|
<td><span class="parametername">dayOfWeek</span></td>
|
|||
|
<td><p>The day of the week.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<h5 class="returns">Returns</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><p>A <see cref="!:DateTimeOffset"></see> representing the next occurence of <code data-dev-comment-type="paramref" class="paramref">dayOfWeek</code>.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<span class="divider">|</span>
|
|||
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Time_DateTimeExtensions_ToUnixTimeMilliseconds_DateTime_.md&value=---%0Auid%3A%20X10D.Time.DateTimeExtensions.ToUnixTimeMilliseconds(DateTime)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|||
|
</span>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Time/DateTimeExtensions.cs/#L122">View Source</a>
|
|||
|
</span>
|
|||
|
<a id="X10D_Time_DateTimeExtensions_ToUnixTimeMilliseconds_" data-uid="X10D.Time.DateTimeExtensions.ToUnixTimeMilliseconds*"></a>
|
|||
|
<h4 id="X10D_Time_DateTimeExtensions_ToUnixTimeMilliseconds_DateTime_" data-uid="X10D.Time.DateTimeExtensions.ToUnixTimeMilliseconds(DateTime)">ToUnixTimeMilliseconds(DateTime)</h4>
|
|||
|
<div class="markdown level1 summary"><p>Returns the number of milliseconds that have elapsed since 1970-01-01T00:00:00.000Z.</p>
|
|||
|
</div>
|
|||
|
<div class="markdown level1 conceptual"></div>
|
|||
|
<h5 class="decalaration">Declaration</h5>
|
|||
|
<div class="codewrapper">
|
|||
|
<pre><code class="lang-csharp hljs">public static long ToUnixTimeMilliseconds(this DateTime value)</code></pre>
|
|||
|
</div>
|
|||
|
<h5 class="parameters">Parameters</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Name</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><span class="parametername">value</span></td>
|
|||
|
<td><p>The current date.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<h5 class="returns">Returns</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">System.Int64</span></td>
|
|||
|
<td><p>The number of milliseconds that have elapsed since 1970-01-01T00:00:00.000Z.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<span class="divider">|</span>
|
|||
|
<a href="https://github.com/oliverbooth/X10D/new/main/apiSpec/new?filename=X10D_Time_DateTimeExtensions_ToUnixTimeSeconds_DateTime_.md&value=---%0Auid%3A%20X10D.Time.DateTimeExtensions.ToUnixTimeSeconds(DateTime)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
|
|||
|
</span>
|
|||
|
<span class="small pull-right mobile-hide">
|
|||
|
<a href="https://github.com/oliverbooth/X10D/blob/main/X10D/src/Time/DateTimeExtensions.cs/#L134">View Source</a>
|
|||
|
</span>
|
|||
|
<a id="X10D_Time_DateTimeExtensions_ToUnixTimeSeconds_" data-uid="X10D.Time.DateTimeExtensions.ToUnixTimeSeconds*"></a>
|
|||
|
<h4 id="X10D_Time_DateTimeExtensions_ToUnixTimeSeconds_DateTime_" data-uid="X10D.Time.DateTimeExtensions.ToUnixTimeSeconds(DateTime)">ToUnixTimeSeconds(DateTime)</h4>
|
|||
|
<div class="markdown level1 summary"><p>Returns the number of seconds that have elapsed since 1970-01-01T00:00:00.000Z.</p>
|
|||
|
</div>
|
|||
|
<div class="markdown level1 conceptual"></div>
|
|||
|
<h5 class="decalaration">Declaration</h5>
|
|||
|
<div class="codewrapper">
|
|||
|
<pre><code class="lang-csharp hljs">public static long ToUnixTimeSeconds(this DateTime value)</code></pre>
|
|||
|
</div>
|
|||
|
<h5 class="parameters">Parameters</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Name</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">DateTime</span></td>
|
|||
|
<td><span class="parametername">value</span></td>
|
|||
|
<td><p>The current date.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
<h5 class="returns">Returns</h5>
|
|||
|
<table class="table table-bordered table-striped table-condensed">
|
|||
|
<thead>
|
|||
|
<tr>
|
|||
|
<th>Type</th>
|
|||
|
<th>Description</th>
|
|||
|
</tr>
|
|||
|
</thead>
|
|||
|
<tbody>
|
|||
|
<tr>
|
|||
|
<td><span class="xref">System.Int64</span></td>
|
|||
|
<td><p>The number of seconds that have elapsed since 1970-01-01T00:00:00.000Z.</p>
|
|||
|
</td>
|
|||
|
</tr>
|
|||
|
</tbody>
|
|||
|
</table>
|
|||
|
</article>
|
|||
|
</div>
|
|||
|
|
|||
|
<div class="copyright-footer">
|
|||
|
<span>© Singulink. All rights reserved.</span>
|
|||
|
</div>
|
|||
|
</main>
|
|||
|
</div>
|
|||
|
|
|||
|
|
|||
|
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script>
|
|||
|
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
|
|||
|
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js" integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI" crossorigin="anonymous"></script>
|
|||
|
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.1/highlight.min.js"></script>
|
|||
|
<script type="text/javascript" src="../styles/jquery.twbsPagination.js"></script>
|
|||
|
<script type="text/javascript" src="../styles/url.min.js"></script>
|
|||
|
<script src="https://cdn.jsdelivr.net/npm/anchor-js/anchor.min.js"></script>
|
|||
|
<script type="text/javascript" src="../styles/docfx.js"></script>
|
|||
|
<script type="text/javascript" src="../styles/singulink.js"></script>
|
|||
|
<script type="text/javascript" src="../styles/main.js"></script> </body>
|
|||
|
</html>
|