The Gemoro says (28b) that Moshe went up Har Sinai on the 7th Sivan, with 24 days in Sivan and 16 days of Tamuz making 40 days. The Maharsha says that this is like Rashi in Chumash that each day must include the night before.
I have 2 problems with this:
1) If Moshe went up on the 7th, that day did NOT include the night before (so how could we get 24 days in Sivan!)
2) Rashi in Chumash (32:1) actually says that the 1st day was NOT "Layla Imo" and the 40th day was the _17th_ of Tamuz (hence the Cheshbon would be 23 days in Sivan: 8th to 30th inclusive, and 17 days in Tamuz).
Hoping you can help
Meir Eliezer Bergman, Manchester UK
The explanation you are saying is a possible explanation, but not in our Gemara. Tosfos in Shabbos (89a, DH l'Sof) in fact asks this as a question on Rashi: how can Rashi apparently say that the Cheshbon is 23 in Sivan and 17 in Tamuz? Our Gemara explicitly says otherwise (24 and 16)! The Maginei Shlomo (in Shabbos ibid.) therefore explains that Rashi does not mean to say that the seventh of Sivan does not count at all, but rather that only part of the seventh of Sivan was counted. Rashi in fact says this explicitly in Yoma (4b, DH Bishlama), that the amount of hours that had passed on the seventh of Sivan was made up on the seventeenth of Tamuz.
All the best,
Yaakov Montrose