Date range | Sololearn: Learn to code for FREE!


Date range

How to get missing date range between to dates

6/12/2022 11:19:22 AM

prasath mohan

4 Answers

New Answer


Oh, I see. You can try search for a library that deals with time such as Time4J or use the Time API.


Can you please elaborate because if you're talking about range, then something cannot be missing since it would technically be within the range.


Im having two files one with date range and another file with (date range , values) We need to write an output with matching date range and values, default value is given for missing date ranges 1/1/2022 to 4/30/2022 - red 6/30/2022 to 10/31/2022 - blue For the missing date range i need to fill with value green Expected OUTPUT: 1/1/2022 -4/30/2022 = red 5/1/2022 -5/31/2022 = green 6/30/2022 -10/31/2022= blue 11/1/2022 -12/31/2022 = green Justice


Will try