How to get the next trading day's date?

Hi,
My strategy is supposed to deduct monthly broker fee at the end of month. I think it could be done by comparing next trading day's month number with today, but what's the proper way to get the next trading day's date? Or, is there a convenient way to determine month end or year end? Thanks.

There must be something missing in your question
 Next day: current day +
timedelta(days=1)
End of Month ... use the
calendar
module to do calculations.End of Year ... it is always
Year1231
.If you consider the trading days to be the end you have to use trading calendars: https://www.backtrader.com/docu/tradingcalendar/tradingcalendar/
 Next day: current day +

I mean "the next trading day" according to the data line, which is a line of daily bars. For example, suppose 4/30/2018 is a tradinghalt day and no data on that day, and then 4/27 should be the end of month, but calendar module thinks 4/30 is.
Another use case is there may be data point missing on a particular day, say 4/30/2018, and then I want to use 4/27 as the end of month.
It would be too much work to add every holiday or datamissing days to the calendar. So the goal is to get dates from data lines, whatever they are. Does there exist something like
self.datetime
can do that? Thanks.

@jesseliu0 You could try...
self.datas[0].datetime.date(1)
But you'll get an error on the last datas.

@runout
Cool! Exactly what I want. Thank you so much.

That won't give you the next trading day. It only peeks into data (when preloaded) in the future, which is of course cheating and not portable to nonpreloaded data. Be your own guest.

@backtrader My bad...

@backtrader said in How to get the next trading day's date?:
That won't give you the next trading day. It only peeks into data (when preloaded) in the future, which is of course cheating and not portable to nonpreloaded data. Be your own guest.
Not peeking into data. Peeking into calendar on data.

Cheat on yourself as you wish.