In the years before moving to the White House, Donald Trump used Twitter to call climate change “nonsense” peddled by “con artists” and “created by and for the Chinese.”

Whenever temperatures reached teeth-chattering lows during New York winters, he would tweet, tongue in cheek, that what we needed was a “heavy dose of global warming.”

But since becoming president, Trump laid off the broadsides — at least on Twitter — against the wide scientific consensus that the burning of fossil fuels and other human activity is indeed warming the planet.

However, he couldn’t let 2017 pass without one last swipe.

Even though he is vacationing in Palm Beach, Fla., where temperatures are in the 70s, Trump tweeted on Thursday seemingly mocking those who accept climate science, suggesting that the East Coast will be so cold on New Year’s Eve that global warming may be a good thing instead of an environmental calamity.

Before sending that message, Trump had not sent any tweet containing the phrase “climate change” or “global warming” since becoming president, according to the Trump Twitter archive.

In contrast, two years ago during the chilly winter of 2015, Trump sent off at least nine tweets holding up the thermometer as evidence that global warming can’t be happening.

Indeed, temperatures some 15 to 30 degrees lower than normal will grip much of the United States east of the Rockies for the next seven to 10 days. The cold snap will likely be the most frigid since February 2015 — when Trump last cast doubt on climate science because it was cold outside.

A prolonged period of bitter cold will be moving through many parts of the country as 2017 comes to an end. (Claritza Jimenez/The Washington Post)

But a single cold streak does not prove climate change is fake. Man-made global warming, as the name suggests, refers to the steady rise of average temperature of Earth’s climate system because of the buildup of heat-trapping gases in the atmosphere. Indeed, at the moment much of the rest of world is warmer than normal even if a portion of the United States is chilly.

And from January to November, the Lower 48 experienced the third warmest period on record, according to the National Oceanic and Atmospheric Administration.

That added energy to Earth’s climate system alters more than just average temperatures. One active and heavily debated area of climate research concerns the degree to which climate change causes the jet stream encircling the Arctic to wobble southward, and send a surge of cold air across portions of North America — as it is now.

Right now, the jet stream is crashing south in the eastern half of the continent while surging northward in the west half. That phenomenon, called the North American Winter Dipole, is strangely enough simultaneously responsible for freezing temperatures in the East and the roasting temperatures in the West, which are fueling recent forest fires in California.

Brian Brettschneider, a climatologist based in Alaska, calculated that New Year’s Eve would be third coldest since 1948 in the eastern United States. Actually, 2014 was a hair colder than the current forecast. His basis for comparison is the forecast from the Global Forecast System forecast model, which is the National Weather Service’s main prediction model, sometimes called the American model.

Trump’s tweet is reminiscent of the remarks Sen. James M. Inhofe (R-Okla.) made on the Senate floor in February 2015, after a Washington snowstorm. The senator, who has consistently questioned the connection between human activity and climate change, brought a snowball onto the floor and recalled how his children had built an igloo.

“It’s very, very cold out. Very unseasonable,” remarked Inhofe, who chaired the Senate Environment and Public Works Committee at the time.

Referring to the snowball as an example of “scientific analysis,” he threw it at the sitting Senate president and declared, “So, catch this.”

Several Democratic lawmakers, including Reps. Kathleen Rice (N.Y.) and Don Beyer (Va.), made it clear through tweets of their own that they were not impressed with the president’s musings about the weather.

“Instead of tweeting like a child who hates science class,” Rice tweeted, “if you’re so worried about the cold you could always send your 45M+ followers info about how to find shelter, prevent hypothermia & frost bite, prevent pipes from freezing, protect their pets, etc.”

Jason Samenow and Juliet Eilperin contributed to this report.