Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- Arrays
- file-upload
- UTF-8
- Session
- 전략
- OOP
- JSON
- curl
- Regex
- Forms
- Laravel
- Linux
- jquery
- 무료다운로드쿠폰
- 경영
- Apache
- 웹하드순위
- MySQL
- function
- string
- Ajax
- php
- composer-php
- variables
- date
- HTML
- 웹하드추천
- JavaScript
- post
Archives
- Today
- Total
개발! 딱 깔끔하고 센스있게!
Php 연중 무휴로 이동하는 방법 본문
일년 중 제인 날부터 지금까지 php 을 어떻게 사용합니까?
getdatefromday(275, 2012)
그 출력 날짜.
나도 상반된 일을 할 것이다.
예를 들면 GetDayofYear (‘2012년10월21일 ’이다.
대답
이 모든 것이 매우 쉽다.
이 곳에서 datetime 대상을 읽는 createfromformat 정적 방법, 이곳의 date 함수와 이곳의 strotime 함수.
// This should get you a DateTime object from the date and year. function getDateFromDay($dayOfYear, $year) { $date = DateTime::createFromFormat('z Y', strval($dayOfYear) . ' ' . strval($year)); return $date; } // This should get you the day of the year and the year in a string. date('z Y', strtotime('21 oct 2012'));
'개발 스크랩 메모 > PHP' 카테고리의 다른 글
대소 문자를 구분하지 않는 PHP in_array 함수 (0) | 2020.12.14 |
---|---|
PHP 에서 웹 페이지의 URL 호출 가져오기 (0) | 2020.12.14 |
javascript 와 PHP 를 사용하여 이메일을 보내는 간단한 방법. [닫기] (0) | 2020.12.14 |
PHP : file_get_contents ($ loc) 실패 (0) | 2020.12.14 |
PHP JSON 디코드-stdClass (0) | 2020.12.13 |
Comments