NUMSEMANA

WEEKNUM calculates the week number of the year for the internal date value as defined in ODF OpenFormula and compatible with other spreadsheet applications.

Supported are two week numbering systems:

Sistema

Description

Sistema 1

The week containing January 1 is the first week of the year, and is numbered week 1.

Sistema 2

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.


note

Esta función é parte da norma Formato Open Document para Aplicacións de Ofimática (OpenDocument), versión 1.2 (ISO/IEC 26300:2-2015)


Sintaxe

WEEKNUM(Number [; Mode])

Number is the internal date number.

Mode sets the start of the week and the week numbering system. This parameter is optional, if omitted the default value is 1.

Sistema

Modo

Day of the week

Sistema 1

1

Domingo

2

Luns

11

Luns

12

Martes

13

Mércores

14

Xoves

15

Venres

16

Sábado

17

Domingo

Sistema 2

21

Monday (ISO 8601)

150

(ISO 8601, para compatibilidade co Gnumeric)


note

Ao inserir datas como partes de fórmulas, as barras ou guións empregados como separadores de datas interprétanse como operadores aritméticos. Polo tanto, as datas introducidas neste formato non se recoñecen como datas e producen cálculos erróneos. Para que as datas sexan interpretadas como parte das fórmulas hai que empregar a función DATA, por exemplo, DATA(1954;7;20) ou colocar a data entre aspas e empregar a notación ISO 8601, por exemplo, «1954-07-20». Evite empregar formatos de data dependentes de formatos rexionais, como «07/20/54» porque o cálculo pode producir erros se o documento se carga cunha configuración local diferente.


tip

É posíbel unha conversión sen ambigüidades para as datas e horas en ISO 8601 nos seus formatos estendidos con separadores. Se se produce un erro #VALUE!, desmarque Xerar erro #VALUE! en - Calc do LibreOffice - Fórmula, botón Detalles... na sección «Configuración detallada para cálculos», na caixa de lista Conversión de texto en número.


Exemplos

=WEEKNUM(DATE(1995;1;1);1) returns 1

=WEEKNUM(DATE(1995;1;1);2) returns 1. Using System 1, the week containing January 1 is the first week of the year.

=WEEKNUM(DATE(1995;1;1);21) returns 52. Week 1 starts on Monday, 1995-01-02.

=WEEKNUM(DATE(1999;1;1);21) returns 53. Week 1 starts on Monday, 1999-01-04.

Precisamos da súa axuda!