Is the correct date format for pg_dump <filename>-$(date +%Y-%m-%d).sql or <filename>-YYYY-MM-DD.sql or something else?
If you are doing a custom format dump using .sql as the extension is objectively wrong. it is correct if you are doing an sql dump, but those are generally best avoided.