What year was the Pledge of Allegiance written?

Society Trivia: What year was the Pledge of Allegiance written?