대화형 레퍼런스: 포맷 문자열 테스트, 매개변수 조회, strtotime() 표현식을 시도해 보세요.
{{ dateResult }}
<?php echo date("{{ dateFormat }}"); ?>
| {{ __t('th_character') }} | {{ __t('th_description') }} | {{ __t('th_example') }} | |
|---|---|---|---|
| {{ group.title }} | |||
{{ p.char }} |
{{ p.desc }} | {{ getParamExample(p.char) }} | |
{{ strtotimeResult.timestamp }}
{{ strtotimeResult.formatted }}
{{ strtotimeResult.relative }}
{{ strtotimePhpCode }}
| {{ __t('th_expression') }} | {{ __t('th_description') }} | {{ __t('label_result') }} |
|---|---|---|
{{ ref.expr }} |
{{ ref.desc }} | {{ getStrtotimeExample(ref.expr) }} |
함수 date(string $format, ?int $timestamp = null)는 Unix 타임스탬프 또는 현재 시간을 읽기 쉬운 문자열로 포맷합니다. 포맷 문자열은 Y(4자리 연도), m(앞에 0이 붙는 월), d(일) 또는 H:i:s(24시간 형식의 시:분:초)와 같은 플레이스홀더로 구성됩니다.
strtotime(string $datetime, ?int $baseTimestamp = null)는 영어 텍스트 설명을 Unix 타임스탬프로 변환합니다. 일반적인 입력: "now", "+1 day", "next monday", "first day of next month", "last day of december 2025". 이 함수는 매우 유연하며 "+2 weeks 3 days"와 같은 조합 표현식도 이해합니다.
date("Y-m-d") — ISO 날짜: 2025-03-15date("d.m.Y") — 독일어 형식: 15.03.2025date("Y-m-d H:i:s") — MySQL Datetimedate("c") — ISO 8601: 2025-03-15T14:30:00+01:00date("r") — RFC 2822: Sat, 15 Mar 2025 14:30:00 +0100date("U") — Unix 타임스탬프