Ending the Hijri Year with Istighfar and Fasting
Question

As the Hijri year draws to a close, there are many text messages saying that the page recording one’s good deeds will be closed at the end of the year, and urging us to end it with prayers for forgiveness and fasting. What is the ruling on these messages? Is fasting the last day of the year Sunnah? If it coincides with a Monday or a Thursday is that Bid`ah?
Praise be to Allah.When are deeds presented to Allah?
The Sunnah indicates that people’s good deeds are taken up to be shown to Allah without any delay, twice each day: once at night and once during the day. 
It is narrated by Muslim (179) that Abu Musa Al-Ash`ari (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings of Allah be upon him) stood up before us and told us five things. He said: “Allah, may He be Glorified and Exalted, does not sleep and it is not befitting that He should sleep. He lowers the Balance and raises it; the deeds of the night are taken up to Him before the deeds of the day, and the deeds of the day before the deeds of the night…” 
An-Nawawi (may Allah have mercy on him) said: “The recording angels go up with the deeds of the night after it ends, at the beginning of the day, and they go up with the deeds of the day after it ends, at the beginning of the night.” 
Al-Bukhari (555) and Muslim (632) narrated from Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings of Allah be upon him) said: “The angels of the night and the day come to you in succession, and they meet at Fajr prayer and at `Asr prayer, then those who stayed among you ascend and their Lord asks them, although He knows best about them, `How did you leave My slaves?’ and they say, `We left them when they were praying and we came to them when they were praying.’”  
Ibn Hajar (may Allah have mercy on him) said: “This indicates that deeds are taken up at the end of the day. Whoever is in a state of obedience at that time will be blessed in his provision and his work, and Allah knows best. Hence we can see the wisdom behind the command to perform these prayers (Fajr and `Asr) regularly and pay attention to them.”
How many times are actions taken up to Allah weekly?
The Sunnah indicates that deeds are also shown to Allah (may He be Glorified and Exalted) twice each week. 
Muslim (2565) narrated from Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings of Allah be upon him) said: “People’s deeds are shown [to Allah] twice each week, on Monday and Thursday, and every believing slave is forgiven except a person between whom and his brother there is a dispute, and it is said, `Leave these two until they reconcile.’” 
Are deeds presented to Allah in Sha`ban?
The Sunnah also indicates that the good deeds of each year are taken up to Allah all at once in the month of Sha`ban .
An-Nasa’i (1257) narrated that Usamah ibn Zayd (may Allah be pleased with him) said: I said: O Messenger of Allah, I do not see you fasting as much in any month as you fast in Sha`ban . He said: “That is a month concerning which the people are heedless, between Rajab and Ramadan, but it is a month in which good deeds are taken up to the Lord of the Worlds, and I would like my deeds to be taken up when I am fasting.” (Classed as sound by Al-Albani in Sahih Al-Jami`)
These texts may be summed up by noting that people’s deeds are shown to Allah in three ways:

Daily, which happens twice a day
Weekly, which also happens twice, on Mondays and Thursdays
Annually, which happens once, during the month of Sha`ban

Ibn Al-Qayyim (may Allah have mercy on him) said: “The deeds of the year are taken up in Sha`ban, as the truthful one (the Prophet (peace and blessings of Allah be upon him) has told us. The deeds of the week are shown on Monday and Thursday, the deeds of the day are taken up at the end of the day before night comes, and the deeds of the night are taken up at the end of the night, before day comes. When a person’s life comes to an end, all his life’s deeds are taken up and the record of his deeds is closed.” (Hashiyat Sunan Abu Dawud)
The Hadiths which indicate that deeds are shown to Allah indicate that it is encouraged to do more deeds of obedience at the times when the deeds are being shown to Him, as the Prophet (peace and blessings of Allah be upon him) said concerning fasting in Sha`ban: “I would like my deeds to be taken up when I am fasting.” 
In Sunan At-Tirmidhi (747) it is narrated from Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings of Allah be upon him) said: “Deeds are shown (to Allah) on Mondays and Thursdays, and I would like my deeds to be shown when I am fasting.” (Classed as authentic by Al-Albani in Irwa’ Al-Ghalil (949) 
One of the Tabi`in (the generation after the Companions) used to weep in front of his wife on Thursdays and she would weep in front of him, and he would say: Today our deeds are being shown to Allah, may He be Glorified and Exalted. (This was mentioned by Ibn Rajab in Lata’if Al-Ma`arif) 
Should one end the Hijri year with Istighfar and fasting?
From what we have mentioned it is clear that there is no suggestion that at the end of an old year or the beginning of a new year the records of deeds are closed and deeds are shown to Allah. Rather deeds are shown to Him in the various ways that we have mentioned, and the texts describe other times for this. The texts also indicate that the way of the Prophet (peace and blessings of Allah be upon him) is to do more acts of obedience at those times. 
Shaykh Salih Al-Fawzan (may Allah preserve him) said concerning commemorating the end of the year: “There is no basis for that, and singling out the end of the year for specific acts of worship such as fasting is a reprehensible innovation (Bid`ah).” 
With regard to fasting on Mondays and Thursdays, if that is a person’s habit, or if he is fasting on those days because of the reports which encourage doing so, then he should not refrain from doing so because it coincides with the end or beginning of the year, so long as he is not fasting on that day because of that coincidence, or because he thinks that there is any special virtue in fasting on that occasion. 
And Allah knows best.