WOY()

WOY()

Gets the week number of the year.

Syntax

      WOY( <dDate>, <lIso> )  --> nWeek

Arguments

<dDate> A valid date.

Returns

<nWeek> The week number <lIso> Flag that indicates if <nWeek> is in ISO format.

Description

This function returns the week number of the year for a given date. It returns the week number in ISO format ( range 0 – 52, by default or passing TRUE as second parameter) or 1 – 52 if lIso is FALSE.

Examples

      ? WOY( hb_SToD( "20000131" ) ) // -> 3
      ? WOY( hb_SToD( "20000131" ), .F. ) // -> 4

Compliance

This function is new in Harbour.

Platforms

All

Files

Library is libmisc

Seealso

DOY()

Advertisements

2 responses to “WOY()

  1. Pingback: Harbour Date & Time Functions | Viva Clipper !

  2. Pingback: Harbour All Functions – W | Viva Clipper !

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s