PHP 日付/時刻
11個の関数
datedate(string $format, ?int $timestamp): stringUnixタイムスタンプを書式化された日付文字列で返します。
timetime(): int現在のUnixタイムスタンプを返します。
mktimemktime(int $hour, int $minute, int $second, int $month, int $day, int $year): int指定した日付・時刻のUnixタイムスタンプを返します。
strtotimestrtotime(string $datetime): int|false日付・時刻の文字列をUnixタイムスタンプに変換します。
date_createdate_create(string $datetime): DateTime|falseDateTimeオブジェクトを生成します。
date_formatdate_format(DateTime $object, string $format): stringDateTimeオブジェクトを書式化された文字列で返します。
date_modifydate_modify(DateTime $object, string $modifier): DateTimeDateTimeオブジェクトを修正します。
date_diffdate_diff(DateTime $baseObject, DateTime $targetObject): DateInterval2つのDateTimeの差をDateIntervalで返します。
checkdatecheckdate(int $month, int $day, int $year): bool日付の有効性を確認します。
microtimemicrotime(bool $as_float = false): string|floatマイクロ秒単位で現在の時刻を返します。
DateTime::createFromFormatDateTime::createFromFormat(string $format, string $datetime): DateTime|false指定した書式で文字列をパースしてDateTimeを生成します。
