QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | List of all members
QwtDate Class Reference

A collection of methods around date/time values. More...

#include <qwt_date.h>

Public Types

enum  Week0Type { FirstThursday , FirstDay }
 How to identify the first week of year differs between countries . More...
 
enum  IntervalType {
  Millisecond , Second , Minute , Hour ,
  Day , Week , Month , Year
}
 Classification of a time interval. More...
 
enum  { JulianDayForEpoch = 2440588 }
 

Static Public Member Functions

static QDate minDate ()
 Minimum for the supported date range.
 
static QDate maxDate ()
 Maximum for the supported date range.
 
static QDateTime toDateTime (double value, Qt::TimeSpec=Qt::UTC)
 Translate from double to QDateTime.
 
static double toDouble (const QDateTime &)
 Translate from QDateTime to double.
 
static QDateTime ceil (const QDateTime &, IntervalType)
 Ceil a datetime according the interval type.
 
static QDateTime floor (const QDateTime &, IntervalType)
 Floor a datetime according the interval type.
 
static QDate dateOfWeek0 (int year, Week0Type)
 Date of the first day of the first week for a year.
 
static int weekNumber (const QDate &, Week0Type)
 Find the week number of a date.
 
static int utcOffset (const QDateTime &)
 Offset in seconds from Coordinated Universal Time.
 
static QString toString (const QDateTime &, const QString &format, Week0Type)
 Translate a datetime into a string.
 

Detailed Description

A collection of methods around date/time values.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
JulianDayForEpoch 

The Julian day of "The Epoch"

◆ IntervalType

Classification of a time interval.

Enumerator
Millisecond 

Millisecond

Second 

Second

Minute 

Minute

Hour 

Hour

Day 

Day

Week 

Week

Month 

Month

Year 

Year

◆ Week0Type

How to identify the first week of year differs between countries .

Enumerator
FirstThursday 

According to ISO 8601 the first week of a year is defined as "the week with the year's first Thursday in it". FirstThursday corresponds to the numbering that is implemented in QDate::weekNumber().

FirstDay 

"The week with January 1 in it." In the U.S. this definition is more common than FirstThursday.

Member Function Documentation

◆ ceil()

QDateTime QwtDate::ceil ( const QDateTime &  dateTime,
IntervalType  intervalType 
)
static

Ceil a datetime according the interval type.

◆ dateOfWeek0()

QDate QwtDate::dateOfWeek0 ( int  year,
Week0Type  type 
)
static

Date of the first day of the first week for a year.

◆ floor()

QDateTime QwtDate::floor ( const QDateTime &  dateTime,
IntervalType  intervalType 
)
static

Floor a datetime according the interval type.

◆ maxDate()

QDate QwtDate::maxDate ( )
static

Maximum for the supported date range.

◆ minDate()

QDate QwtDate::minDate ( )
static

Minimum for the supported date range.

◆ toDateTime()

QDateTime QwtDate::toDateTime ( double  value,
Qt::TimeSpec  timeSpec = Qt::UTC 
)
static

Translate from double to QDateTime.

◆ toDouble()

double QwtDate::toDouble ( const QDateTime &  dateTime)
static

Translate from QDateTime to double.

◆ toString()

QString QwtDate::toString ( const QDateTime &  dateTime,
const QString &  format,
Week0Type  week0Type 
)
static

Translate a datetime into a string.

◆ utcOffset()

int QwtDate::utcOffset ( const QDateTime &  dateTime)
static

Offset in seconds from Coordinated Universal Time.

◆ weekNumber()

int QwtDate::weekNumber ( const QDate &  date,
Week0Type  type 
)
static

Find the week number of a date.


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