algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::Date Struct Reference

A calendar date with no time of day or time zone. More...

#include <algotradelib/src/core/types.hpp>

Public Attributes

int year_ {0}
 The year.
unsigned month_ {0}
 The month, 1-12; zero means unset.
unsigned day_ {0}
 The day of the month, 1-31; zero means unset.

Friends

bool operator== (const Date &lhs, const Date &rhs)
 Compares two dates.
bool operator< (const Date &lhs, const Date &rhs)
 Orders dates chronologically.

Detailed Description

A calendar date with no time of day or time zone.

Settlement dates, calendar days and inquiry ranges are dates in the broker's local calendar.

Definition at line 1142 of file types.hpp.

◆ operator<

bool operator< ( const Date & lhs,
const Date & rhs )
friend

Orders dates chronologically.

Parameters
lhsThe first date.
rhsThe second date.
Returns
true if lhs is earlier.

Definition at line 1166 of file types.hpp.

◆ operator==

bool operator== ( const Date & lhs,
const Date & rhs )
friend

Compares two dates.

Parameters
lhsThe first date.
rhsThe second date.
Returns
true if year, month and day are equal.

Definition at line 1156 of file types.hpp.

Member Data Documentation

◆ day_

unsigned algotradelib::Date::day_ {0}

The day of the month, 1-31; zero means unset.

Definition at line 1148 of file types.hpp.

Referenced by algotradelib::runner::date_of(), algotradelib::is_valid_date(), operator<, operator==, and algotradelib::kiwoom::today_in_seoul().

◆ month_

unsigned algotradelib::Date::month_ {0}

The month, 1-12; zero means unset.

Definition at line 1146 of file types.hpp.

Referenced by algotradelib::runner::date_of(), algotradelib::is_valid_date(), operator<, operator==, and algotradelib::kiwoom::today_in_seoul().

◆ year_

int algotradelib::Date::year_ {0}

The documentation for this struct was generated from the following file: