#include <AbstractDateTime.h>
Inheritance diagram for Patternist::AbstractDateTime:


Public Types | |
| enum | { DefaultYear = 2000, DefaultMonth = 1, DefaultDay = 1 } |
| typedef PlainSharedPtr< AbstractDateTime > | Ptr |
Public Member Functions | |
| AbstractDateTime (const KDateTime &dateTime) | |
| QString | dateToString () const |
| virtual Item::Ptr | fromValue (const KDateTime &dt) const |
| QString | timeToString () const |
| virtual KDateTime | toDateTime () const |
Static Public Member Functions | |
| static bool | isRangeValid (const QDate &date, QString &message) |
| static QString | serializeMSeconds (const MSecondProperty msecs) |
Protected Member Functions | |
| QString | zoneOffsetToString () const |
Static Protected Member Functions | |
| static KDateTime | create (AtomicValue::Ptr &errorMessage, const QString &lexicalSource, const CaptureTable &captTable) |
Protected Attributes | |
| const KDateTime | m_datetime |
Classes | |
| class | CaptureTable |
| Acts as a mapping table for AbstractDateTime::create() and describes where certain fields in a QRegExp pattern can be found for a particular W3C XML Schema date/time type. More... | |
XQuery 1.0 and XPath 2.0 Data Model (XDM), 3.3.2 Dates and Times
A summary of the international standard date and time notation, Markus Kuhn
Definition at line 38 of file AbstractDateTime.h.
A smart pointer wrapping AtomicValue instances.
Reimplemented from Patternist::AtomicValue.
Reimplemented in Patternist::Date, Patternist::DateTime, Patternist::GDay, Patternist::GMonth, Patternist::GMonthDay, Patternist::GYear, Patternist::GYearMonth, and Patternist::Time.
Definition at line 41 of file AbstractDateTime.h.
| QString AbstractDateTime::dateToString | ( | ) | const |
Definition at line 241 of file AbstractDateTime.cpp.
References m_datetime, and KDateTime::toString().
Referenced by Patternist::DateTime::stringValue(), and Patternist::Date::stringValue().
Here is the call graph for this function:

Here is the caller graph for this function:

A factory function for creating instances that are of the dynamic type of this class, that represents dt.
The default implementation performs an assert() call. This function is not pure virtual because all sub-classes do not use it.
Reimplemented in Patternist::Date, Patternist::DateTime, and Patternist::Time.
Definition at line 296 of file AbstractDateTime.cpp.
| bool AbstractDateTime::isRangeValid | ( | const QDate & | date, | |
| QString & | message | |||
| ) | [static] |
Determines whether dt is a date-time that can be represented, and isn't too early or too late. If it is valid, true is returned. Otherwise, false is returned and message is set to contain a translated message for human consumption, describing the error.
Definition at line 229 of file AbstractDateTime.cpp.
Referenced by Patternist::DateTimeDurationMathematician::calculate().
Here is the caller graph for this function:

| QString AbstractDateTime::serializeMSeconds | ( | const MSecondProperty | msecs | ) | [static] |
Serializes the milli seconds msecs into a string representation. For example, if msecs is 1, ".001" is returned; if msecs is 100 then is ".1" returned.
Definition at line 246 of file AbstractDateTime.cpp.
Referenced by Patternist::Duration::stringValue(), Patternist::DayTimeDuration::stringValue(), and timeToString().
Here is the caller graph for this function:

| QString AbstractDateTime::timeToString | ( | ) | const |
Definition at line 264 of file AbstractDateTime.cpp.
References m_datetime, serializeMSeconds(), KDateTime::time(), and KDateTime::toString().
Referenced by Patternist::Time::stringValue(), and Patternist::DateTime::stringValue().
Here is the call graph for this function:

Here is the caller graph for this function:

| KDateTime AbstractDateTime::toDateTime | ( | ) | const [virtual] |
Definition at line 291 of file AbstractDateTime.cpp.
References m_datetime.
| QString AbstractDateTime::zoneOffsetToString | ( | ) | const [protected] |
Definition at line 275 of file AbstractDateTime.cpp.
References KDateTime::ClockTime, m_datetime, KDateTime::timeType(), KDateTime::toString(), and KDateTime::UTC.
Referenced by Patternist::Time::stringValue(), Patternist::GYearMonth::stringValue(), Patternist::GYear::stringValue(), Patternist::GMonthDay::stringValue(), Patternist::GMonth::stringValue(), Patternist::GDay::stringValue(), Patternist::DateTime::stringValue(), and Patternist::Date::stringValue().
Here is the call graph for this function:

Here is the caller graph for this function:

1.5.1