Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

dxGetWeekNumber(TDateTime,TDay,TcxFirstWeekOfYear) Method

Returns the week number in a year.

#Declaration

Delphi
function dxGetWeekNumber(ADate: TDateTime; AStartOfWeek: TDay; AFirstWeekOfYear: TcxFirstWeekOfYear): Integer;

#Parameters

Name Type
ADate TDateTime
AStartOfWeek TDay
AFirstWeekOfYear TcxFirstWeekOfYear

#Returns

Type
Integer

#Remarks

Use this function to determine the week number in a year.

The ADate parameter specifies the date that the given week contains.

The AStartOfWeek parameter specifies the day, which will be treated as the first day in each week.

The AFirstWeekOfYear parameter specifies the week that should be considered as the first week of a year.

See Also