summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/text/scalc/01/func_weekday.xhp152
1 files changed, 124 insertions, 28 deletions
diff --git a/source/text/scalc/01/func_weekday.xhp b/source/text/scalc/01/func_weekday.xhp
index 878d01ed06..1bfaa7dc1e 100644
--- a/source/text/scalc/01/func_weekday.xhp
+++ b/source/text/scalc/01/func_weekday.xhp
@@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-
-
-
+<helpdocument version="1.0">
<!--
* This file is part of the LibreOffice project.
*
@@ -18,34 +16,132 @@
* 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_weekdayxml" indexer="include" status="PUBLISH">
-<title id="tit" xml-lang="en-US">WEEKDAY </title>
-<filename>/text/scalc/01/func_weekday.xhp</filename>
-</topic>
+ <topic id="textscalc01func_weekdayxml" indexer="include" status="PUBLISH">
+ <title id="tit" xml-lang="en-US">WEEKDAY </title>
+ <filename>/text/scalc/01/func_weekday.xhp</filename>
+ </topic>
</meta>
+
<body>
-<bookmark xml-lang="en-US" branch="index" id="bm_id3154925"><bookmark_value>WEEKDAY function</bookmark_value>
+
+<bookmark xml-lang="en-US" branch="index" id="bm_id3154925">
+ <bookmark_value>WEEKDAY function</bookmark_value>
</bookmark>
-<bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_WOCHENTAG" id="bm_id3152359" localize="false"/><paragraph role="heading" id="hd_id3154925" xml-lang="en-US" level="2" l10n="U" oldref="136"><variable id="weekday"><link href="text/scalc/01/func_weekday.xhp">WEEKDAY</link>
-</variable></paragraph>
-<paragraph role="paragraph" id="par_id3154228" xml-lang="en-US" l10n="U" oldref="137"><ahelp hid="HID_FUNC_WOCHENTAG">Returns the day of the week for the given date value.</ahelp> The day is returned as an integer between 1 (Sunday) and 7 (Saturday) if no type or type=1 is specified. If type=2, numbering begins at Monday=1; and if type=3 numbering begins at Monday=0.</paragraph>
-<paragraph role="heading" id="hd_id3147217" xml-lang="en-US" level="3" l10n="U" oldref="138">Syntax</paragraph>
-<paragraph role="code" id="par_id3149033" xml-lang="en-US" l10n="U" oldref="139">WEEKDAY(Number; Type)</paragraph>
-<paragraph role="paragraph" id="par_id3149046" xml-lang="en-US" l10n="U" oldref="140">
-<emph>Number</emph>, as a date value, is a decimal for which the weekday is to be returned.</paragraph>
-<paragraph role="paragraph" id="par_id3154394" xml-lang="en-US" l10n="U" oldref="141">
-<emph>Type</emph> determines the type of calculation. For Type=1, the weekdays are counted starting from Sunday (this is the default even when the Type parameter is missing). For Type=2, the weekdays are counted starting from Monday=1. For Type=3, the weekdays are counted starting from Monday=0.</paragraph>
-<paragraph role="note" id="par_id3156188" xml-lang="en-US" l10n="U" oldref="142">These values apply only to the standard date format that you select under <switchinline select="sys"><caseinline select="MAC"><emph>%PRODUCTNAME - Preferences</emph></caseinline><defaultinline><emph>Tools - Options</emph></defaultinline></switchinline><emph> - %PRODUCTNAME Calc - Calculate</emph>.</paragraph>
-<paragraph role="heading" id="hd_id3153836" xml-lang="en-US" level="3" l10n="U" oldref="143">Examples</paragraph>
-<paragraph role="paragraph" id="par_id3150317" xml-lang="en-US" l10n="CHG" oldref="144">=WEEKDAY("2000-06-14") returns 4 (the Type parameter is missing, therefore the standard count is used. The standard count starts with Sunday as day number 1. June 14, 2000 was a Wednesday and therefore day number 4).</paragraph>
-<paragraph role="paragraph" id="par_id3153174" xml-lang="en-US" l10n="CHG" oldref="145">=WEEKDAY("1996-07-24";2) returns 3 (the Type parameter is 2, therefore Monday is day number 1. July 24, 1996 was a Wednesday and therefore day number 3).</paragraph>
-<paragraph role="paragraph" id="par_id3153525" xml-lang="en-US" l10n="CHG" oldref="146">=WEEKDAY("1996-07-24";1) returns 4 (the Type parameter is 1, therefore Sunday is day number 1. July 24, 1996 was a Wednesday and therefore day number 4).</paragraph>
-<paragraph role="paragraph" id="par_id3150575" xml-lang="en-US" l10n="CHG" oldref="147">=WEEKDAY(NOW()) returns the number of the current day.</paragraph>
-<paragraph role="tip" id="par_id3150588" xml-lang="en-US" l10n="U" oldref="171">To obtain a function indicating whether a day in A1 is a business day, use the IF and WEEKDAY functions as follows: <br/>IF(WEEKDAY(A1;2)&lt;6;"Business day";"Weekend")</paragraph>
+
+<bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_WOCHENTAG" id="bm_id3152359" localize="false"/>
+
+<paragraph id="hd_id3154925" role="heading" level="2" xml-lang="en-US"><variable id="weekday"><link href="text/scalc/01/func_weekday.xhp">WEEKDAY</link> </variable></paragraph>
+<paragraph id="par_id3154228" role="paragraph" xml-lang="en-US"><ahelp hid="HID_FUNC_WOCHENTAG">Returns the day of the week for the given date value.</ahelp> The day is returned as an integer between 1 (Sunday) and 7 (Saturday) if no type or type=1 is specified. For other types, see the table below.</paragraph>
+
+<paragraph id="hd_id3147217" role="heading" level="3" xml-lang="en-US">Syntax</paragraph>
+<paragraph id="par_id3149033" role="code" xml-lang="en-US">WEEKDAY(Number; Type)</paragraph>
+<paragraph id="par_id3149046" role="paragraph" xml-lang="en-US"> <emph>Number</emph>, as a date value, is a decimal for which the weekday is to be returned.</paragraph>
+<paragraph id="par_id3154394" role="paragraph" xml-lang="en-US"> <emph>Type</emph> is optional and determines the type of calculation. </paragraph>
+
+<table id="tbl_050220170549191947">
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id050220170615596613" role="tablehead" xml-lang="en-US">Type</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id05022017061559141" role="tablehead" xml-lang="en-US">Weekday number returned</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id050220170615599995" role="tablecontent" xml-lang="en-US">1 or omitted</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id050220170615597231" role="tablecontent" xml-lang="en-US">1 (Sunday) through 7 (Saturday). For compatibility with Microsoft Excel.</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id050220170609471518" role="tablecontent" localize="false" xml-lang="en-US">2</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id050220170615596260" role="tablecontent" xml-lang="en-US">1 (Monday) through 7 (Sunday).</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id050220170609564629" role="tablecontent" localize="false" xml-lang="en-US">3</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id050220170615597630" role="tablecontent" xml-lang="en-US">0 (Monday) through 6 (Sunday)</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id050220170609575426" role="tablecontent" localize="false" xml-lang="en-US">11</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id050220170615592023" role="tablecontent" xml-lang="en-US">1 (Monday) through 7 (Sunday).</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id050220170609583004" role="tablecontent" localize="false" xml-lang="en-US">12</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id050220170615591349" role="tablecontent" xml-lang="en-US">1 (Tuesday) through 7 (Monday).</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id05022017060959167" role="tablecontent" localize="false" xml-lang="en-US">13</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id050220170615593664" role="tablecontent" xml-lang="en-US">1 (Wednesday) through 7 (Tuesday).</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id050220170609591975" role="tablecontent" localize="false" xml-lang="en-US">14</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id050220170615599110" role="tablecontent" xml-lang="en-US">1 (Thursday) through 7 (Wednesday).</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id05022017061000285" role="tablecontent" localize="false" xml-lang="en-US">15</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id05022017061600535" role="tablecontent" xml-lang="en-US">1 (Friday) through 7 (Thursday).</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id050220170610017288" role="tablecontent" localize="false" xml-lang="en-US">16</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id050220170616003219" role="tablecontent" xml-lang="en-US">1 (Saturday) through 7 (Friday).</paragraph>
+ </tablecell>
+ </tablerow>
+ <tablerow>
+ <tablecell>
+ <paragraph id="par_id050220170610027543" role="tablecontent" localize="false" xml-lang="en-US">17</paragraph>
+ </tablecell>
+ <tablecell>
+ <paragraph id="par_id050220170616002095" role="tablecontent" xml-lang="en-US">1 (Sunday) through 7 (Saturday).</paragraph>
+ </tablecell>
+ </tablerow>
+</table>
+
+<paragraph id="par_id3156188" role="note" xml-lang="en-US">These values apply only to the standard date format that you select under <switchinline select="sys"><caseinline select="MAC"><item type="menuitem">%PRODUCTNAME - Preferences</item>
+</caseinline><defaultinline><item type="menuitem">Tools - Options</item></defaultinline></switchinline><emph/><item type="menuitem">- %PRODUCTNAME Calc - Calculate</item>.</paragraph>
+
+<paragraph id="hd_id3153836" role="heading" level="3" xml-lang="en-US">Examples</paragraph>
+<paragraph id="par_id3150317" role="paragraph" xml-lang="en-US"><item type="literal">=WEEKDAY("2000-06-14")</item> returns 4 (the Type parameter is missing, therefore the standard count is used. The standard count starts with Sunday as day number 1. June 14, 2000 was a Wednesday and therefore day number 4).</paragraph>
+<paragraph id="par_id3153174" role="paragraph" xml-lang="en-US"><item type="literal">=WEEKDAY("1996-07-24";2)</item> returns 3 (the Type parameter is 2, therefore Monday is day number 1. July 24, 1996 was a Wednesday and therefore day number 3).</paragraph>
+<paragraph id="par_id3153525" role="paragraph" xml-lang="en-US"><item type="literal">=WEEKDAY("1996-07-24";1)</item> returns 4 (the Type parameter is 1, therefore Sunday is day number 1. July 24, 1996 was a Wednesday and therefore day number 4).</paragraph>
+<paragraph id="par_id050220170616006699" role="paragraph" xml-lang="en-US"><item type="literal">=WEEKDAY("</item><item type="literal">2017</item><item type="literal">-0</item><item type="literal">5</item><item type="literal">-</item><item type="literal">02</item><item type="literal">";1</item><item type="literal">4</item><item type="literal">)</item> returns 6 (the Type parameter is 14, therefore Thursday is day number 1. May 2, 2017 was a Tuesday and therefore day number 6)</paragraph>
+<paragraph id="par_id3150575" role="paragraph" xml-lang="en-US"><item type="literal">=WEEKDAY(NOW())</item> returns the number of the current day.</paragraph>
+<paragraph id="par_id3150588" role="tip" xml-lang="en-US">To obtain a function indicating whether a day in A1 is a business day, use the IF and WEEKDAY functions as follows: <br/><item type="literal">IF(WEEKDAY(A1;2)&lt;6;"Business day";"Weekend")</item></paragraph>
</body>
-</helpdocument>
+
+</helpdocument> \ No newline at end of file