날짜함수

홈 > 공유팁! > 프로그램 관련 > PHP
프로그램 관련

날짜함수

꽁스짱 0 1396

php는 (거의)첨해보는거나 다름없는데 엄청 편한거 같다


더 들어가면 복잡하겠지만 ㅋ

 


date("Y-m-d") //오늘 날짜


date("Y-m-t")  //이번달 말일


date("Y-m-1")  //이번달 초


date("Y-m-t", strtotime("-1 month") ) //지난달 말일


date("Y-m-d", strtotime("-1 month") ) //오늘로부터 한달전


date("Y-m-1", strtotime("-1 month") ) //지난달 초 


date("Y-m-d", strtotime("last friday") ) //오늘로부터 마지막 금요일 (획기적이다!)



0 Comments
제목