Obsolete Members for QDate

クラスQDate の以下のメンバーは非推奨です。これらは古いソース・コードの動作を維持するために提供されています。新しいコードでは使用しないことを強くお勧めします。

パブリック関数

(deprecated in 6.9) QDateTime endOfDay(Qt::TimeSpec spec, int offsetSeconds = 0) const
(deprecated in 6.9) QDateTime startOfDay(Qt::TimeSpec spec, int offsetSeconds = 0) const

メンバ関数ドキュメント

[deprecated in 6.9] QDateTime QDate::endOfDay(Qt::TimeSpec spec, int offsetSeconds = 0) const

この関数は6.9から非推奨となった。新しいコードでは使用しないことを強くお勧めします。

これはオーバーロードされた関数です。

使用方法endOfDay(const QTimeZone &) instead. Returns the end-moment of the day. When a day ends depends on a how time is described: each day starts and ends earlier for those with higher offsets from UTC and later for those with lower offsets from UTC. The time representation to use can be specified either by a \a spec and \a offsetSeconds (ignored unless \a spec is Qt::OffsetSeconds) or by a time zone. Usually, the end of the day is one millisecond before the midnight, 24:00: however, if a local time transition causes the given date to skip over that moment (e.g. a DST spring-forward skipping over 23:00 and the following hour), the actual latest time in the day is returned. When \a spec is Qt::OffsetFromUTC, \a offsetSeconds gives the implied zone's offset from UTC. As UTC and such zones have no transitions, the end of the day is QTime(23, 59, 59, 999) in these cases. In the rare case of a date that was entirely skipped (this happens when a zone east of the international date-line switches to being west of it), the return shall be invalid. Passing Qt::TimeZone as \a spec (instead of passing a QTimeZone) will also produce an invalid result, as shall dates that end outside the range representable by QDateTime.

[deprecated in 6.9] QDateTime QDate::startOfDay(Qt::TimeSpec spec, int offsetSeconds = 0) const

この関数は6.9から非推奨となった。新しいコードでは使用しないことを強くお勧めします。

これはオーバーロードされた関数です。

代わりにstartOfDay(const QTimeZone &) を使用してください。

一日の開始時刻を返します。

UTCからのオフセットが大きいほど早く始まり、UTCからのオフセットが小さいほど遅く終わります。使用する時間表現は、specoffsetSecondsspec が Qt::OffsetSeconds でない限り無視されます)、またはタイムゾーンで指定できます。

通常、1日の始まりは午前0時00分です。しかし、ローカル時間の遷移によって、指定された日付がその午前0時をスキップする場合(例えば、サマータイムの春分の日の最初の1時間をスキップする場合)、その日の実際の最も早い時刻が返されます。

specQt::OffsetFromUTC の場合、offsetSeconds はUTCからの暗黙のゾーンオフセットを与える。UTCとそのようなゾーンには遷移がないため、このような場合、日の始まりはQTime(0, 0)となる。

稀に、日付が完全にスキップされた場合(これは、国際日付変更線の東側のゾーンが、 国際日付変更線の西側に切り替わった場合に発生する)、返り値は無効となる。QTimeZone を渡す代わりにspec としてQt::TimeZone を渡しても、QDateTime で表現可能な範囲外の日付から始まる場合と同様に、無効な結果が返される。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.