So
if you assume that the month has 30 days and that the library opens at midnight, then
24 hours in a day
5 pm=12+5=17 hours
on wednessday=17-2=15 hours
wednessday=1/7 of week
so we find 1/7 of 30 which is 30/7=4 and 2/7
then subtract that from 30
30-4 and 2/7=25 and 5/7
ok so then we have
25 and 5/7 days is 17 hours and
4 and 2/7 days is 15 hours
so just multipy them and add
25 and 5/7 times 17=437.143 hours
4 and 2/7 days times 15 =64.2857
add
437.143+64.2856=501.429
so aprox 501.429
the real equation is
where n represents the number of days in the month
apros 501.429