+ 2

How to calculate how many seconds are there in a month?

Please help me with the programming ...I m beginner so help

23rd Mar 2021, 5:21 PM
Debasish Senapati
Debasish Senapati - avatar
7 Respuestas
+ 5
seconds_per_month = days_per_month * hours_per_day * minutes_per_hour * seconds_per_minute
23rd Mar 2021, 5:29 PM
visph
visph - avatar
+ 5
Hi! Its very easy, you must solved 4 problems: 1. How many seconds in 1 minutes? 2. How many minutes in 1 hour? 3. How many hours in 1 day? 4. How many days in 1 month?
23rd Mar 2021, 5:30 PM
Yaroslav Vernigora
Yaroslav Vernigora - avatar
+ 4
1 minute = 60 seconds Hour = 60 minutes = 3,600 seconds. (60*60) Day = 24 hours = 1440 minutes = 86,400 seconds. (24*60*60) Week = 7 days = 168 hours = 10080 minutes = 604800 seconds.(7*24*60*60) Month = 30 days = 720 hours = 43200 minutes = 2592000 seconds. (30*24*60*60)
24th Mar 2021, 3:17 AM
Mohamed
Mohamed - avatar
+ 3
Mohamed Ahmed Al-Shrafi can we always assume that a month has 30 days?
25th Mar 2021, 11:20 AM
Sonic
Sonic - avatar
+ 2
Mohamed Ahmed Al-Shrafi yes 30days month
25th Mar 2021, 5:46 PM
Debasish Senapati
Debasish Senapati - avatar
+ 1
Sonic Yes
25th Mar 2021, 9:51 PM
Mohamed
Mohamed - avatar
+ 1
Mohamed Ahmed Al-Shrafi but as Jan Markus pointed out, a month can also have 28, 29 or 31 days.
26th Mar 2021, 1:51 AM
Sonic
Sonic - avatar