Kata Tournament Runner  0.1.00
 All Classes Namespaces Functions Variables Enumerations Groups Pages
Public Member Functions | Friends | List of all members
TournamentRunner::Date Class Reference

The Date class provides Date handling based on the boost::gregorian::date. More...

#include <date.h>

Public Member Functions

 Date ()=default
 Default empty Date constructor. More...
 
 Date (const std::string &date_as_string)
 Constructor from date as string. More...
 
 Date (boost::gregorian::date date)
 Constructor from boost gregorian date. More...
 
bool is_valid () const
 Return true if the date is valid. More...
 
std::string to_iso_extended_string () const
 Return date as extended iso string. More...
 
int32_t year () const
 Return the year. More...
 
int32_t month () const
 Return the month. More...
 
int32_t day () const
 Return the day of month. More...
 
Date & operator= (const Date &)=default
 
 Date (const Date &)=default
 

Friends

class boost::serialization::access
 
bool operator== (const Date &, const Date &)
 

Detailed Description

The Date class provides Date handling based on the boost::gregorian::date.

Remarks
Serializable

Constructor & Destructor Documentation

TournamentRunner::Date::Date ( )
default

Default empty Date constructor.

Sets the date to the current date

TournamentRunner::Date::Date ( const std::string &  date_as_string)
explicit

Constructor from date as string.

Parameters
date_as_stringDate as string
TournamentRunner::Date::Date ( boost::gregorian::date  date)
explicit

Constructor from boost gregorian date.

Parameters
dateDate as boost gregorian date

Member Function Documentation

int32_t TournamentRunner::Date::day ( ) const

Return the day of month.

Returns
The day of month as integer
bool TournamentRunner::Date::is_valid ( ) const

Return true if the date is valid.

Return values
trueDate is a valid date
falseDate is not a valid date
int32_t TournamentRunner::Date::month ( ) const

Return the month.

Returns
The month as integer
std::string TournamentRunner::Date::to_iso_extended_string ( ) const

Return date as extended iso string.

Returns
Date as iso string

Here is the caller graph for this function:

int32_t TournamentRunner::Date::year ( ) const

Return the year.

Returns
The year as integer

The documentation for this class was generated from the following files: