/usr/include/ql/time/weekday.hpp is in libquantlib0-dev 1.12-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | /* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
Copyright (C) 2000, 2001, 2002, 2003 RiskMap srl
Copyright (C) 2003, 2004, 2005, 2006 StatPro Italia srl
Copyright (C) 2004, 2005, 2006 Ferdinando Ametrano
Copyright (C) 2006 Katiuscia Manzoni
Copyright (C) 2006 Toyin Akin
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modify it
under the terms of the QuantLib license. You should have received a
copy of the license along with this program; if not, please email
<quantlib-dev@lists.sf.net>. The license is also available online at
<http://quantlib.org/license.shtml>.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the license for more details.
*/
/*! \file weekday.hpp
\brief Weekday enumeration
*/
#ifndef quantlib_weekday_hpp
#define quantlib_weekday_hpp
#include <ql/qldefines.hpp>
#include <iosfwd>
namespace QuantLib {
/*! Day's serial number MOD 7;
WEEKDAY Excel function is the same except for Sunday = 7.
\ingroup datetime
*/
enum Weekday { Sunday = 1,
Monday = 2,
Tuesday = 3,
Wednesday = 4,
Thursday = 5,
Friday = 6,
Saturday = 7,
Sun = 1,
Mon = 2,
Tue = 3,
Wed = 4,
Thu = 5,
Fri = 6,
Sat = 7
};
/*! \relates Weekday */
std::ostream& operator<<(std::ostream&, const Weekday&);
namespace detail {
struct long_weekday_holder {
explicit long_weekday_holder(Weekday d) : d(d) {}
Weekday d;
};
std::ostream& operator<<(std::ostream&, const long_weekday_holder&);
struct short_weekday_holder {
explicit short_weekday_holder(Weekday d) : d(d) {}
Weekday d;
};
std::ostream& operator<<(std::ostream&, const short_weekday_holder&);
struct shortest_weekday_holder {
explicit shortest_weekday_holder(Weekday d) : d(d) {}
Weekday d;
};
std::ostream& operator<<(std::ostream&,
const shortest_weekday_holder&);
}
namespace io {
//! output weekdays in long format
/*! \ingroup manips */
detail::long_weekday_holder long_weekday(Weekday);
//! output weekdays in short format (three letters)
/*! \ingroup manips */
detail::short_weekday_holder short_weekday(Weekday);
//! output weekdays in shortest format (two letters)
/*! \ingroup manips */
detail::shortest_weekday_holder shortest_weekday(Weekday);
}
}
#endif
|