summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <atimar@suse.com>2012-06-13 15:53:55 +0200
committerAndras Timar <atimar@suse.com>2012-06-13 18:42:06 +0200
commit2d35abd10170f3e00b8c24ea0b3b85e1a90d5110 (patch)
treeee8f704305e5a6b8d0011ade7b44b75d9d77ca52
parenta1946cd22e74c07368adcc208b7b2819a116586e (diff)
add help for DATEDIF function
Change-Id: I1af5ed59b187cb0c75f6ed0b704fee02230906a0
-rw-r--r--helpcontent2/source/text/scalc/01/04060102.xhp5
-rw-r--r--helpcontent2/source/text/scalc/01/func_datedif.xhp104
-rw-r--r--helpcontent2/source/text/scalc/01/makefile.mk1
-rw-r--r--helpcontent2/util/scalc/makefile.mk1
4 files changed, 111 insertions, 0 deletions
diff --git a/helpcontent2/source/text/scalc/01/04060102.xhp b/helpcontent2/source/text/scalc/01/04060102.xhp
index b53b1d6eae..8d4912fba1 100644
--- a/helpcontent2/source/text/scalc/01/04060102.xhp
+++ b/helpcontent2/source/text/scalc/01/04060102.xhp
@@ -111,6 +111,11 @@
<embedvar href="text/scalc/01/func_date.xhp#date"/>
</paragraph>
</section>
+<section id="datedif">
+<paragraph role="paragraph" id="par_id6354457" xml-lang="en-US" l10n="NEW">
+<embedvar href="text/scalc/01/func_datedif.xhp#datedif"/>
+</paragraph>
+</section>
<section id="datevalue">
<paragraph role="paragraph" id="par_id3372295" xml-lang="en-US" l10n="NEW">
<embedvar href="text/scalc/01/func_datevalue.xhp#datevalue"/>
diff --git a/helpcontent2/source/text/scalc/01/func_datedif.xhp b/helpcontent2/source/text/scalc/01/func_datedif.xhp
new file mode 100644
index 0000000000..3dcf7775f7
--- /dev/null
+++ b/helpcontent2/source/text/scalc/01/func_datedif.xhp
@@ -0,0 +1,104 @@
+<?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/.
+ *
+-->
+<helpdocument version="1.0">
+<meta>
+<topic id="textscalc01func_datedifxml" indexer="include" status="PUBLISH">
+<title id="tit" xml-lang="en-US">DATEDIF</title>
+<filename>/text/scalc/01/func_datedif.xhp</filename>
+</topic>
+</meta>
+<body>
+<bookmark xml-lang="en-US" branch="index" id="bm_id3155511"><bookmark_value>DATEDIF function</bookmark_value>
+</bookmark>
+<bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_DATEDIF" id="bm_id3149022" localize="false"/><paragraph role="heading" id="hd_id3155511" xml-lang="en-US" level="2"><variable id="datedif"><link href="text/scalc/01/func_datedif.xhp">DATEDIF</link>
+</variable></paragraph>
+<paragraph role="paragraph" id="par_id3153551" xml-lang="en-US"><ahelp hid="HID_FUNC_DATUM">This function returns the number of whole days, months of years between Start date and End date.</ahelp></paragraph>
+<paragraph role="heading" id="hd_id3148590" xml-lang="en-US" level="3">Syntax</paragraph>
+<paragraph role="code" id="par_id3150474" xml-lang="en-US">DATEDIF(Start date; End date; Interval)</paragraph>
+<paragraph role="paragraph" id="par_id3152815" xml-lang="en-US">
+<emph>Start date</emph> is the date from when the calculation is carried out.</paragraph>
+<paragraph role="paragraph" id="par_id3155817" xml-lang="en-US">
+<emph>End date</emph> is the date until the calculation is carried out. End date must be later, than Start date.</paragraph>
+<paragraph role="paragraph" id="par_id3153183" xml-lang="en-US">
+<emph>Interval</emph> is a string, accepted values are "d", "m", "y", "ym", "md" or "yd".</paragraph>
+<table id="tbl_id1342204">
+<tablerow>
+<tablecell>
+<paragraph role="tablehead" id="par_id5735953" xml-lang="en-US">Value for "Interval"<comment>Do not translate the text values in this column below</comment></paragraph>
+</tablecell>
+<tablecell>
+<paragraph role="tablehead" id="par_id8360850" xml-lang="en-US">Return value</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell>
+<paragraph role="tablecontent" id="par_id9648731" xml-lang="en-US">"d"</paragraph>
+</tablecell>
+<tablecell>
+<paragraph role="tablecontent" id="par_id908841" xml-lang="en-US">Number of whole days between Start date and End date.</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell>
+<paragraph role="tablecontent" id="par_id8193914" xml-lang="en-US">"m"</paragraph>
+</tablecell>
+<tablecell>
+<paragraph role="tablecontent" id="par_id9841608" xml-lang="en-US">Number of whole months between Start date and End date.</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell>
+<paragraph role="tablecontent" id="par_id2701803" xml-lang="en-US">"y"</paragraph>
+</tablecell>
+<tablecell>
+<paragraph role="tablecontent" id="par_id2136295" xml-lang="en-US">Number of whole years between Start date and End date.</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell>
+<paragraph role="tablecontent" id="par_id9200109" xml-lang="en-US">"ym"</paragraph>
+</tablecell>
+<tablecell>
+<paragraph role="tablecontent" id="par_id4186223" xml-lang="en-US">Number of whole months when substracting years from the difference of Start date and End date.</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell>
+<paragraph role="tablecontent" id="par_id5766472" xml-lang="en-US">"md"</paragraph>
+</tablecell>
+<tablecell>
+<paragraph role="tablecontent" id="par_id1491134" xml-lang="en-US">Number of whole days when substracting years and months from the difference of Start date and End date.</paragraph>
+</tablecell>
+</tablerow>
+<tablerow>
+<tablecell>
+<paragraph role="tablecontent" id="par_id5866472" xml-lang="en-US">"yd"</paragraph>
+</tablecell>
+<tablecell>
+<paragraph role="tablecontent" id="par_id1591134" xml-lang="en-US">Number of whole days when substracting years from the difference of Start date and End date.</paragraph>
+</tablecell>
+</tablerow>
+</table>
+<paragraph role="heading" id="hd_id3147477" xml-lang="en-US" level="3">Example</paragraph>
+<paragraph role="paragraph" id="par_id3152589" xml-lang="en-US">
+Birthday calculation. A man was born on 1974-04-17. Today is 2012-06-13.</paragraph>
+<paragraph role="paragraph" id="par_id3252589" xml-lang="en-US">
+<item type="input">=DATE("1974-04-17";"2012-06-13";"y")</item> yields 38. <item type="input">=DATE("1974-04-17";"2012-06-13";"ym")</item> yields 1. <item type="input">=DATE("1974-04-17";"2012-06-13";"md")</item> yields 27. So he is 38 years, 1 month and 27 days old.</paragraph>
+<paragraph role="paragraph" id="par_id3352589" xml-lang="en-US">
+<item type="input">=DATE("1974-04-17";"2012-06-13";"m")</item> yields 457, he has been living for 457 months.</paragraph>
+<paragraph role="paragraph" id="par_id3452589" xml-lang="en-US">
+<item type="input">=DATE("1974-04-17";"2012-06-13";"d")</item> yields 13937, he has been living for 13937 days.</paragraph>
+<paragraph role="paragraph" id="par_id3752589" xml-lang="en-US">
+<item type="input">=DATE("1974-04-17";"2012-06-13";"yd")</item> yields 57, his birthdays was 57 days ago.</paragraph>
+</body>
+</helpdocument>
diff --git a/helpcontent2/source/text/scalc/01/makefile.mk b/helpcontent2/source/text/scalc/01/makefile.mk
index 5d4f0bd3ec..403d6968bd 100644
--- a/helpcontent2/source/text/scalc/01/makefile.mk
+++ b/helpcontent2/source/text/scalc/01/makefile.mk
@@ -197,6 +197,7 @@ XHPFILES = \
12120300.xhp \
format_graphic.xhp \
func_date.xhp \
+ func_datedif.xhp \
func_datevalue.xhp \
func_day.xhp \
func_days.xhp \
diff --git a/helpcontent2/util/scalc/makefile.mk b/helpcontent2/util/scalc/makefile.mk
index 52343f40d2..9e8b6f6534 100644
--- a/helpcontent2/util/scalc/makefile.mk
+++ b/helpcontent2/util/scalc/makefile.mk
@@ -222,6 +222,7 @@ LINKLINKFILES= \
text$/scalc$/01$/12120300.xhp \
text$/scalc$/01$/format_graphic.xhp \
text$/scalc$/01$/func_date.xhp \
+ text$/scalc$/01$/func_datedif.xhp \
text$/scalc$/01$/func_datevalue.xhp \
text$/scalc$/01$/func_day.xhp \
text$/scalc$/01$/func_days.xhp \