Skip to main content

inweek - script and chart function

This function returns True if timestamp lies inside the week containing base_date.

Syntax:  

InWeek (timestamp, base_date, period_no[, first_week_day])

Return data type: Boolean

Arguments:  

Argument Description
timestamp The date that you want to compare with base_date.
base_date Date that is used to evaluate the week.
period_no The week can be offset by period_no. period_no is an integer, where the value 0 indicates the week which contains base_date. Negative values in period_no indicate preceding weeks and positive values indicate succeeding weeks.
first_week_day

By default, the first day of the week is Monday,starting at midnight between Sunday and Monday. To indicate the week starting on another day, specify an offset in first_week_day. This may be given as a whole number of days and/or fractions of a day.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!