74 while (s.good() &&
_istalpha(c) && (p != &month[10])){
121 JulTy julnum = !s.fail() ?
Jday(m, d, y) : 0;
125 s.clear(tistream::failbit);
131 void FormatDate(
tostream& out, LPCTSTR picture,
const TDate& d)
138 case _T(
'd'): case
_T(
'D'):
141 while (*picture ==
_T(
'd') || *picture ==
_T(
'D'))
146 out.width(length < 2 ? 2 : length);
147 out << d.DayOfMonth();
150 case _T(
'm'): case
_T(
'M'):
153 while (*picture ==
_T(
'm') || *picture ==
_T(
'M'))
158 out.width(length < 2 ? 2 : length);
162 case _T(
'y'): case
_T(
'Y'):
164 while (*picture ==
_T(
'y') || *picture ==
_T(
'Y'))
190 switch (TDate::PrintOption)
228 FormatDate(out, shortFmt.c_str(), d);
The TDate class represents a date.
YearTy Year() const
Returns the year of this TDate.
LPCTSTR NameOfMonth() const
Returns this TDate's month string name.
TDate()
Construct a TDate with the current date.
static MonthTy IndexOfMonth(const tstring &monthName)
Returns the number, 1-12, of the month named nameOfMonth.
static HowToPrint SetPrintOption(HowToPrint h)
Sets the print option for all TDate objects and returns the old setting.
tstring AsString() const
Converts the TDate object to a string object.
MonthTy Month() const
Returns the month of this TDate.
HowToPrint
Lists different print formats.
static JulTy Jday(MonthTy, DayTy, YearTy)
Convert Gregorian calendar date to the corresponding Julian day number j.
DayTy DayOfMonth() const
Returns the day (1-31) of the month of this TDate.
An instance of TProfile encapsulates a setting within a system file, often referred to as a profile o...
bool GetString(LPCTSTR key, TCHAR *buff, unsigned buffSize, LPCTSTR defaultString=0)
Looks up and returns the string value associated with the given key string.
Object Windows Library (OWLNext Core).
std::ostringstream tostringstream
owl::opstream & operator<<(owl::opstream &os, const TColor &c)
Insert the color value into a persistent output stream.
_OWLSTATICFUNC(static int) FindMatch(const tchar *str
unsigned long JulTy
Julian calendar type.
owl::ipstream & operator>>(owl::ipstream &is, TColor &c)
Extract the color value from a persistent input stream.
ParseMonth(tistream &s, tchar *month)
#define _OWLSTATICFUNC(p)
Definition of TProfile class.