File: class_quant_lib_1_1_calendar.html

package info (click to toggle)
quantlib-refman-html 0.9.0-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 60,592 kB
  • ctags: 7,595
  • sloc: makefile: 30
file content (574 lines) | stat: -rw-r--r-- 34,258 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta name="robots" content="none">
<title>QuantLib: Calendar Class Reference</title>
<link rel="stylesheet" href="quantlib.css" type="text/css">
<link rel="stylesheet" href="print.css" type="text/css" media="print">
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<link rel="icon" href="favicon.ico" type="image/x-icon">
</head>
<body>

<div id="container">
<div id="header">
<img class="titleimage"
 src="QL-title.jpg" width="212" height="47" border="0"
 alt="QuantLib">
<br>
<h3 class="subtitle">A free/open-source library for quantitative finance</h3>
</div>
<div id="menu">

<h3 class="navbartitle">Version 0.9.0</h3>

<hr>

<h3 class="navbartitle">Getting started</h3>
<ul class="navbarlist">
<li class="navlink"><a href="index.html">Introduction</a></li>
<li class="navlink"><a href="overview.html">Project overview</a></li>
<li class="navlink"><a href="where.html">Where to get QuantLib</a></li>
<li class="navlink"><a href="install.html">Installation</a></li>
<li class="navlink"><a href="config.html">Configuration</a></li>
<li class="navlink"><a href="usage.html">Usage</a></li>
<li class="navlink"><a href="history.html">Version history</a></li>
<li class="navlink"><a href="resources.html">Additional resources</a></li>
<li class="navlink"><a href="group.html">The QuantLib group</a></li>
<li class="navlink"><a href="license.html">Copyright and license</a></li>
</ul>

<hr>

<h3 class="navbartitle">Reference manual</h3>
<ul class="navbarlist">
<li class="navlink"><a href="modules.html">Modules</a></li>
<li class="navlink"><a href="hierarchy.html">Class Hierarchy</a></li>
<li class="navlink"><a href="annotated.html">Compound List</a></li>
<li class="navlink"><a href="files.html">File List</a></li>
<li class="navlink"><a href="functions.html">Compound Members</a></li>
<li class="navlink"><a href="globals.html">File Members</a></li>
<li class="navlink"><a href="bug.html">Known Bugs</a></li>
<li class="navlink"><a href="caveats.html">Caveats</a></li>
<li class="navlink"><a href="test.html">Test Suite</a></li>
<li class="navlink"><a href="examples.html">Examples</a></li>
</ul>
</div>

<div id="content">
<!--Doxygen-generated content-->

<!-- Generated by Doxygen 1.5.4 -->
<div class="nav">
<a class="el" href="namespace_quant_lib.html">QuantLib</a>::<a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a></div>
<h1>Calendar Class Reference<br>
<small>
[<a class="el" href="group__datetime.html">Date and time calculations</a>]</small>
</h1><!-- doxytag: class="QuantLib::Calendar" --><code>#include &lt;ql/time/calendar.hpp&gt;</code>
<p>
Inherited by <a class="el" href="class_quant_lib_1_1_argentina.html">Argentina</a>, <a class="el" href="class_quant_lib_1_1_australia.html">Australia</a>, <a class="el" href="class_quant_lib_1_1_brazil.html">Brazil</a>, <a class="el" href="class_quant_lib_1_1_canada.html">Canada</a>, <a class="el" href="class_quant_lib_1_1_china.html">China</a>, <a class="el" href="class_quant_lib_1_1_czech_republic.html">CzechRepublic</a>, <a class="el" href="class_quant_lib_1_1_denmark.html">Denmark</a>, <a class="el" href="class_quant_lib_1_1_finland.html">Finland</a>, <a class="el" href="class_quant_lib_1_1_germany.html">Germany</a>, <a class="el" href="class_quant_lib_1_1_hong_kong.html">HongKong</a>, <a class="el" href="class_quant_lib_1_1_hungary.html">Hungary</a>, <a class="el" href="class_quant_lib_1_1_iceland.html">Iceland</a>, <a class="el" href="class_quant_lib_1_1_india.html">India</a>, <a class="el" href="class_quant_lib_1_1_indonesia.html">Indonesia</a>, <a class="el" href="class_quant_lib_1_1_italy.html">Italy</a>, <a class="el" href="class_quant_lib_1_1_japan.html">Japan</a>, <a class="el" href="class_quant_lib_1_1_joint_calendar.html">JointCalendar</a>, <a class="el" href="class_quant_lib_1_1_mexico.html">Mexico</a>, <a class="el" href="class_quant_lib_1_1_new_zealand.html">NewZealand</a>, <a class="el" href="class_quant_lib_1_1_norway.html">Norway</a>, <a class="el" href="class_quant_lib_1_1_null_calendar.html">NullCalendar</a>, <a class="el" href="class_quant_lib_1_1_poland.html">Poland</a>, <a class="el" href="class_quant_lib_1_1_saudi_arabia.html">SaudiArabia</a>, <a class="el" href="class_quant_lib_1_1_singapore.html">Singapore</a>, <a class="el" href="class_quant_lib_1_1_slovakia.html">Slovakia</a>, <a class="el" href="class_quant_lib_1_1_south_africa.html">SouthAfrica</a>, <a class="el" href="class_quant_lib_1_1_south_korea.html">SouthKorea</a>, <a class="el" href="class_quant_lib_1_1_sweden.html">Sweden</a>, <a class="el" href="class_quant_lib_1_1_switzerland.html">Switzerland</a>, <a class="el" href="class_quant_lib_1_1_taiwan.html">Taiwan</a>, <a class="el" href="class_quant_lib_1_1_t_a_r_g_e_t.html">TARGET</a>, <a class="el" href="class_quant_lib_1_1_turkey.html">Turkey</a>, <a class="el" href="class_quant_lib_1_1_ukraine.html">Ukraine</a>, <a class="el" href="class_quant_lib_1_1_united_kingdom.html">UnitedKingdom</a>, and <a class="el" href="class_quant_lib_1_1_united_states.html">UnitedStates</a>.
<p>

