+ 2
How to combine 2 or more numbers to get desired result ? (code is provided if you want take a shot)
Let me explain briefly, Below is the JSON data. “opening_hours”:[ {“day_of_week”:15}, {“day_of_week”:16}, {“day_of_week”:32} and so on. ] required output is in this format: Monday - Thursday: 10:00 AM - 11:00 PM Friday: 10:00 AM - 4:00 AM , and so on. This is how the days are calculated: days object: {“1":"Monday", "2":"Thuesday", "4":"Wednesday", until..."64":"Sunday"} For single day eg. Monday = 1 Problem is getting days in range eg. 1+2 = 3 https://code.sololearn.com/WQWNnwy0h5IR/?ref=app
1 Antwort
+ 1
I am not very experienced in programming, only started few months ago. So any suggestion would be highly appreciated. Also came up with my solution, you can see here,
https://code.sololearn.com/WQWNnwy0h5IR/?ref=app