Xpace
Xpace::Date Class Reference

#include <datetime.h>

Public Types

enum  { maxLength = 14 }
 

Public Member Functions

 Date ()
 
 Date (int year, uint month, uint day)
 
 Date (const String &str, const String &format)
 
void set (int year, uint month, uint day)
 
int32 toInt () const
 
 Date (int32 v)
 
int getYear () const
 
uint getMonth () const
 
uint getDay () const
 
void setYMD (int ymd)
 
int getYMD () const
 
void toString (String16 *buf, bool sep=false) const
 
String toString (const String &format) const
 
Dateoperator+= (int days)
 increment date @ param days increment by this many days More...
 

Friends

class DateTime
 

Detailed Description

Definition at line 24 of file datetime.h.

Member Enumeration Documentation

anonymous enum
Enumerator
maxLength 

Definition at line 84 of file datetime.h.

Constructor & Destructor Documentation

Xpace::Date::Date ( )
inline

Definition at line 295 of file datetime.h.

References Xpace::Time::Time().

Xpace::Date::Date ( int  year,
uint  month,
uint  day 
)
Parameters
yearthe year [-4194304..4194303]
monththe month [1..12]
daythe day [1..31]
Xpace::Date::Date ( const String str,
const String format 
)
Parameters
thedate in string form
formatthe format of the date e.g. "yyyy-MM-dd"
Xpace::Date::Date ( int32  v)
inline

Definition at line 60 of file datetime.h.

Member Function Documentation

void Xpace::Date::set ( int  year,
uint  month,
uint  day 
)
Parameters
yearthe year [-4194304..4194303]
monththe month [1..12]
daythe day [1..31]
int32 Xpace::Date::toInt ( ) const
inline

Definition at line 53 of file datetime.h.

int Xpace::Date::getYear ( ) const
uint Xpace::Date::getMonth ( ) const
uint Xpace::Date::getDay ( ) const
void Xpace::Date::setYMD ( int  ymd)
Parameters
datein syyyymmdd format
int Xpace::Date::getYMD ( ) const
Returns
date in syyyymmdd format
void Xpace::Date::toString ( String16 buf,
bool  sep = false 
) const
Parameters
sepif true, leave space for separators among yyyy mm dd NB buffer's length is NOT checked
Return values
bufthe buffer into which to store the date (and its length)
String Xpace::Date::toString ( const String format) const
Parameters
formatthe format of the date e.g. "yyyy-MM-dd"
Date& Xpace::Date::operator+= ( int  days)

increment date @ param days increment by this many days

Friends And Related Function Documentation

friend class DateTime
friend

Definition at line 104 of file datetime.h.


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

current as of Wed Jun 10 2026 12:00:06