WEEK

Contents


week is used to find the number of the week associated with a date.

 

Syntax

   week( exp_date )

 

Parameters

Element

Description

Restrictions

exp_date

Date type expression.

None.

 

Examples

   # What is the number of the current week ?
   Infbox "The number of the week is: "-week(date$)

 

Description and comments

The function week is used to calculate the number of the week associated with a given date. The weeks are numbered 0 to 53. The calculation mode, in accordacne with NF ISO standard 8601 is as follows:

The week begins on Monday (day 1) and ends on Sunday (day 7).

The first week of the year is that in which the first Thursday of the year falls. If the first day of the year is a Friday, Saturday or Sunday, there is therefore one week 0 which runs from the first of January to the first Sunday of January inclusive.

 

Associated errors

Error

Description

ERMODE (10)

Incorrect argument.

ERDATE (56)

Incorrect date.

 

Associated key words

DATE - AWEEK - DAY - DAY$ - MONTH - MONTH$ - YEAR - NDAY - NDAY$


CONTENTS


Copyright © Sage 1999 - 2007