<p>
<a href="class_quant_lib_1_1_calendar-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
calendar class 
<p>
This class provides methods for determining whether a date is a business day or a holiday for a given market, and for incrementing/decrementing a date of a given number of business days.<p>
The Bridge pattern is used to provide the base behavior of the calendar, namely, to determine whether a date is a business day.<p>
A calendar should be defined for specific exchange holiday schedule or for general country holiday schedule. Legacy city holiday schedule calendars will be moved to the exchange/country convention.<p>
<dl compact><dt><b><a class="el" href="test.html#_test000124">Tests:</a></b></dt><dd>the methods for adding and removing holidays are tested by inspecting the calendar before and after their invocation. </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>

<p>
<a class="el" href="_bermudan_swaption_8cpp-example.html#_a8">BermudanSwaption.cpp</a>, <a class="el" href="_convertible_bonds_8cpp-example.html#_a6">ConvertibleBonds.cpp</a>, <a class="el" href="_discrete_hedging_8cpp-example.html#_a15">DiscreteHedging.cpp</a>, <a class="el" href="_equity_option_8cpp-example.html#_a1">EquityOption.cpp</a>, <a class="el" href="_fitted_bond_curve_8cpp-example.html#_a6">FittedBondCurve.cpp</a>, <a class="el" href="_f_r_a_8cpp-example.html#_a4">FRA.cpp</a>, <a class="el" href="_repo_8cpp-example.html#_a9">Repo.cpp</a>, and <a class="el" href="swapvaluation_8cpp-example.html#_a1">swapvaluation.cpp</a>.</dl><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Calendar interface</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c6e61de369e994009e36f344f99c15ad"></a><!-- doxytag: member="QuantLib::Calendar::empty" ref="c6e61de369e994009e36f344f99c15ad" args="() const " -->
bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#c6e61de369e994009e36f344f99c15ad">empty</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns whether or not the calendar is initialized. <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">std::string&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#37627d5d5bba7f4a8690c71c2ab3cb07">name</a> () const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the name of the calendar.  <a href="#37627d5d5bba7f4a8690c71c2ab3cb07"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#85aed4d5b4c114bdd47766ef9e52e2f7">isBusinessDay</a> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;d) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#a529b7298ba96b90261ed56c34f015f8">isHoliday</a> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;d) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#9c1941e4f95b1d74d7f9b2e772174c73">isWeekend</a> (<a class="el" href="group__datetime.html#gec3d5ec6653b2c392d449500b8f5cb3a">Weekday</a> w) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#406c43181bd59e07a145a4722fdf2480">isEndOfMonth</a> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;d) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="19b6ae524d9688302a3d133d9a8eaf67"></a><!-- doxytag: member="QuantLib::Calendar::endOfMonth" ref="19b6ae524d9688302a3d133d9a8eaf67" args="(const Date &amp;d) const " -->
<a class="el" href="class_quant_lib_1_1_date.html">Date</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#19b6ae524d9688302a3d133d9a8eaf67">endOfMonth</a> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;d) const </td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">last business day of the month to which the given date belongs <br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#656020bddfdb2d9f48c9f0dc12b26597">addHoliday</a> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#4c682210881efe66d463cc0907f00722">removeHoliday</a> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_quant_lib_1_1_date.html">Date</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#ee7c18511c7ee1bcda6124f43a37aa28">adjust</a> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;, <a class="el" href="group__datetime.html#gff46c5ae9385d20709bedade86edd368">BusinessDayConvention</a> convention=Following) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_quant_lib_1_1_date.html">Date</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#c47bb82bf7b147cfacf373991c2905ea">advance</a> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;, <a class="el" href="group__types.html#gb9c87440c314438e51a899a03d2442d0">Integer</a> n, <a class="el" href="group__datetime.html#gdd9fe45e09605eee3e4a39c8a5c4476d">TimeUnit</a> unit, <a class="el" href="group__datetime.html#gff46c5ae9385d20709bedade86edd368">BusinessDayConvention</a> convention=Following, bool endOfMonth=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="class_quant_lib_1_1_date.html">Date</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#ff3da5f18d09db3745c371b8679bd5ee">advance</a> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;date, const <a class="el" href="class_quant_lib_1_1_period.html">Period</a> &amp;period, <a class="el" href="group__datetime.html#gff46c5ae9385d20709bedade86edd368">BusinessDayConvention</a> convention=Following, bool endOfMonth=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="group__types.html#g4f0ecbbf99e41b6d69cd54871d5d2b9e">BigInteger</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#19727b525ba0493943d84e29459b65a0">businessDaysBetween</a> (const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;from, const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;to, bool includeFirst=true, bool includeLast=false) const </td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0b6fcbea4559480b4dc3df0abbf64766"></a><!-- doxytag: member="QuantLib::Calendar::holidayList" ref="0b6fcbea4559480b4dc3df0abbf64766" args="(const Calendar &amp;calendar, const Date &amp;from, const Date &amp;to, bool includeWeekEnds=false)" -->
static std::vector&lt; <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#0b6fcbea4559480b4dc3df0abbf64766">holidayList</a> (const <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a> &amp;calendar, const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;from, const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;to, bool includeWeekEnds=false)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the holidays between two dates. <br></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#f5714af8cb45a29153e0fd53ee5e7241">Calendar</a> ()</td></tr>

