Javascript Problem - Urgent

I need urgent help in this issue.

I have a table with values

Date(Column) Hours(Column)
01-07-2010 9
02-07-2010 9
04-07-2010 9

Now the current date today is 20-07-2010. Using javascript i need to find the dates that are not present in this table and get all those dates until this current date(20-07-2010). Basically I need all the missing dates in this table ranging from 01-07-2010 to 20-07-2010. Also I need the dates that has Hours column value less than 9. If possible i need all these values in one array.

Please help in this issue. I am not able to get the javascript logic for this. I need this to be done in Javascript only.

Hi,
this is your answer

<html>
    <head>
        <script language="javascript">
            String.prototype.trim = function() {
                return this.replace(/^\\s+|\\s+$/g,"");
            }
            function dgi(el)
            {
                return document.getElementById(el);
            }          
            function getDays(y, m)
            {
                var number = 32 - new Date(y, parseInt(m)-1, 32).getDate();
                alert(number);
            }
            function createExistingDatesArray()
            {
                var tbody = dgi('date_container');
                var ar = new Array();
                for(var i = 0 ; i < tbody.rows.length; i++)
                {
                    ar[tbody.rows[i].childNodes[1].innerHTML.toString().trim()] = true;
                }
                return ar;
            }
            function getMissingDates()
            {
                var existingDates = createExistingDatesArray();
                var missingDates = new Array();
                var start = 1;
                var currentDate = new Date();
                var currentMonth = currentDate.getMonth()+1;
                
        for(var i = start; i <= currentDate.getDate(); i++)
                {
                    var d = (i < 10 ? '0'+i : i)+'-'+(currentMonth<10 ? '0'+currentMonth : currentMonth) + '-' + currentDate.getFullYear();
                    
                    if(existingDates[d] == null)
                       missingDates.push(d);
                }
                var msg = "Missing dates";
                for(var item in missingDates)
                    {
                        msg += "\\r\
" + missingDates[item];
                    }
                    alert(msg);
            }
        </script>
    </head>
    <body>
        <a href="#" onclick="getMissingDates(); return false;">Get MIssing dates</a>
        <table>
            <thead>
                <tr>
                    <th>Date</th>
                    <th>Hours</th>
                </tr>
            </thead>
            <tbody id="date_container">
                <tr>
                    <td>
                        01-07-2010
                    </td>
                </tr>
                <tr>
                    <td>
                        02-07-2010
                    </td>
                </tr>
                <tr>
                    <td>
                        04-07-2010
                    </td>
                </tr>
                <tr>
                    <td>
                        11-07-2010
                    </td>
                </tr>
            </tbody>
        </table>
    </body>
</html>