Apache Log4cxx Version 1.1.0
Loading...
Searching...
No Matches
log4cxx::helpers::SimpleDateFormat Class Reference

Concrete class for converting and formatting a date/time in a locale-sensitive manner. More...

#include <simpledateformat.h>

Inheritance diagram for log4cxx::helpers::SimpleDateFormat:
log4cxx::helpers::DateFormat log4cxx::helpers::Object log4cxx::helpers::AbsoluteTimeDateFormat log4cxx::helpers::DateTimeDateFormat log4cxx::helpers::ISO8601DateFormat

Public Member Functions

 SimpleDateFormat (const LogString &pattern)
 A time converter and formatter using pattern and the default std::locale.
 
 SimpleDateFormat (const LogString &pattern, const std::locale *locale)
 A time converter and formatter using pattern and locale.
 
 ~SimpleDateFormat ()
 
virtual void format (LogString &s, log4cxx_time_t tm, log4cxx::helpers::Pool &p) const
 Formats an log4cxx_time_t into a date/time string.
 
void setTimeZone (const TimeZonePtr &zone)
 Set time zone.
 
- Public Member Functions inherited from log4cxx::helpers::DateFormat
virtual ~DateFormat ()
 Destructor.
 
virtual void format (LogString &s, log4cxx_time_t tm, log4cxx::helpers::Pool &p) const =0
 Formats an log4cxx_time_t into a date/time string.
 
virtual void setTimeZone (const TimeZonePtr &zone)
 Sets the time zone.
 
virtual void numberFormat (LogString &s, int n, log4cxx::helpers::Pool &p) const
 Format an integer consistent with the format method.
 
- Public Member Functions inherited from log4cxx::helpers::Object
virtual ~Object ()
 
virtual const helpers::ClassgetClass () const =0
 
virtual bool instanceof (const Class &clazz) const =0
 
virtual const void * cast (const Class &clazz) const =0
 

Additional Inherited Members

- Protected Member Functions inherited from log4cxx::helpers::DateFormat
 DateFormat ()
 Constructor.
 

Detailed Description

Concrete class for converting and formatting a date/time in a locale-sensitive manner.

Specifier Date/time component
G era
y year
M month number
MMM abbreviated month name
MMMM full month name
w week in year
W week in month
D day in year
d day in month
EEE abbreviated day name
EEEE full day name
a AM or PM
H hour 0 - 23
k hour 1 - 24
K hour 0 - 11
h hour 1 - 12
m minute
s second
S millisecond
z time zone identifier
Z RFC822 time zone

Constructor & Destructor Documentation

◆ SimpleDateFormat() [1/2]

log4cxx::helpers::SimpleDateFormat::SimpleDateFormat ( const LogString pattern)

A time converter and formatter using pattern and the default std::locale.

Parameters
patternthe specifiers describing the date and time format

◆ SimpleDateFormat() [2/2]

log4cxx::helpers::SimpleDateFormat::SimpleDateFormat ( const LogString pattern,
const std::locale *  locale 
)

A time converter and formatter using pattern and locale.

Parameters
patternthe specifiers describing the date and time format
localethe user-preferred set of immutable facets

◆ ~SimpleDateFormat()

log4cxx::helpers::SimpleDateFormat::~SimpleDateFormat ( )

Member Function Documentation

◆ format()

virtual void log4cxx::helpers::SimpleDateFormat::format ( LogString s,
log4cxx_time_t  tm,
log4cxx::helpers::Pool p 
) const
virtual

Formats an log4cxx_time_t into a date/time string.

Parameters
sstring to which the date/time string is appended.
tmdate to be formatted.
pmemory pool used during formatting.

Implements log4cxx::helpers::DateFormat.

◆ setTimeZone()

void log4cxx::helpers::SimpleDateFormat::setTimeZone ( const TimeZonePtr &  zone)
virtual

Set time zone.

Parameters
zonenew time zone.

Reimplemented from log4cxx::helpers::DateFormat.


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