summaryrefslogtreecommitdiffstats
path: root/helpcontent2/source/text/scalc/01/func_yearfrac.xhp
diff options
context:
space:
mode:
Diffstat (limited to 'helpcontent2/source/text/scalc/01/func_yearfrac.xhp')
-rw-r--r--helpcontent2/source/text/scalc/01/func_yearfrac.xhp100
1 files changed, 100 insertions, 0 deletions
diff --git a/helpcontent2/source/text/scalc/01/func_yearfrac.xhp b/helpcontent2/source/text/scalc/01/func_yearfrac.xhp
new file mode 100644
index 000000000..52cb40c5c
--- /dev/null
+++ b/helpcontent2/source/text/scalc/01/func_yearfrac.xhp
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ -->
+<helpdocument version="1.0">
+<meta>
+<topic id="textscalc01func_yearfracxml" indexer="include" status="PUBLISH">
+<title id="tit" xml-lang="en-US">YEARFRAC</title>
+<filename>/text/scalc/01/func_yearfrac.xhp</filename>
+</topic>
+</meta>
+<body>
+<bookmark xml-lang="en-US" branch="index" id="bm_id3148735"><bookmark_value>YEARFRAC function</bookmark_value>
+</bookmark>
+<bookmark xml-lang="en-US" branch="hid/SC_HID_AAI_FUNC_YEARFRAC" id="bm_id3149251" localize="false"/>
+<h2 id="hd_id3148735"><variable id="yearfrac"><link href="text/scalc/01/func_yearfrac.xhp">YEARFRAC</link></variable></h2>
+<paragraph role="paragraph" id="par_id3150899" xml-lang="en-US"><ahelp hid="HID_AAI_FUNC_YEARFRAC">The result is the number of the years (including fractional part) between <emph>StartDate</emph> and <emph>EndDate</emph>.</ahelp></paragraph>
+<embed href="text/scalc/01/ODFF.xhp#odff"/>
+<embed href="text/scalc/01/common_func.xhp#sectionsyntax"/>
+<paragraph role="code" id="par_id3155823" xml-lang="en-US">YEARFRAC(StartDate; EndDate [; Basis])</paragraph>
+<paragraph role="paragraph" id="par_id3145144" xml-lang="en-US">
+<emph>StartDate</emph> and <emph>EndDate</emph> are two date values.</paragraph>
+<section id="basis">
+<paragraph role="paragraph" id="par_id3149954" xml-lang="en-US">
+<emph>Basis</emph> (optional) is chosen from a list of options and indicates how the year is to be calculated.</paragraph>
+<table id="tbl_id3145590">
+<tablerow>
+<tablecell>
+<paragraph role="tablehead" id="par_id3146847" xml-lang="en-US">Basis</paragraph>
+</tablecell>
+<tablecell>
+<paragraph role="tablehead" id="par_id3155956" xml-lang="en-US">Calculation</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell>
+<paragraph role="tablecontent" id="par_id3154502" xml-lang="en-US">0 or missing</paragraph>
+</tablecell>
+<tablecell>
+<paragraph role="tablecontent" id="par_id3149877" xml-lang="en-US">US method (NASD), 12 months of 30 days each</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell>
+ <paragraph role="tablecontent" id="par_id3148766" xml-lang="en-US" localize="false">1</paragraph>
+</tablecell>
+<tablecell>
+<paragraph role="tablecontent" id="par_id3154326" xml-lang="en-US">Exact number of days in months, exact number of days in year</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell>
+ <paragraph role="tablecontent" id="par_id3145245" xml-lang="en-US" localize="false">2</paragraph>
+</tablecell>
+<tablecell>
+<paragraph role="tablecontent" id="par_id3155620" xml-lang="en-US">Exact number of days in month, year has 360 days</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell>
+ <paragraph role="tablecontent" id="par_id3145297" xml-lang="en-US" localize="false">3</paragraph>
+</tablecell>
+<tablecell>
+<paragraph role="tablecontent" id="par_id3148394" xml-lang="en-US">Exact number of days in month, year has 365 days</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell>
+ <paragraph role="tablecontent" id="par_id3151022" xml-lang="en-US" localize="false">4</paragraph>
+</tablecell>
+<tablecell>
+<paragraph role="tablecontent" id="par_id3150931" xml-lang="en-US">European method, 12 months of 30 days each</paragraph>
+</tablecell>
+</tablerow>
+</table>
+</section>
+<embed href="text/scalc/01/04060102.xhp#datenumberinfo"/>
+<embed href="text/scalc/01/04060102.xhp#datenumberwarn"/>
+<embed href="text/scalc/01/common_func.xhp#sectionexample"/>
+<paragraph role="paragraph" id="par_id3149007" xml-lang="en-US">What fraction of the year 2008 lies between 2008-01-01 and 2008-07-01?</paragraph>
+<paragraph role="paragraph" id="par_id3154632" xml-lang="en-US"><item type="input">=YEARFRAC("2008-01-01"; "2008-07-01";0)</item> returns 0.50.</paragraph>
+<section id="relatedtopics">
+ <embed href="text/scalc/01/04060102.xhp#datetimefunctions"/>
+</section>
+</body>
+</helpdocument>