Skip to main content

for example, if today's month: 11.month-november, it should give me 31.10.2022

if its 10.month-october, it should give me 30.09.2022

I found out the solution.

I will just get the firstday of the month, it will give me 01.11.2022

and i will substract 1 day from that value, so it will give me the last of the last month.


Pls post code screenshot of solution.


i have created a csv file with all the last day of month. The bot read the content by month and year and get the last day. inputs are year and month.

 

year,month,end_of_month

2022, 01, 31.01.2022

2022, 02, 28.02.2022

..

2024, 01, 31.01.2024

2024, 02, 29, 29.01.2024

..

 

Consider the leap-year.

 

Regards

 


Reply