Institutes of the Christian Religion (1559) - John Calvin
Book 2 - God the Redeemer
Chapter 8 - Explanation of the Moral Law:
The 10 Commandments
Sections 22-27 - Third Commandment - His name in Vain
Section 22 - Interpretation: we must "hallow the majesty of His Name."
All we think and say of God should match the majesty of His character, Word, sacraments and works.
Section 23 - The oath as confession to God
An oath is calling God as witness to confirm the truth of our word.
You can tell a man's god by who he swears by.
Isa 19:18; 65:16; Jer 12:16; 5:7; Zeph 1:4-5.
Section 24 - The false oath as a desecration of God's name
Swearing by God's name to a lie is profaning His name - Lev 19:12.
We maintain His glorious name by swearing to the truth, by His name.
Josh 7:19; John 9:24
Other modes of swearing by God: 1 Sam 14:39; 14:44; 2 Sam 3:9; 2 Kings 6:31; Rom 1:9; 2 Cor 1:23.
Section 25 - The idle oath
Needless oaths cheapen God's name.
We do this so much today it isn't regarded as the great offense it is.
But it remains so, as men take oaths idly for selfish lust or ambition.
Swear only by God - Ex 23:13; Deut 6:13; Heb 6:16-17.
Section 26 - Doesn't Jesus forbid this kind of oath?
Jesus and James give blanket statements in Matt 5:34, 37; James 5:12.
To take it at face value would set Jesus against His Father.
The Father allows and even commands oaths - Ex 22:10-11.
The Son is one with the Father - John 10:30, 18; 7:16.
Jesus forbids not all swearing, but idle oaths, especially swearing by things other than God to escape taking His name in vain.
Section 27 - The extrajudicial oath is therefore necessarily admissible
Paul called God as witness, effectively taking an oath - Rom 1:9; 2 Cor 1:23.
Oaths in civil courts are allowed.
Private oaths with proper intent are, too.
1 Sam 24:12; Gen 31:53-54; Ruth 3:13; 1 Kings 18:10.
The purpose of an oath is to "vindicate the Lord's glory, or to further a brother's edification." (Note, it is not to vindicate one's self!)