If you ask google these series of questions, he can give you the correct answers.
1- who was the president of US in 2015? Google: Obama
2- who was the president of US in 2016? Google: Obama
3- who was the president of US in 2017? Google: Obama - Trump
4- who was the president of US in 2018? Google: Trump
How Google(search engines) understand these times to answer the correct questions?