I have a lot of values like this:
+---------------------+-------+
| Date | value |
+---------------------+-------+
| 2015-05-22 13:10:59 | 23,99 |
| 2015-05-22 13:20:19 | 23,8 |
| 2015-05-26 17:30:00 | 8 |
| 2015-05-26 19:00:00 | 125 |
| 2015-05-27 05:00:00 | -73 |
| 2015-05-27 06:00:00 | 30 |
| 2015-05-27 15:00:00 | 32 |
| 2015-05-27 16:00:00 | 33 |
| 2015-05-28 10:45:00 | 3 |
| 2015-05-28 10:50:00 | 3 |
+---------------------+-------+
And given a certain period (2015-05-20 -> 2015-05-30), in order to include all the dates for that period in the list, I need to fill the remaining dates. For better explain, I want something like this:
+---------------------+-------+
| Date | value |
+---------------------+-------+
| 2015-05-20 00:00:00 | null |
| 2015-05-21 00:00:00 | null |
| 2015-05-22 00:00:00 | null |
| 2015-05-22 13:10:59 | 23,99 |
| 2015-05-22 13:20:19 | 23,8 |
| 2015-05-23 00:00:00 | null |
| 2015-05-24 00:00:00 | null |
| 2015-05-25 00:00:00 | null |
| 2015-05-26 00:00:00 | null |
| 2015-05-26 17:30:00 | 8 |
| 2015-05-26 19:00:00 | 125 |
| 2015-05-27 00:00:00 | null |
| 2015-05-27 05:00:00 | -73 |
| 2015-05-27 06:00:00 | 30 |
| 2015-05-27 15:00:00 | 32 |
| 2015-05-27 16:00:00 | 33 |
| 2015-05-28 00:00:00 | null |
| 2015-05-28 10:45:00 | 3 |
| 2015-05-28 10:50:00 | 3 |
| 2015-05-29 00:00:00 | null |
| 2015-05-30 00:00:00 | null |
+---------------------+-------+
I know how to do this by code, but it has a lot of drawbacks, so I'm looking for a library to do so.
Any idea about any PHP library to work with stuff like this?