merge the formfield patch from ooo-build
[ooovba.git] / helpcontent2 / source / text / scalc / 01 / func_weeknum.xhp
blob284f873c6054b15f3c7b19e754523919256beacd
1 <?xml version="1.0" encoding="UTF-8"?>
5 <!--
6 ***********************************************************************
8 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
9 *
10 * Copyright 2008 by Sun Microsystems, Inc.
12 * OpenOffice.org - a multi-platform office productivity suite
14 * $RCSfile: func_weeknum.xhp,v $
15 * $Revision: 1.8 $
17 * This file is part of OpenOffice.org.
19 * OpenOffice.org is free software: you can redistribute it and/or modify
20 * it under the terms of the GNU Lesser General Public License version 3
21 * only, as published by the Free Software Foundation.
23 * OpenOffice.org is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU Lesser General Public License version 3 for more details
27 * (a copy is included in the LICENSE file that accompanied this code).
29 * You should have received a copy of the GNU Lesser General Public License
30 * version 3 along with OpenOffice.org. If not, see
31 * <http://www.openoffice.org/license.html>
32 * for a copy of the LGPLv3 License.
34 ************************************************************************
35 -->
38 <helpdocument version="1.0">
39 <meta>
40 <topic id="textscalc01func_weeknumxml" indexer="include" status="PUBLISH">
41 <title id="tit" xml-lang="en-US">WEEKNUM</title>
42 <filename>/text/scalc/01/func_weeknum.xhp</filename>
43 </topic>
44 </meta>
45 <body>
46 <bookmark xml-lang="en-US" branch="index" id="bm_id3159161"><bookmark_value>WEEKNUM function</bookmark_value>
47 </bookmark>
48 <bookmark xml-lang="en-US" branch="hid/HID_FUNC_KALENDERWOCHE" id="bm_id3158403" localize="false"/><paragraph role="heading" id="hd_id3159161" xml-lang="en-US" level="2" l10n="U" oldref="54"><variable id="weeknum"><link href="text/scalc/01/func_weeknum.xhp">WEEKNUM</link>
49 </variable></paragraph>
50 <paragraph role="paragraph" id="par_id3149770" xml-lang="en-US" l10n="U" oldref="55"><ahelp hid="HID_FUNC_KALENDERWOCHE">WEEKNUM calculates the week number of the year for the internal date value.</ahelp></paragraph>
51 <paragraph role="note" id="par_idN105E4" xml-lang="en-US" l10n="NEW">The International Standard ISO 8601 has decreed that Monday shall be the first day of the week. A week that lies partly in one year and partly in another is assigned a number in the year in which most of its days lie. That means that week number 1 of any year is the week that contains the January 4th.<comment>UFI: see http://www.openoffice.org/issues/show_bug.cgi?id=33709</comment></paragraph>
52 <paragraph role="heading" id="hd_id3153055" xml-lang="en-US" level="3" l10n="U" oldref="56">Syntax</paragraph>
53 <paragraph role="code" id="par_id3147236" xml-lang="en-US" l10n="U" oldref="57">WEEKNUM(Number; Mode)</paragraph>
54 <paragraph role="paragraph" id="par_id3147511" xml-lang="en-US" l10n="U" oldref="58">
55 <emph>Number</emph> is the internal date number.</paragraph>
56 <paragraph role="paragraph" id="par_id3154269" xml-lang="en-US" l10n="U" oldref="59">
57 <emph>Mode</emph> sets the start of the week and the calculation type.</paragraph>
58 <paragraph role="paragraph" id="par_id3148930" xml-lang="en-US" l10n="U" oldref="60">1 = Sunday</paragraph>
59 <paragraph role="paragraph" id="par_id3154280" xml-lang="en-US" l10n="U" oldref="61">2 = Monday</paragraph>
60 <paragraph role="heading" id="hd_id3146948" xml-lang="en-US" level="3" l10n="U" oldref="62">Examples</paragraph>
61 <paragraph role="paragraph" id="par_id3150704" xml-lang="en-US" l10n="CHG" oldref="65">=WEEKNUM("1995-01-01";1) returns 1</paragraph>
62 <paragraph role="paragraph" id="par_id3149792" xml-lang="en-US" l10n="CHG" oldref="64">=WEEKNUM("1995-01-01";2) returns 52. If the week starts on Monday, Sunday belongs to the last week of the previous year.</paragraph>
63 </body>
64 </helpdocument>