Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
src_corelib_time_qdatetime.cpp File Reference

(82d85c16d912b25bfa5b0a081e515fcecda1f975)

Go to the source code of this file.

Functions

d1 daysTo (d2)
 
d2 daysTo (d1)
 
 qDebug ("There are %d seconds to Christmas", now.secsTo(xmas))
 

Variables

QDate d1 (1995, 5, 17)
 [0]
 
QDate d2 (1995, 5, 20)
 
QDate date = QDate::fromString("1MM12car2003", "d'MM'MMcaryyyy")
 [0]
 
QTime n (14, 0, 0)
 [4]
 
QTime t = n.addSecs(70)
 
QTime time = QTime::fromString("1mm12car00", "m'mm'hcarss")
 [5]
 
QDateTime now = QDateTime::currentDateTime()
 [9]
 
QDateTime xmas (QDate(now.date().year(), 12, 25).startOfDay())
 
QTime time1 = QTime::fromString("131", "HHh")
 [11]
 
QDateTime dateTime2
 
QDateTime dateTime = QDateTime::fromString("130", "Mm")
 [12]
 
QDateTime startDate (QDate(2012, 7, 6), QTime(8, 30, 0))
 [14]
 
QDateTime endDate (QDate(2012, 7, 7), QTime(16, 30, 0))
 

Function Documentation

◆ daysTo() [1/2]

d2 daysTo ( d1 )

◆ daysTo() [2/2]

d1 daysTo ( d2 )

◆ qDebug()

qDebug ( "There are %d seconds to Christmas" ,
now. secsToxmas )

Variable Documentation

◆ d1

QDate d1 ( 1995 ,
5 ,
17  )

[0]

◆ d2

QDate d2 ( 1995 ,
5 ,
20  )

◆ date

QDate date = QDate::fromString("1MM12car2003", "d'MM'MMcaryyyy")

[0]

[1]

[2]

Definition at line 13 of file src_corelib_time_qdatetime.cpp.

◆ dateTime

QDateTime dateTime = QDateTime::fromString("130", "Mm")

[12]

[13]

[14]

Definition at line 94 of file src_corelib_time_qdatetime.cpp.

◆ dateTime2

QDateTime dateTime2
Initial value:
= QDateTime::fromString("M1d1y9800:01:02",
"'M'M'd'd'y'yyhh:mm:ss")

Definition at line 87 of file src_corelib_time_qdatetime.cpp.

◆ endDate

QDateTime endDate ( QDate(2012, 7, 7) ,
QTime(16, 30, 0)  )

◆ n

QTime n(14, 0, 0) ( 14 ,
0 ,
0  )

[4]

[5]

◆ now

[9]

[11]

Definition at line 75 of file src_corelib_time_qdatetime.cpp.

◆ startDate

QDateTime startDate ( QDate(2012, 7, 6) ,
QTime(8, 30, 0)  )

[14]

[15]

◆ t

t = n.addSecs(70)

Definition at line 43 of file src_corelib_time_qdatetime.cpp.

◆ time

QTime time = QTime::fromString("1mm12car00", "m'mm'hcarss")

[5]

[6]

[7]

[8]

Definition at line 52 of file src_corelib_time_qdatetime.cpp.

◆ time1

QTime time1 = QTime::fromString("131", "HHh")

[11]

[12]

Definition at line 82 of file src_corelib_time_qdatetime.cpp.

◆ xmas

QDateTime xmas ( QDate(now.date().year(), 12, 25).startOfDay() )