AnyLogic
Expand
Font size

getDayOfWeek

getDayOfWeek()

Description

Returns the serial number of the day of the week of the current model date with respect to the start time/date and the model time unit.

Returned value is an integer.

Result

Type Description
int The serial number of the day of the week of the current model date with respect to the start time/date and the model time unit.
The result depends on the system locale: for example, in some countries the week starts with Sunday (so Monday will be 2 in that case), while in others — with Monday (so Monday is 1).

getDayOfWeek(Date date)

Description

Returns the serial number of the day of the week of the specified date value.

Returned value is an integer.

Parameter

Name Type of value Description
date java.util.Date A date, presented in the form of the Date Java class.

Result

Type Description
int The serial number day of the week of the specified date value.
The result depends on the system locale: for example, in some countries the week starts with Sunday (so Monday will be 2 in that case), while in others — with Monday (so Monday is 1).
How can we improve this article?