I have learned how to be content in any circumstance.
Philippians 4:11

Words: Walter S. Landor (1775–1864), alt.
Music: Evan William H. Havergal, 1847, arranged by Lowell Mason in Cantica Laudis, by Mason & George J. Webb (New York & Boston, Massachusetts: Mason and Law & John P. Jewett, 1850), page 143 (🔊 pdf nwc).
If you know when these words were written,

Why, why repine, my pensive friend,
At pleasures slipped away?
Some will the stern fates never lend,
And all refuse to stay.
I see the rainbow in the sky,
The dew upon the grass,
I see them, and I ask not why
They glimmer or they pass.
With folded arms I linger not
To call them back; ’twere vain;
In this, or in some other spot,
I know they’ll shine again.