Using scripting, what would be the best way to return a list of list containing first/last day of each month in a given year or consecutive years, given a year variable as the beginning year? Any guidance would be appreciated.
year = 2019
firstLastDay = []
Return:
[[Tue Jan 01 00:00:00 CST 2019, Thu Jan 31 00:00:00 CST 2019],
[Fri Feb 01 00:00:00 CST 2019, Thu Feb 28 00:00:00 CST 2019],
[Fri Mar 01 00:00:00 CST 2019, Sun Mar 31 00:00:00 CDT 2019],
[Mon Apr 01 00:00:00 CDT 2019, Tue Apr 30 00:00:00 CDT 2019],
[Wed May 01 00:00:00 CDT 2019, Fri May 31 00:00:00 CDT 2019],
[Sat Jun 01 00:00:00 CDT 2019, Sun Jun 30 00:00:00 CDT 2019],
[Mon Jul 01 00:00:00 CDT 2019, Wed Jul 31 00:00:00 CDT 2019],
[Thu Aug 01 00:00:00 CDT 2019, Sat Aug 31 00:00:00 CDT 2019],
[Sun Sep 01 00:00:00 CDT 2019, Mon Sep 30 00:00:00 CDT 2019],
[Tue Oct 01 00:00:00 CDT 2019, Thu Oct 31 00:00:00 CDT 2019],
[Fri Nov 01 00:00:00 CDT 2019, Sat Nov 30 00:00:00 CST 2019],
[Sun Dec 01 00:00:00 CST 2019, Tue Dec 31 00:00:00 CST 2019],
[Wed Jan 01 00:00:00 CST 2020, Fri Jan 31 00:00:00 CST 2020],
[Sat Feb 01 00:00:00 CST 2020, Fri Feb 29 00:00:00 CST 2020],
[Sun Mar 01 00:00:00 CST 2020, Tue Mar 31 00:00:00 CDT 2020],
[Wed Apr 01 00:00:00 CDT 2020, Thu Apr 30 00:00:00 CDT 2020],
[Fri May 01 00:00:00 CDT 2020, Sun May 31 00:00:00 CDT 2020],
[Mon Jun 01 00:00:00 CDT 2020, Tue Jun 30 00:00:00 CDT 2020],
[Wed Jul 01 00:00:00 CDT 2020, Fri Jul 31 00:00:00 CDT 2020],
[Sat Aug 01 00:00:00 CDT 2020, Mon Aug 31 00:00:00 CDT 2020],
[Tue Sep 01 00:00:00 CDT 2020, Wed Sep 30 00:00:00 CDT 2020],
[Thu Oct 01 00:00:00 CDT 2020, Sat Oct 31 00:00:00 CDT 2020],
[Sun Nov 01 00:00:00 CDT 2020, Mon Nov 30 00:00:00 CST 2020],
[Tue Dec 01 00:00:00 CST 2020, Thu Dec 31 00:00:00 CST 2020]]