No, neither of the verses says "whole world" nevertheless another verse does
1 John 2:2 And he is the propitiation for our sins: and not for ours only, but also for the sins of the whole world.
Albert Barnes' notes on the Bible
But also for the sins of the whole world - The phrase
the sins of is not in the original, but is not improperly supplied, for the connection demands it. This is one of the expressions occurring in the New Testament which demonstrate that the atonement was made for all people, and which cannot be reconciled with any other opinion. If he had died only for a part of the race, this language could not have been used. The phrase, the whole world, is one which naturally embraces all people; is such as would be used if it be supposed that the apostle meant to teach that Christ died for all people; and is such as cannot be explained on any other supposition. If he died only for the elect, it is not true that he is the propitiation for the sins of the whole world in any proper sense, nor would it be possible then to assign a sense in which it could be true. This passage, interpreted in its plain and obvious meaning, teaches the following things:
(1)that the atonement in its own nature is adapted to all people, or that it is as much fitted to one individual, or one class, as another;
(2)that it is sufficient in merit for all; that is, that if anymore should be saved than actually will be, there would be no need of any additional suffering in order to save them;
(3)that it has no special adaptedness to one person or class more than another; that is, that in its own nature it did not render the salvation of one easier than that of another.
It so magnified the law, so honoured God, so fully expressed the divine sense of the evil of sin in respect to all people, that the offer of salvation might be made as freely to one as to another, and that any and all might take shelter under it and be safe. Whether, however, God might not, for wise reasons, resolve that its benefits should be applied to a part only, is another question, and one which does not affect the inquiry about the intrinsic nature of the atonement. On the evidence that the atonement was made for all, see the 2 Corinthians 5:14 note, and Hebrews 2:9 note. (See also the Supplementary notes at these passages, for a general review of the argument regarding the extent of atonement.)