<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a593fa134416a954928e323a5175af7d"></a><!-- doxytag: member="QuantLib::Calendar::impl_" ref="a593fa134416a954928e323a5175af7d" args="" -->
boost::shared_ptr&lt; <a class="el" href="class_quant_lib_1_1_calendar_1_1_impl.html">Impl</a> &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>impl_</b></td></tr>

<tr><td colspan="2"><br><h2>Related Functions</h2></td></tr>
<tr><td colspan="2">(Note that these are not member functions.) <br><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#e9d6f7766f633f5d75cc3acd7826bc9f">operator==</a> (const <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a> &amp;, const <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a> &amp;)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#f842d77a8aacbc167a64749dba1a3a87">operator!=</a> (const <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a> &amp;, const <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a> &amp;)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">std::ostream &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar.html#ab055e8665c0e69976ecbe4aebd47a8f">operator&lt;&lt;</a> (std::ostream &amp;, const <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a> &amp;)</td></tr>

<tr><td colspan="2"><br><h2>Classes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar_1_1_impl.html">Impl</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">abstract base class for calendar implementations  <a href="class_quant_lib_1_1_calendar_1_1_impl.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar_1_1_orthodox_impl.html">OrthodoxImpl</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">partial calendar implementation  <a href="class_quant_lib_1_1_calendar_1_1_orthodox_impl.html#_details">More...</a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_quant_lib_1_1_calendar_1_1_western_impl.html">WesternImpl</a></td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">partial calendar implementation  <a href="class_quant_lib_1_1_calendar_1_1_western_impl.html#_details">More...</a><br></td></tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="f5714af8cb45a29153e0fd53ee5e7241"></a><!-- doxytag: member="QuantLib::Calendar::Calendar" ref="f5714af8cb45a29153e0fd53ee5e7241" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a>           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The default constructor returns a calendar with a null implementation, which is therefore unusable except as a placeholder. 
</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="37627d5d5bba7f4a8690c71c2ab3cb07"></a><!-- doxytag: member="QuantLib::Calendar::name" ref="37627d5d5bba7f4a8690c71c2ab3cb07" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::string name           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the name of the calendar. 
<p>
<dl compact><dt><b><a class="el" href="caveats.html#_caveats000112">Warning:</a></b></dt><dd>This method is used for output and comparison between calendars. It is <b>not</b> meant to be used for writing switch-on-type code. </dd></dl>

