aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4dateobject_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4dateobject_p.h')
-rw-r--r--src/qml/jsruntime/qv4dateobject_p.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/qml/jsruntime/qv4dateobject_p.h b/src/qml/jsruntime/qv4dateobject_p.h
index ad5b51f063..4c184de897 100644
--- a/src/qml/jsruntime/qv4dateobject_p.h
+++ b/src/qml/jsruntime/qv4dateobject_p.h
@@ -189,7 +189,7 @@ private:
struct DateCtor : FunctionObject {
- void init(QV4::ExecutionContext *scope);
+ void init(QV4::ExecutionEngine *engine);
};
}
@@ -202,12 +202,18 @@ struct DateObject: ReferenceObject {
void setDate(double date) { d()->setDate(date); }
double date() const { return d()->date(); }
- Q_QML_PRIVATE_EXPORT QDateTime toQDateTime() const;
+ Q_QML_EXPORT QDateTime toQDateTime() const;
QString toString() const;
static QString dateTimeToString(const QDateTime &dateTime, ExecutionEngine *engine);
+ static double dateTimeToNumber(const QDateTime &dateTime);
static QDate dateTimeToDate(const QDateTime &dateTime);
static QDateTime stringToDateTime(const QString &string, ExecutionEngine *engine);
+ static QDateTime timestampToDateTime(double timestamp, QTimeZone zone = QTimeZone::LocalTime);
+ static double componentsToTimestamp(
+ double year, double month, double day,
+ double hours, double mins, double secs, double ms,
+ ExecutionEngine *v4);
};
template<>