January 1, 2019 is the deadline for the last of Spain's unprofitable coal mines to cease production under an EU directive.