</div>
</div><p>
<a class="anchor" name="85aed4d5b4c114bdd47766ef9e52e2f7"></a><!-- doxytag: member="QuantLib::Calendar::isBusinessDay" ref="85aed4d5b4c114bdd47766ef9e52e2f7" args="(const Date &amp;d) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isBusinessDay           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>d</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns <code>true</code> iff the date is a business day for the given market. 
</div>
</div><p>
<a class="anchor" name="a529b7298ba96b90261ed56c34f015f8"></a><!-- doxytag: member="QuantLib::Calendar::isHoliday" ref="a529b7298ba96b90261ed56c34f015f8" args="(const Date &amp;d) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isHoliday           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>d</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns <code>true</code> iff the date is a holiday for the given market. 
</div>
</div><p>
<a class="anchor" name="9c1941e4f95b1d74d7f9b2e772174c73"></a><!-- doxytag: member="QuantLib::Calendar::isWeekend" ref="9c1941e4f95b1d74d7f9b2e772174c73" args="(Weekday w) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isWeekend           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__datetime.html#gec3d5ec6653b2c392d449500b8f5cb3a">Weekday</a>&nbsp;</td>
          <td class="paramname"> <em>w</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns <code>true</code> iff the weekday is part of the weekend for the given market. 
</div>
</div><p>
<a class="anchor" name="406c43181bd59e07a145a4722fdf2480"></a><!-- doxytag: member="QuantLib::Calendar::isEndOfMonth" ref="406c43181bd59e07a145a4722fdf2480" args="(const Date &amp;d) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool isEndOfMonth           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>d</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns <code>true</code> iff the date is last business day for the month in given market. 
</div>
</div><p>
<a class="anchor" name="656020bddfdb2d9f48c9f0dc12b26597"></a><!-- doxytag: member="QuantLib::Calendar::addHoliday" ref="656020bddfdb2d9f48c9f0dc12b26597" args="(const Date &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void addHoliday           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Adds a date to the set of holidays for the given calendar. 
</div>
</div><p>
<a class="anchor" name="4c682210881efe66d463cc0907f00722"></a><!-- doxytag: member="QuantLib::Calendar::removeHoliday" ref="4c682210881efe66d463cc0907f00722" args="(const Date &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void removeHoliday           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;&nbsp;</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Removes a date from the set of holidays for the given calendar. 
</div>
</div><p>
<a class="anchor" name="ee7c18511c7ee1bcda6124f43a37aa28"></a><!-- doxytag: member="QuantLib::Calendar::adjust" ref="ee7c18511c7ee1bcda6124f43a37aa28" args="(const Date &amp;, BusinessDayConvention convention=Following) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_quant_lib_1_1_date.html">Date</a> adjust           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__datetime.html#gff46c5ae9385d20709bedade86edd368">BusinessDayConvention</a>&nbsp;</td>
          <td class="paramname"> <em>convention</em> = <code>Following</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Adjusts a non-business day to the appropriate near business day with respect to the given convention. <dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="_convertible_bonds_8cpp-example.html#a9">ConvertibleBonds.cpp</a>, <a class="el" href="_fitted_bond_curve_8cpp-example.html#a9">FittedBondCurve.cpp</a>, and <a class="el" href="swapvaluation_8cpp-example.html#a4">swapvaluation.cpp</a>.</dl>
