日付 | Date
More...
#include <Date.hpp>
Inherited by s3d::DateTime.
◆ Date() [1/2]
SIV3D_NODISCARD_CXX20 s3d::Date::Date |
( |
| ) |
|
|
defaultnoexcept |
◆ Date() [2/2]
constexpr SIV3D_NODISCARD_CXX20 s3d::Date::Date |
( |
int32 |
_year, |
|
|
int32 |
_month = 1 , |
|
|
int32 |
_day = 1 |
|
) |
| |
|
explicitconstexprnoexcept |
◆ dayOfWeek()
constexpr DayOfWeek s3d::Date::dayOfWeek |
( |
| ) |
const |
|
constexprnoexcept |
◆ daysInMonth()
constexpr int32 s3d::Date::daysInMonth |
( |
| ) |
const |
|
constexprnoexcept |
◆ DaysInMonth()
◆ daysInYear()
constexpr int32 s3d::Date::daysInYear |
( |
| ) |
const |
|
constexprnoexcept |
1 年の日数を返します。
- Returns
- 1 年の日数
◆ DaysInYear()
static constexpr int32 s3d::Date::DaysInYear |
( |
int32 |
year | ) |
|
|
staticconstexprnoexcept |
◆ format()
日付を指定したフォーマットの文字列で返します。 yyyy 4 桁の年 (0001-) yy 2 桁の年 (00-99) y 年 (1-) MMMM 英語の月 (January-December) MMM 英語の月の略称 (Jan-Dec) MM 2 桁の月 (01-12) M 1-2 桁の月 (1-12) dd 2 桁の日 (01-31) d 1-2 桁の日 (1-31) EEEE 英語の曜日 (Sunday-Saturday) EEE 英語の曜日の略称 (Sun-Sat) E 日本語の曜日 (日-土)
- Parameters
-
- Returns
- フォーマットされた日付
◆ hash()
size_t s3d::Date::hash |
( |
| ) |
const |
|
noexcept |
日付のハッシュ値を返します
- Returns
- 日付のハッシュ値
◆ isLeapYear()
constexpr bool s3d::Date::isLeapYear |
( |
| ) |
const |
|
constexprnoexcept |
うるう年であるかを返します。
- Returns
- うるう年である場合 true, それ以外の場合は false
◆ IsLeapYear()
static constexpr bool s3d::Date::IsLeapYear |
( |
int32 |
year | ) |
|
|
staticconstexprnoexcept |
◆ isToday()
bool s3d::Date::isToday |
( |
| ) |
const |
|
noexcept |
現在のローカルの年月日と一致するかを返します。
- Returns
- 現在のローカルの年月日と一致する場合 true, それ以外の場合は false
◆ isValid()
constexpr bool s3d::Date::isValid |
( |
| ) |
const |
|
constexprnoexcept |
日付の妥当性を返します。
- Returns
- 日付が正しい範囲の値であれば true, それ以外の場合は false
◆ operator+()
Date s3d::Date::operator+ |
( |
const Days & |
days | ) |
const |
|
noexcept |
指定した日数だけ進めた日付を返します。
- Parameters
-
- Returns
- 指定した日数だけ進めた日付
◆ operator+=()
Date& s3d::Date::operator+= |
( |
const Days & |
days | ) |
|
|
noexcept |
日付を進めます
- Parameters
-
- Returns
- *this
◆ operator-()
Date s3d::Date::operator- |
( |
const Days & |
days | ) |
const |
|
noexcept |
指定した日数だけ戻した日付を返します。
- Parameters
-
- Returns
- 指定した日数だけ戻した日付
◆ operator-=()
Date& s3d::Date::operator-= |
( |
const Days & |
days | ) |
|
|
noexcept |
日付を戻します
- Parameters
-
- Returns
- *this
◆ Subtract()
static constexpr Days s3d::Date::Subtract |
( |
const Date & |
a, |
|
|
const Date & |
b |
|
) |
| |
|
staticconstexprnoexcept |
◆ Today()
static Date s3d::Date::Today |
( |
| ) |
|
|
staticnoexcept |
現在の日付(ローカルタイム)を返します。
- Returns
- 現在の日付(ローカルタイム)
◆ Tomorrow()
static Date s3d::Date::Tomorrow |
( |
| ) |
|
|
staticnoexcept |
明日の日付(ローカルタイム)を返します。
- Returns
- 明日の日付(ローカルタイム)
◆ Yesterday()
static Date s3d::Date::Yesterday |
( |
| ) |
|
|
staticnoexcept |
昨日の日付(ローカルタイム)を返します。
- Returns
- 昨日の日付(ローカルタイム)
◆ Formatter
◆ operator!=
bool operator!= |
( |
const Date & |
lhs, |
|
|
const Date & |
rhs |
|
) |
| |
|
friend |
日付が異なるかを返します。
- Parameters
-
- Returns
- 2 つの日付が異なる場合 true, それ以外の場合は false
◆ operator-
constexpr friend Days operator- |
( |
const Date & |
to, |
|
|
const Date & |
from |
|
) |
| |
|
friend |
日付の差を計算します。
- Parameters
-
- Returns
from
から to
までの日数
◆ operator<
bool operator< |
( |
const Date & |
lhs, |
|
|
const Date & |
rhs |
|
) |
| |
|
friend |
日付の < 比較を行います。
- Parameters
-
- Returns
- 比較結果
◆ operator<<
template<class CharType >
std::basic_ostream<CharType>& operator<< |
( |
std::basic_ostream< CharType > & |
output, |
|
|
const Date & |
value |
|
) |
| |
|
friend |
- Template Parameters
-
- Parameters
-
- Returns
◆ operator<=
bool operator<= |
( |
const Date & |
lhs, |
|
|
const Date & |
rhs |
|
) |
| |
|
friend |
日付の <= 比較を行います。
- Parameters
-
- Returns
- 比較結果
◆ operator==
bool operator== |
( |
const Date & |
lhs, |
|
|
const Date & |
rhs |
|
) |
| |
|
friend |
日付が等しいかを返します。
- Parameters
-
- Returns
- 2 つの日付が等しい場合 true, それ以外の場合は false
◆ operator>
bool operator> |
( |
const Date & |
lhs, |
|
|
const Date & |
rhs |
|
) |
| |
|
friend |
日付の > 比較を行います。
- Parameters
-
- Returns
- 比較結果
◆ operator>=
bool operator>= |
( |
const Date & |
lhs, |
|
|
const Date & |
rhs |
|
) |
| |
|
friend |
日付の >= 比較を行います。
- Parameters
-
- Returns
- 比較結果
◆ day
◆ month
◆ year
The documentation for this struct was generated from the following file: