I had a FOSS project with a license which first mentioned "Copyright 2016". Then year 2017 came, and I replaced it with "Copyright 2017". After a while, I realized my mistake and replaced it with "Copyright 2016-2017". Is the license still valid, at least for 2017 onwards?
The copyright notice is not the definitive means by which the term of a copyright is determined. A copyright arises by operation of law when the work is created and terminated at a date calculated based upon the death of the author, if an individual, or after publication if owned by an entity (assuming U.S. law, the U.K. calculated the term differently). Copyright duration used to be calculated from the date of publication, so the year in the copyright notice is vestigal to a great extent.
A copyright notice must be present to give rise to statutory damages and attorneys' fee liability on the part of infringers.
I'm not aware of case law one way or the other governing whether an immaterial error in the year of the copyright, such as the one described in the OP impacts the validity of the copyright notice for this purpose (I wouldn't be surprised if there is a case on point, however).
I suspect that an error in the year of the copyright does not impact the availability of these remedies because even a copyright notice with the wrong year, so long as one is present, puts a potential infringer on notice that they may be subject to statutory damages and attorneys' fees in an infringement action, and the year shown in the copyright notice isn't actually used to calculate any right under copyright law.
In the case of a license, you are one step removed from that, and are simply using the copyright description to identify which copyright the license is referring to. This is governed by the intent of the drafter as discernible from the document, and at least if there is no risk of confusion with another different work than the one you intend to license, it shouldn't affect the validity of the licenses at all.
In the US, for works created after 1978, copyright expires for all works created by a given author at the same time, currently 70 years after the death of the author. The year of publication, and the year in the copyright notice, do not matter. If the "author" of the work is a corporation or business (such as a work-made-for-hire), the copyright expires 95 years after the work is published, or 120 years after it was created, whichever comes first. (It is a bit unusual for a work to be first published more than 25 years after it is created) See https://copyright.cornell.edu/publicdomain for more details on this.
Therefore the date will not matte to the copyright term in the situation that the OP describes, and an error in the date will not be materiel. In any case, even before he 1976 act, an error of 1 year in the copyright date was considered harmless and did not remove copyright protection, although larger errors could do so, as could publication with a notice with no date at all.
I would expect that the notice date would not give rise to any problem or loss of protection. As others have said, the correct form when materiel has been revised is "Copyright 2014-2017" or "copyright 2014, 2016, 2017".
The law may be different in different countries, but in any country adhering to the Berne Copyright Convention (which is almost every country in the world) a copyright notice cannot be required at all, nor can the exact form of the notice (if present) affect the rights of the copyright owner. Presence of a notice can give extra rights, such as a the right to statutory damages, but cannot be required for basic protection. See https://en.wikipedia.org/wiki/Berne_Convention for more info.
At least in the UK, copyright usually lasts up to 70 years or until the person or otherwise the owner dies (not wise having that as a law IMHO). There is Copyright, Designs, Patents Act 1988 for you to read.
As in the US, it may well be very different really. I don't really know much about it there.
If you have a software project with contributions from several years that created copyright, the correct thing is to write for example "Copyright 2014-2018"
Your copyright notice does two things: Tell the other person that you have a copyright, and tell the other person when the copyright runs out. The notice above, if you got copyright for 70 years, would mean "there are bits of software that you could use freely in 2084, and other bits where you have to wait until 2088". Leaving out the 2014 means you claim your copyright lasts longer than it does. Leaving out the 2018 means you are not claiming rights that you don't have. So the correct thing is to write the complete range.