title: Calendar Library C++
body: <p>I have recently used the Calendar functions in QUANTLIB C++ to perform the below.</p>
  
  <p>Unfortunately any project using QUANTLIB takes too long to compile.  I'm interested in interpreting strings of dates in multiple different formats (which quantlib enables me to do), as I have shown below.  I also want to find the difference between various dates in different formats etc.</p>
  
  <p>My question is, is there another C++ library out there which enables me to do all of these things (hopefully one which will compile in my projects faster)?</p>
  
  <p>The below simple project seems to take forever to compile. </p>
  
  <p>My only prerequisite is that it compiles statically.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;ql/quantlib.hpp&gt;
  #include &lt;ql/utilities/dataparsers.hpp&gt;
  
  
  using namespace std;
  using namespace QuantLib;
  
  int main()
  {
  
      Calendar cal = Australia();
      const Date dt(21, Aug, 1971);
  
      bool itis = false;
  
      itis = cal.isBusinessDay(dt);
      cout &lt;&lt; "business day yes? " &lt;&lt; itis &lt;&lt; endl;
      cout &lt;&lt; "The calendar country is: " &lt;&lt; cal.name() &lt;&lt; endl;
  
  
      // now convert a string to a date.
      string mydate = "05/08/2016";
      const Date d = DateParser::parseFormatted(mydate,"%d/%m/%Y");
  
  
      cout &lt;&lt; "The year of this date is: " &lt;&lt;  d.year() &lt;&lt; endl;
      cout &lt;&lt; "The month of this date is: " &lt;&lt;  d.month() &lt;&lt; endl;
      cout &lt;&lt; "The day of this date is: " &lt;&lt;  d.dayOfMonth() &lt;&lt; endl;
      cout &lt;&lt; "The date " &lt;&lt; mydate &lt;&lt; " is a business day yes? " &lt;&lt; cal.isBusinessDay(d) &lt;&lt; endl;
  
  
  }
  </code></pre>