What year was the Pledge of Allegiance written?

What year was the Pledge of Allegiance written?