inyeartodate - script and chart function

This function returns True if timestamp lies inside the part of year containing base_date up until and including the last millisecond of base_date.

Syntax:  

InYearToDate (timestamp, base_date, period_no[, first_month_of_year])

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 year.
period_no The year can be offset by period_no. period_no is an integer, where the value 0 indicates the year that contains base_date. Negative values in period_no indicate preceding years, and positive values indicate succeeding years.
first_month_of_year If you want to work with (fiscal) years not starting in January, indicate a value between 2 and 12 in first_month_of_year.

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?