+ 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 Answer
+ 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