top | up | prev | next

Date Class

Definition at line 22 of Time.hpp

Constructors

Date()
Date(short year_, Month month_, int8_t day_)

Member Functions

Date AddDays(int n)
Date AddMonths(int n)
Date AddYears(int n)
int8_t Day() const
Month GetMonth() const
std::string ToString() const
std::string ToString(bool omitDashes) const
int16_t Year() const

Member Variables

int8_t day
Month month
int16_t year

Constructor Details

Date Constructor

soulng::util::Date::Date()

Definition at line 25 of Time.hpp :
 25 : year(0)month(Month::january)day(1)
 26 {
 27 }



Date Constructor

soulng::util::Date::Date(short year_, Month month_, int8_t day_)

Definition at line 28 of Time.hpp :
 28 : year(year_)month(month_)day(day_)
 29 {
 30 }



Member Function Details

AddDays Member Function

Date soulng::util::Date::AddDays(int n)

Definition at line 25 of Time.cpp
Declaration at line 43 of Time.hpp

Called by: soulng::util::TimestampProvider::GetCurrentTimestamp


AddMonths Member Function

Date soulng::util::Date::AddMonths(int n)

Definition at line 75 of Time.cpp
Declaration at line 44 of Time.hpp


AddYears Member Function

Date soulng::util::Date::AddYears(int n)

Definition at line 119 of Time.cpp :
120 {
121     int y = year + n;
122     int d = day;
123     int md = GetMonthDays(monthy);
124     if (d > md)
125     {
126         d = md;
127     }
128     return Date(ymonthd);
129 }


Declaration at line 45 of Time.hpp


Day Member Function

int8_t soulng::util::Date::Day() const

Definition at line 39 of Time.hpp :
 40 {
 41     return day;
 42 }


Called by: soulng::util::MemoryWriter::Write


GetMonth Member Function

Month soulng::util::Date::GetMonth() const

Definition at line 35 of Time.hpp :
 36 {
 37     return month;
 38 }


Called by: soulng::util::MemoryWriter::Write


ToString Member Function

std::string soulng::util::Date::ToString() const

Definition at line 131 of Time.cpp :
132 {
133     return ToString(false);
134 }


Declaration at line 46 of Time.hpp

Calls: soulng::util::Date::ToString


ToString Member Function

std::string soulng::util::Date::ToString(bool omitDashes) const

Definition at line 136 of Time.cpp
Declaration at line 47 of Time.hpp

Called by: soulng::util::Date::ToString , soulng::util::DateTime::ToString


Year Member Function

int16_t soulng::util::Date::Year() const

Definition at line 31 of Time.hpp :
 32 {
 33     return year;
 34 }


Called by: soulng::util::MemoryWriter::Write


top | up | prev | next