1

On macOS when using GNU date for an invalid date, like

gdate -d "18500229" '+%A %Y%m%d'

is there an option I have not found yet to turn off warnings such as gdate: invalid date ‘18500229’?

Til Hund
  • 1,543
  • 5
  • 21
  • 37
  • 1
    Would removing all error messages be enough ? If so, adding `2>/dev/null` at the end of your command would work. – Aserre Mar 13 '19 at 13:52
  • Yes, this works, Aserre! You can write a short answer and I`ll mark it. – Til Hund Mar 13 '19 at 13:54
  • 1
    Glad it worked for you :) I'll link a duplicate question where you can read more about it if you're interested – Aserre Mar 13 '19 at 13:55
  • 1
    The error is most likely `date` is not accepting the provided input date. The year does not have a 29 on the month 02 – Inian Mar 13 '19 at 14:17

0 Answers0