Skip to content

Instantly share code, notes, and snippets.

@maierru
Created January 14, 2019 13:23
Show Gist options
  • Save maierru/7e6755dc44595a37833921064f9a8ddb to your computer and use it in GitHub Desktop.
Save maierru/7e6755dc44595a37833921064f9a8ddb to your computer and use it in GitHub Desktop.
mac os x bash last day of each month
$ for i in {1..12}; do date -v1d -v-1d -v-${i}m +%Y-%m-%d; done
2018-11-30
2018-10-31
2018-09-30
2018-08-31
2018-07-31
2018-06-30
2018-05-31
2018-04-30
2018-03-31
2018-02-28
2018-01-31
2017-12-31
@zerolethanh
Copy link

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment