Functions
weekofyear()
Calculates the week number of the year, in a specified time zone, from a UNIX timestamp.
Syntax
weekofyear(series int time, series string timezone) → series int
Arguments
time required series int timezone required series string Return Type
series int Example
indicator("Week of Year Example", overlay=true)
// Current bar time
currentWeek = weekofyear(time)
// Plot week number in Data Window
plot(currentWeek, title="Week Number")