Talk:William Shakespeare's Works/Plays in Chronological Order

Are these in order of when he wrote them or when they were first performed or published? I've seen that "Comedy of Errors" is one of Shakespeare's first,but that may be of when he wrote them.