On the campaign trail, Donald Trump says Hillary Clinton is crooked, corrupt, and incompetent and has bad judgment.

But Trump’s animosity toward her is relatively new. Over the years, Trump has had a lot of nice things to say about his opponent. In fact, he has just as long a history (if not longer) of supporting Clinton than he does of blaming her for ruining the world.

He has been so consistent with his praise in the past two decades that last month the Hillary Victory Fund — a joint fundraising committee between the Democratic National Committee and the Clinton campaign — used his compliments in a political ad with the tagline "Donald Trump: occasionally right."

His comments date back at least to 1997:

1997: The introduction of his 1997 book The Art of the Comeback includes a picture of Trump and Clinton with the caption: "The first lady is a wonderful woman who has handled pressure incredibly well."

Now: Trump has repeatedly said Clinton does not have the temperament or stamina to be president, strongly implying that she would crack under pressure. Once he even suggested that she takes too many naps to be president.

2005: Trump made a point to invite Hillary and Bill Clinton to his third wedding, to Melania Trump, demanding their presence.

Now: Clinton says she attended the wedding on a whim. Trump says they had to be there because he donated to the Clinton Foundation.

2007: In the lead-up to the 2008 presidential election, Trump was torn between supporting two seemingly opposite New Yorkers: former Mayor Rudy Giuliani and Clinton. He told CNN he thought Clinton was "very talented": "They’re both terrific people, and I hope they both get the nomination." He went on to say that Clinton would be able to negotiate a good deal with Iran.

Now: Trump thinks the Iran deal is one of the worst deals ever negotiated. Talented is likely not a word you would hear him use in reference to Clinton.

2008: Throughout 2008, Trump consistently praised Clinton, calling her "smart" and "tough," and blogging that she would make a great president or vice president. In an interview with Fox News’s Neil Cavuto, he said, "I support Hillary. I think she’s fantastic," BuzzFeed uncovered.

Now: Trump’s evaluation of Clinton is far from "fantastic" these days. On the campaign trail, he often says she is "unbalanced" and "unstable": "Unstable Hillary Clinton lacks the judgment, temperament and moral character to lead this country — and I believe that so strongly," Trump said in Iowa this month. "She's really pretty close to unhinged, and you've seen, you've seen it a couple times. The people in the background know it, the people who know her know it and she's like an unbalanced person."

2012: When President Obama was running for reelection in 2012, Trump spoke very highly of Clinton's abilities as secretary of state: "Hillary Clinton I think is a terrific woman," Trump told Fox News’s Greta Van Susteren. "I am biased because I have known her for years. I live in New York. She lives in New York. I really like her and her husband both a lot. I think she really works hard. And I think, again, she’s given an agenda, it is not all of her, but I think she really works hard and I think she does a good job. I like her."

Now: Of course, now Trump blames Clinton and Obama for laying the groundwork for ISIS, among other things.

Trump changes his mind on a lot of things, but he’s been pretty consistent on the big issues.

For someone running as the Republican Party nominee, Trump has an incredibly short record of being a Republican, and a substantially longer one of praising his opposing candidate.

But he has a pretty straightforward response to all of this. Times have changed: He liked Clinton, Clinton messed up, and now he doesn’t like her, easy enough.

He has changed his mind a lot over the past two decades, perfectly catalogued in his books, of which Vox’s staff read 12: He has gone from calling for more restrictions on gun access to being the National Rifle Association's No. 1 ally. He supported single-payer health care, and now his position is anything but Obamacare. He was once pro-choice, yet this year he has had to walk back calls to punish women who get abortions. In 2009, he called President Obama a strong and competent leader in his book Think Like a Champion, before calling him a terrible dealmaker two years later in Time to Get Tough.

Many of his convictions are loose. But when it comes to core issues in his campaign — immigration, national security, trade policy — he has been strikingly consistent.

"He’s always been anti-immigrant, always been protectionist, always been fiercely nationalistic on matters of war and peace," Vox’s Dylan Matthews writes.

"We can't allow ourselves to welcome outsiders to our shores out of kindness," Trump wrote in his 2000 book The America We Deserve. "A liberal policy of immigration may seem to reflect confidence and generosity. But our current laxness toward illegal immigration shows a recklessness and disregard for those who live here legally."

On everything else, Trump changes with the wind: When Bill and Hillary Clinton were well-liked, he praised them; when Obama was being championed as America’s savior, Trump was there propping him up. But when Clinton’s numbers soured and when Obama’s birth certificate proved to be an opportunity to make headlines, Trump changed his tune.