Legato
Legato

GoFiler Legato Script Reference

 

Legato v 1.5d

Application v 5.25a

  

 

Chapter FiveGeneral Functions (continued)

GetDayOfWeek Function

Overview

The GetDayOfWeek function returns the zero-based index of the day of the week for a provided date.

Syntax/Parameters

Syntax

int = GetDayOfWeek ( qword value | string value, [int format] );

Parameters

value

A qword containing a date-time value in milliseconds or a string in various formats. The time zone is not considered in the processing.

format

An optional int containing bitwise flags for the source value formatting. This parameter only applies to a string value type. The default formatting mode is ISO-8601 as designated by SD_ISO_8601. See Remarks for additional options.

Return Value

Returns an int as a zero-based index or a formatted error code on failure. The day indices are defined in the SDK:

DOW_SUNDAY     —  0

DOW_MONDAY     —  1

DOW_TUESDAY    —  2

DOW_WEDNESDAY  —  3

DOW_THURSDAY   —  4

DOW_FRIDAY     —  5

DOW_SATURDAY   —  6

 

Remarks

When the source value is a string, the format parameter can be as follows:

  Definition   Bitwise   Description
  Modes        
    SD_PARSEMODE   0x0000000F   String Parse Mode Mask
    SD_AMERICAN   0x00000000   String is American (mm/dd/yy)
    SD_EUROPEAN   0x00000001   String is European (dd/mm/yy)
    SD_ISO_8601   0x00000002   String is ISO-8601
  Options        
    SD_PARTIAL   0x00010000   Can be Partially Formatted

 

The first day is 0, or Sunday, while the last is 6, or Saturday.

Related Functions

Platform Support

Go13, Go16, GoFiler Complete, GoFiler Corporate, GoFiler, GoFiler Lite, GoXBRL

Legato IDE, Legato Basic