Obsolete Members for QDate

以下成员源于类 QDate 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

公共函数

(obsolete) bool setYMD (int y , int m , int d )

静态公共成员

(obsolete) QString longDayName (int weekday , QDate::MonthNameType type = DateFormat)
(obsolete) QString longMonthName (int month , QDate::MonthNameType type = DateFormat)
(obsolete) QString shortDayName (int weekday , QDate::MonthNameType type = DateFormat)
(obsolete) QString shortMonthName (int month , QDate::MonthNameType type = DateFormat)

成员函数文档编制

[static] QString QDate:: longDayName ( int weekday , QDate::MonthNameType type = DateFormat)

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

Returns the long name of the weekday for the representation specified by type .

The days are enumerated using the following convention:

  • 1 = "Monday"
  • 2 = "Tuesday"
  • 3 = "Wednesday"
  • 4 = "Thursday"
  • 5 = "Friday"
  • 6 = "Saturday"
  • 7 = "Sunday"

The day names will be localized according to the system's locale settings, i.e. using QLocale::system ().

Returns an empty string if the date is invalid.

该函数在 Qt 4.5 引入。

另请参阅 toString (), shortDayName (), shortMonthName (),和 longMonthName ().

[static] QString QDate:: longMonthName ( int month , QDate::MonthNameType type = DateFormat)

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

Returns the long name of the month for the representation specified by type .

The months are enumerated using the following convention:

  • 1 = "January"
  • 2 = "February"
  • 3 = "March"
  • 4 = "April"
  • 5 = "May"
  • 6 = "June"
  • 7 = "July"
  • 8 = "August"
  • 9 = "September"
  • 10 = "October"
  • 11 = "November"
  • 12 = "December"

The month names will be localized according to the system's locale settings, i.e. using QLocale::system ().

Returns an empty string if the date is invalid.

该函数在 Qt 4.5 引入。

另请参阅 toString (), shortMonthName (), shortDayName (),和 longDayName ().

bool QDate:: setYMD ( int y , int m , int d )

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

Sets the date's year y , month m , and day d .

y is in the range 0 to 99, it is interpreted as 1900 to 1999. Returns false if the date is invalid.

使用 setDate () 代替。

[static] QString QDate:: shortDayName ( int weekday , QDate::MonthNameType type = DateFormat)

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

Returns the short name of the weekday for the representation specified by type .

The days are enumerated using the following convention:

  • 1 = "Mon"
  • 2 = "Tue"
  • 3 = "Wed"
  • 4 = "Thu"
  • 5 = "Fri"
  • 6 = "Sat"
  • 7 = "Sun"

The day names will be localized according to the system's locale settings, i.e. using QLocale::system ().

Returns an empty string if the date is invalid.

该函数在 Qt 4.5 引入。

另请参阅 toString (), shortMonthName (), longMonthName (),和 longDayName ().

[static] QString QDate:: shortMonthName ( int month , QDate::MonthNameType type = DateFormat)

此函数已过时。提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

Returns the short name of the month for the representation specified by type .

The months are enumerated using the following convention:

  • 1 = "Jan"
  • 2 = "Feb"
  • 3 = "Mar"
  • 4 = "Apr"
  • 5 = "May"
  • 6 = "Jun"
  • 7 = "Jul"
  • 8 = "Aug"
  • 9 = "Sep"
  • 10 = "Oct"
  • 11 = "Nov"
  • 12 = "Dec"

The month names will be localized according to the system's locale settings, i.e. using QLocale::system ().

Returns an empty string if the date is invalid.

该函数在 Qt 4.5 引入。

另请参阅 toString (), longMonthName (), shortDayName (),和 longDayName ().