On Wed, 1 Sept 2021 at 16:32, Christian Weisgerber <na...@mips.inka.de> wrote:
>
> Goetz Schultz:
>
> > I would go the other way and check tomorrows date. If it is "01", then I
> > know today is the last of this month:
> >
> > date --date="tomorrow" +%d
> > 02
>
> That's not OpenBSD.
>
> $ date --date="tomorrow" +%d
> date: unknown option -- -
> usage: date [-aju] [-f pformat] [-r seconds]
>         [-z output_zone] [+format] [[[[[[cc]yy]mm]dd]HH]MM[.SS]]
>


Not sure if it is OpenBSD. I am on Darwin right now

$ date -v+1d +%d # if today is the last day of the month, tomorrow will be 1st.

Reply via email to