That would be what's called a "Time, place and manner" restriction that has been upheld by the Supreme Court. Legally, the precedent has been set that despite the first amendment, although the government cannot stop you from swearing altogether, they can restrict you from saying certain things at certain times or places, as long as the restrictions are reasonably balanced against your free-speech rights.
[–] MaxVieuxlieu 0 points 1 point 1 point (+1|-0) ago
That would be what's called a "Time, place and manner" restriction that has been upheld by the Supreme Court. Legally, the precedent has been set that despite the first amendment, although the government cannot stop you from swearing altogether, they can restrict you from saying certain things at certain times or places, as long as the restrictions are reasonably balanced against your free-speech rights.