Difference between revisions of "Documentation/How Tos/Calc: WEEKSINYEAR function"

From Apache OpenOffice Wiki
Jump to: navigation, search
(See also:)
m (Robot: Automated text replacement %s)
Line 19: Line 19:
 
: returns <tt>'''53'''</tt>, the number of weeks in 2009. In 2009, both 1st January and 31st December fall on a Thursday; the weeks containing 1st January and 31st December both have most of their days in 2009, and therefore both are counted.
 
: returns <tt>'''53'''</tt>, the number of weeks in 2009. In 2009, both 1st January and 31st December fall on a Thursday; the weeks containing 1st January and 31st December both have most of their days in 2009, and therefore both are counted.
  
=== See also: ===
+
{{Documentation/SeeAlso|
'''[[Documentation/How_Tos/Calc: ISLEAPYEAR function|ISLEAPYEAR]]''',
+
* [[Documentation/How_Tos/Calc: ISLEAPYEAR function|ISLEAPYEAR]]
'''[[Documentation/How_Tos/Calc: DAYSINYEAR function|DAYSINYEAR]]''',
+
* [[Documentation/How_Tos/Calc: DAYSINYEAR function|DAYSINYEAR]]
'''[[Documentation/How_Tos/Calc: DAYSINMONTH function|DAYSINMONTH]]''',
+
* [[Documentation/How_Tos/Calc: DAYSINMONTH function|DAYSINMONTH]]
'''[[Documentation/How_Tos/Calc: DAYS function|DAYS]]'''
+
* [[Documentation/How_Tos/Calc: DAYS function|DAYS]]'''
  
'''[[Documentation/How_Tos/Calc: Date & Time functions#Date and Time overview|Date & Time overview]]'''
+
* [[Documentation/How_Tos/Calc: Date & Time functions#Date and Time overview|Date & Time overview]]'''
  
'''[[Documentation/How_Tos/Calc: Date & Time functions|Date & Time functions]]'''
+
* [[Documentation/How_Tos/Calc: Date & Time functions|Date & Time functions]]'''
  
[[Documentation/How_Tos/Calc: Functions listed alphabetically|'''Functions listed alphabetically''']],
+
* [[Documentation/How_Tos/Calc: Functions listed alphabetically|Functions listed alphabetically]]
[[Documentation/How_Tos/Calc: Functions listed by category|'''Functions listed by category''']]
+
* [[Documentation/How_Tos/Calc: Functions listed by category|Functions listed by category]]}}
  
 
=== Issues: ===
 
=== Issues: ===
 
* <tt>'''WEEKSINYEAR'''</tt> is not part of the forthcoming ODFF international standard, and should not be regarded as portable. It is not available in Excel.
 
* <tt>'''WEEKSINYEAR'''</tt> is not part of the forthcoming ODFF international standard, and should not be regarded as portable. It is not available in Excel.

Revision as of 14:27, 25 February 2009


WEEKSINYEAR

Returns the number of weeks in a year.

This function is only available if the Analysis AddIn is installed.

Syntax:

WEEKSINYEAR(date)

returns the number of weeks in the year in which date lies.
A week is considered to start on Monday, and is considered to be in the year if most of its days are in that year.

Example:

WEEKSINYEAR("2010-02-14")

returns 52, the number of weeks in 2010.

WEEKSINYEAR("2009-02-14")

returns 53, the number of weeks in 2009. In 2009, both 1st January and 31st December fall on a Thursday; the weeks containing 1st January and 31st December both have most of their days in 2009, and therefore both are counted.

Template:Documentation/SeeAlso

Issues:

  • WEEKSINYEAR is not part of the forthcoming ODFF international standard, and should not be regarded as portable. It is not available in Excel.
Personal tools