qwt_date.h
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
* Qwt Widget Library
* Copyright (C) 1997 Josef Wilgen
* Copyright (C) 2002 Uwe Rathmann
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the Qwt License, Version 1.0
*****************************************************************************/
#ifndef _QWT_DATE_H_
#define _QWT_DATE_H_
#include "qwt_global.h"
#include <qdatetime.h>
class QWT_EXPORT QwtDate
{
public:
enum Week0Type
{
FirstThursday,
FirstDay
};
enum IntervalType
{
Millisecond,
Second,
Minute,
Hour,
Day,
Week,
Month,
Year
};
enum
{
JulianDayForEpoch = 2440588
};
static QDate minDate();
static QDate maxDate();
static QDateTime toDateTime( double value,
Qt::TimeSpec = Qt::UTC );
static double toDouble( const QDateTime & );
static QDateTime ceil( const QDateTime &, IntervalType );
static QDateTime floor( const QDateTime &, IntervalType );
static QDate dateOfWeek0( int year, Week0Type );
static int weekNumber( const QDate &, Week0Type );
static int utcOffset( const QDateTime & );
static QString toString( const QDateTime &,
const QString & format, Week0Type );
};
#endif
QwtDate::IntervalType
IntervalType
Definition: qwt_date.h:75
QwtDate::Day
The interval is related to days.
Definition: qwt_date.h:90
QwtDate::FirstThursday
Definition: qwt_date.h:58
QwtDate::Minute
The interval is related to minutes.
Definition: qwt_date.h:84
QwtDate::Hour
The interval is related to hours.
Definition: qwt_date.h:87
QwtDate::Millisecond
The interval is related to milliseconds.
Definition: qwt_date.h:78
QwtDate::Month
The interval is related to months.
Definition: qwt_date.h:96
QwtDate::Second
The interval is related to seconds.
Definition: qwt_date.h:81
QwtDate::Week
The interval is related to weeks.
Definition: qwt_date.h:93
QwtDate::Week0Type
Week0Type
Definition: qwt_date.h:49
QwtDate
A collection of methods around date/time values.
Definition: qwt_date.h:42