NUMSETMANA

From LibreOffice Help
Jump to: navigation, search

NUMSETMANA

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

S'admeten dos tipus compatibles de sistema de numeració de setmanes:

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

System 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.

Sintaxi

NUMSETMANA(Nombre; Mode)

Nombre és el número intern de la data.

Mode estableix el començament de la setmana i el sistema de numeració de la setmana. Aquest paràmetre és opcional, si s'omet el valor per defecte és 1.

1 = diumenge, sistema 1

2 = dilluns, sistema 1

11 = dilluns, sistema 1

12 = dimarts, sistema 1

13 = dimecres, sistema 1

14 = dijous, sistema 1

15 = divendres, sistema 1

14 = dissabte, sistema 1

17 = diumenge, sistema 1

21 = dilluns, sistema 2 (ISO 8601)

150 = Monday, system 2 (ISO 8601, for interoperability with Gnumeric)

Exemples

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

=NUMSETMANA("01-01-1995";2) retorna 52. Si la setmana comença en dilluns, diumenge pertany a l'última setmana de l'any anterior.

=NUMSETMANA(DATA(1999;1;1);21) retorna 53. Si la setmana 1 comença el dilluns,1999-01-04.

=NUMSETMANA(DATA(1999;1;1);21) retorna 53. Si la setmana 1 comença el dilluns,1999-01-04.