mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 22:39:17 +08:00
77 lines
3.6 KiB
HTML
77 lines
3.6 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>YEARFRAC Function</title>
|
|
<meta charset="utf-8" />
|
|
<meta name="description" content="" />
|
|
<link type="text/css" rel="stylesheet" href="../../../../../../common/main/resources/help/editor.css" />
|
|
<link type = "text/css" rel = "stylesheet" href = "../../images/sprite.css" />
|
|
<script type="text/javascript" src="../callback.js"></script>
|
|
<script type="text/javascript" src="../../../../../../common/main/resources/help/search/js/page-search.js"></script>
|
|
</head>
|
|
<body>
|
|
<div class="mainpart">
|
|
<div class="search-field">
|
|
<input id="search" class="searchBar" placeholder="Search" type="text" onkeypress="doSearch(event)">
|
|
</div>
|
|
<h1>YEARFRAC Function</h1>
|
|
<p>The <b>YEARFRAC</b> function is one of the <a href="../UsageInstructions/InsertFunction.htm#datetime" onclick="onhyperlinkclick(this)">date and time functions</a>. It is used to return the fraction of a year represented by the number of whole days from start-date to end-date calculated on the specified basis.</p>
|
|
<h3>Syntax</h3>
|
|
<p><b><em>YEARFRAC(start_date, end_date, [basis])</em></b></p>
|
|
<p>The <b>YEARFRAC</b> function has the following arguments:</p>
|
|
<table style="width: 40%">
|
|
<tr>
|
|
<th style="background-color: #f4f4f4" width="150ch"><b>Argument</b></th>
|
|
<th style="background-color: #f4f4f4"><b>Description</b></th>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>start_date</em></b></td>
|
|
<td>A number representing the first date of the period, entered using the <a href="Date.htm" onclick="onhyperlinkclick(this)">DATE</a> function or other date and time function.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>end_date</em></b></td>
|
|
<td>A number representing the last date of the period, entered using the <a href="Date.htm" onclick="onhyperlinkclick(this)">DATE</a> function or other date and time function.</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>basis</em></b></td>
|
|
<td>The day count basis to use, a numeric value greater than or equal to 0, but less than or equal to 4. The possible values are listed in the table below.</td>
|
|
</tr>
|
|
</table>
|
|
<p>The <b><em>basis</em></b> argument can be one of the following:</p>
|
|
<table style="width: 40%">
|
|
<tr>
|
|
<th style="background-color: #f4f4f4"><b>Numeric value</b></th>
|
|
<th style="background-color: #f4f4f4"><b>Count basis</b></th>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>0</em></b></td>
|
|
<td>US (NASD) 30/360</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>1</em></b></td>
|
|
<td>Actual/actual</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>2</em></b></td>
|
|
<td>Actual/360</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>3</em></b></td>
|
|
<td>Actual/365</td>
|
|
</tr>
|
|
<tr>
|
|
<td><b><em>4</em></b></td>
|
|
<td>European 30/360</td>
|
|
</tr>
|
|
</table>
|
|
<h3>Notes</h3>
|
|
<p>If the <b><em>start_date</em></b>, <b><em>end_date</em></b> or <b><em>basis</em></b> is a decimal value, the function will ignore the numbers to the right of the decimal point.
|
|
</p>
|
|
<p><a href="../UsageInstructions/InsertFunction.htm#applyfunction" onclick="onhyperlinkclick(this)">How to apply</a> the <b>YEARFRAC</b> function.</p>
|
|
|
|
<h3>Examples</h3>
|
|
<p>The figure below displays the result returned by the <b>YEARFRAC</b> function.</p>
|
|
<p><img alt="YEARFRAC Function" src="../images/yearfrac.png" /></p>
|
|
</div>
|
|
</body>
|
|
</html> |