Convert C# function into JQuery
===

I am trying to convert the following function from C# into JQuery. But I am stuck!

    protected bool IsPeakDate(DateTime dtArrivalDate)
    {
        XPathDocument xmldoc = new XPathDocument(Server.MapPath("../PeakDates.xml"));
        XPathNavigator nav = xmldoc.CreateNavigator();

        foreach (XPathNavigator x in nav.Select("dates/peakdate"))
        {
            DateTime dtStart = Convert.ToDateTime(x.SelectSingleNode("startdate").Value);
            DateTime dtEnd = Convert.ToDateTime(x.SelectSingleNode("enddate").Value);
            if (dtStart <= dtArrivalDate && dtEnd >= dtArrivalDate)
            {
                return true;
            }
        }
        return false;
    }