QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
weekday.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2000, 2001, 2002, 2003 RiskMap srl
5 Copyright (C) 2003, 2004, 2005, 2006 StatPro Italia srl
6 Copyright (C) 2004, 2005, 2006 Ferdinando Ametrano
7 Copyright (C) 2006 Katiuscia Manzoni
8 Copyright (C) 2006 Toyin Akin
9
10 This file is part of QuantLib, a free-software/open-source library
11 for financial quantitative analysts and developers - http://quantlib.org/
12
13 QuantLib is free software: you can redistribute it and/or modify it
14 under the terms of the QuantLib license. You should have received a
15 copy of the license along with this program; if not, please email
16 <quantlib-dev@lists.sf.net>. The license is also available online at
17 <http://quantlib.org/license.shtml>.
18
19 This program is distributed in the hope that it will be useful, but WITHOUT
20 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
21 FOR A PARTICULAR PURPOSE. See the license for more details.
22*/
23
24/*! \file weekday.hpp
25 \brief Weekday enumeration
26*/
27
28#ifndef quantlib_weekday_hpp
29#define quantlib_weekday_hpp
30
31#include <ql/qldefines.hpp>
32#include <iosfwd>
33
34namespace QuantLib {
35
36 /*! Day's serial number MOD 7;
37 WEEKDAY Excel function is the same except for Sunday = 7.
38
39 \ingroup datetime
40 */
41 enum Weekday { Sunday = 1,
42 Monday = 2,
46 Friday = 6,
48 Sun = 1,
49 Mon = 2,
50 Tue = 3,
51 Wed = 4,
52 Thu = 5,
53 Fri = 6,
54 Sat = 7
55 };
56
57 /*! \relates Weekday */
58 std::ostream& operator<<(std::ostream&, const Weekday&);
59
60 namespace detail {
61
65 };
66 std::ostream& operator<<(std::ostream&, const long_weekday_holder&);
67
71 };
72 std::ostream& operator<<(std::ostream&, const short_weekday_holder&);
73
77 };
78 std::ostream& operator<<(std::ostream&,
80
81 }
82
83 namespace io {
84
85 //! output weekdays in long format
86 /*! \ingroup manips */
88
89 //! output weekdays in short format (three letters)
90 /*! \ingroup manips */
92
93 //! output weekdays in shortest format (two letters)
94 /*! \ingroup manips */
96
97 }
98
99}
100
101#endif
@ Wednesday
Definition: weekday.hpp:44
@ Monday
Definition: weekday.hpp:42
@ Sunday
Definition: weekday.hpp:41
@ Tuesday
Definition: weekday.hpp:43
@ Saturday
Definition: weekday.hpp:47
@ Thursday
Definition: weekday.hpp:45
@ Friday
Definition: weekday.hpp:46
detail::shortest_weekday_holder shortest_weekday(Weekday)
output weekdays in shortest format (two letters)
Definition: weekday.cpp:116
detail::long_weekday_holder long_weekday(Weekday)
output weekdays in long format
Definition: weekday.cpp:108
detail::short_weekday_holder short_weekday(Weekday)
output weekdays in short format (three letters)
Definition: weekday.cpp:112
std::ostream & operator<<(std::ostream &out, const short_date_holder &holder)
Definition: date.cpp:894
Definition: any.hpp:35
std::ostream & operator<<(std::ostream &out, GFunctionFactory::YieldCurveModel type)
Global definitions and compiler switches.