</div>
</div><p>
<a class="anchor" name="c47bb82bf7b147cfacf373991c2905ea"></a><!-- doxytag: member="QuantLib::Calendar::advance" ref="c47bb82bf7b147cfacf373991c2905ea" args="(const Date &amp;, Integer n, TimeUnit unit, BusinessDayConvention convention=Following, bool endOfMonth=false) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_quant_lib_1_1_date.html">Date</a> advance           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__types.html#gb9c87440c314438e51a899a03d2442d0">Integer</a>&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__datetime.html#gdd9fe45e09605eee3e4a39c8a5c4476d">TimeUnit</a>&nbsp;</td>
          <td class="paramname"> <em>unit</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__datetime.html#gff46c5ae9385d20709bedade86edd368">BusinessDayConvention</a>&nbsp;</td>
          <td class="paramname"> <em>convention</em> = <code>Following</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>endOfMonth</em> = <code>false</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Advances the given date of the given number of business days and returns the result. <dl class="note" compact><dt><b>Note:</b></dt><dd>The input date is not modified. </dd></dl>
<dl compact><dt><b>Examples: </b></dt><dd>
<a class="el" href="_bermudan_swaption_8cpp-example.html#a22">BermudanSwaption.cpp</a>, <a class="el" href="_convertible_bonds_8cpp-example.html#a10">ConvertibleBonds.cpp</a>, <a class="el" href="_fitted_bond_curve_8cpp-example.html#a16">FittedBondCurve.cpp</a>, <a class="el" href="_f_r_a_8cpp-example.html#a5">FRA.cpp</a>, and <a class="el" href="swapvaluation_8cpp-example.html#a5">swapvaluation.cpp</a>.</dl>
</div>
</div><p>
<a class="anchor" name="ff3da5f18d09db3745c371b8679bd5ee"></a><!-- doxytag: member="QuantLib::Calendar::advance" ref="ff3da5f18d09db3745c371b8679bd5ee" args="(const Date &amp;date, const Period &amp;period, BusinessDayConvention convention=Following, bool endOfMonth=false) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_quant_lib_1_1_date.html">Date</a> advance           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>date</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_period.html">Period</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>period</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__datetime.html#gff46c5ae9385d20709bedade86edd368">BusinessDayConvention</a>&nbsp;</td>
          <td class="paramname"> <em>convention</em> = <code>Following</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>endOfMonth</em> = <code>false</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Advances the given date as specified by the given period and returns the result. <dl class="note" compact><dt><b>Note:</b></dt><dd>The input date is not modified. </dd></dl>

</div>
</div><p>
<a class="anchor" name="19727b525ba0493943d84e29459b65a0"></a><!-- doxytag: member="QuantLib::Calendar::businessDaysBetween" ref="19727b525ba0493943d84e29459b65a0" args="(const Date &amp;from, const Date &amp;to, bool includeFirst=true, bool includeLast=false) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__types.html#g4f0ecbbf99e41b6d69cd54871d5d2b9e">BigInteger</a> businessDaysBetween           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>from</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_date.html">Date</a> &amp;&nbsp;</td>
          <td class="paramname"> <em>to</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>includeFirst</em> = <code>true</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>includeLast</em> = <code>false</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Calculates the number of business days between two given dates and returns the result. 
</div>
</div><p>
<hr><h2>Friends And Related Function Documentation</h2>
<a class="anchor" name="e9d6f7766f633f5d75cc3acd7826bc9f"></a><!-- doxytag: member="QuantLib::Calendar::operator==" ref="e9d6f7766f633f5d75cc3acd7826bc9f" args="(const Calendar &amp;, const Calendar &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool operator==           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a> &amp;&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a> &amp;&nbsp;</td>
          <td class="paramname"></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [related]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns <code>true</code> iff the two calendars belong to the same derived class. 
</div>
</div><p>
<a class="anchor" name="f842d77a8aacbc167a64749dba1a3a87"></a><!-- doxytag: member="QuantLib::Calendar::operator!=" ref="f842d77a8aacbc167a64749dba1a3a87" args="(const Calendar &amp;, const Calendar &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool operator!=           </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a> &amp;&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a> &amp;&nbsp;</td>
          <td class="paramname"></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [related]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="ab055e8665c0e69976ecbe4aebd47a8f"></a><!-- doxytag: member="QuantLib::Calendar::operator&lt;&lt;" ref="ab055e8665c0e69976ecbe4aebd47a8f" args="(std::ostream &amp;, const Calendar &amp;)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream &amp; operator&lt;&lt;           </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&nbsp;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_quant_lib_1_1_calendar.html">Calendar</a> &amp;&nbsp;</td>
          <td class="paramname"></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"><code> [related]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>

</div>

<div class="footer">
<div class="endmatter">
Documentation generated by
<a href="http://www.doxygen.org">Doxygen</a> 1.5.4
</div>
</div>

</div>

</body>
</html>