Consider following function (arguments are Int values following the yyyyMMdd logic, so e.g. 20200131 translates to 2020-Jan-31, it was built based on this article)