diff options
Diffstat (limited to 'helpcontent2/source/text/scalc/01/func_weeknum.xhp')
-rw-r--r-- | helpcontent2/source/text/scalc/01/func_weeknum.xhp | 184 |
1 files changed, 184 insertions, 0 deletions
diff --git a/helpcontent2/source/text/scalc/01/func_weeknum.xhp b/helpcontent2/source/text/scalc/01/func_weeknum.xhp new file mode 100644 index 000000000..99a089af3 --- /dev/null +++ b/helpcontent2/source/text/scalc/01/func_weeknum.xhp @@ -0,0 +1,184 @@ +<?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_weeknumxml" indexer="include" status="PUBLISH"> +<title id="tit" xml-lang="en-US">WEEKNUM</title> +<filename>/text/scalc/01/func_weeknum.xhp</filename> +</topic> +</meta> +<body> +<bookmark xml-lang="en-US" branch="index" id="bm_id3159161"><bookmark_value>WEEKNUM function</bookmark_value> +</bookmark> +<bookmark xml-lang="en-US" branch="hid/SC_HID_FUNC_KALENDERWOCHE" id="bm_id3158403" localize="false"/><h2 id="hd_id3159161"><variable id="weeknum"><link href="text/scalc/01/func_weeknum.xhp">WEEKNUM</link> +</variable></h2> +<paragraph role="paragraph" id="par_id3149770" xml-lang="en-US"><ahelp hid="HID_FUNC_KALENDERWOCHE">WEEKNUM calculates the week number of the year for the internal date value as defined in ODF OpenFormula and compatible with other spreadsheet applications.</ahelp></paragraph> +<paragraph role="paragraph" id="par_id3147220" xml-lang="en-US">Supported are two week numbering systems:</paragraph> +<table id="tab_id481535122363435"> + <tablerow> + <tablecell> + <paragraph id="par_id851535122363435" role="tablehead" xml-lang="en-US">System</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id901535122363436" role="tablehead" xml-lang="en-US" localize="false">Description</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id691535122363437" role="tablecontent" xml-lang="en-US">System 1</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id3147221" role="tablecontent" xml-lang="en-US">The week containing January 1 is the first week of the year, and is numbered week 1.</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id741535122455285" role="tablecontent" xml-lang="en-US">System 2</paragraph> + </tablecell> + <tablecell> + <paragraph role="tablecontent" id="par_id3147222" xml-lang="en-US">The week containing the first Thursday of the year is the first week of the year, and is numbered week 1. That means that week number 1 of any year is the week that contains January 4th. ISO 8601 defines this system and that the week starts on Monday.</paragraph> + </tablecell> + </tablerow> +</table> +<embed href="text/scalc/01/ODFF.xhp#odff"/> +<embed href="text/scalc/01/common_func.xhp#sectionsyntax"/> +<paragraph role="code" id="par_id3147236" xml-lang="en-US">WEEKNUM(Number [; Mode])</paragraph> +<paragraph role="paragraph" id="par_id3147511" xml-lang="en-US"> +<emph>Number</emph> is the internal date number.</paragraph> +<paragraph role="paragraph" id="par_id3154269" xml-lang="en-US"> +<emph>Mode</emph> sets the start of the week and the week numbering system. This parameter is optional, if omitted the default value is 1.</paragraph> +<table id="tab_id491535122633826"> + <tablerow> + <tablecell> + <paragraph id="par_id961535122993923" role="tablehead" xml-lang="en-US">System</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id151535122633826" role="tablehead" xml-lang="en-US">Mode</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id231535122633827" role="tablehead" xml-lang="en-US">Day of the week</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell rowspan="9"> + <paragraph id="par_id531535124180000" role="tablecontents" xml-lang="en-US">System 1</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id931535122633827" role="tablecontent" xml-lang="en-US" localize="false">1</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id351535122633828" role="tablecontent" xml-lang="en-US">Sunday</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id441535122735565" role="tablecontents" xml-lang="en-US" localize="false">2</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id591535122756686" role="tablecontents" xml-lang="en-US">Monday</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id541535122798459" role="tablecontents" xml-lang="en-US" localize="false">11</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id881535122835126" role="tablecontents" xml-lang="en-US">Monday</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id941535122866815" role="tablecontent" xml-lang="en-US" localize="false">12</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id241535122903569" role="tablecontents" xml-lang="en-US">Tuesday</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id271535124253476" role="tablecontents" xml-lang="en-US" localize="false">13</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id31535124277973" role="tablecontents" xml-lang="en-US">Wednesday</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id281535124290548" role="tablecontents" xml-lang="en-US" localize="false">14</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id21535124310462" role="tablecontents" xml-lang="en-US">Thursday</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id721535124338290" role="tablecontents" xml-lang="en-US" localize="false">15</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id921535124365435" role="tablecontents" xml-lang="en-US">Friday</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id781535124380237" role="tablecontents" xml-lang="en-US" localize="false">16</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id211535124416253" role="tablecontents" xml-lang="en-US">Saturday</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id601535124440320" role="tablecontents" xml-lang="en-US" localize="false">17</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id461535124473824" role="tablecontents" xml-lang="en-US">Sunday</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell rowspan="2"> + <paragraph id="par_id471535124489997" role="tablecontents" xml-lang="en-US">System 2</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id431535124539573" role="tablecontents" xml-lang="en-US" localize="false">21</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id391535124564520" role="tablecontents" xml-lang="en-US">Monday (ISO 8601)</paragraph> + </tablecell> + </tablerow> + <tablerow> + <tablecell> + <paragraph id="par_id971535124578111" role="tablecontents" xml-lang="en-US" localize="false">150</paragraph> + </tablecell> + <tablecell> + <paragraph id="par_id661535124640643" role="tablecontents" xml-lang="en-US">(ISO 8601, for interoperability with Gnumeric)</paragraph> + </tablecell> +</tablerow> +</table> +<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_id3150704" xml-lang="en-US"><item type="input">=WEEKNUM(DATE(1995;1;1);1)</item> returns 1</paragraph> +<paragraph role="paragraph" id="par_id3149792" xml-lang="en-US"><item type="input">=WEEKNUM(DATE(1995;1;1);2)</item> returns 1. Using System 1, the week containing January 1 is the first week of the year.</paragraph> +<paragraph role="paragraph" id="par_id3149793" xml-lang="en-US"><item type="input">=WEEKNUM(DATE(1995;1;1);21)</item> returns 52. Week 1 starts on Monday, 1995-01-02.</paragraph> +<paragraph role="paragraph" id="par_id3149794" xml-lang="en-US"><item type="input">=WEEKNUM(DATE(1999;1;1);21)</item> returns 53. Week 1 starts on Monday, 1999-01-04.</paragraph> +<section id="relatedtopics"> + <embed href="text/scalc/01/04060102.xhp#datetimefunctions"/> +</section> +</body> +</helpdocument> |