함수 getDay()

1 개요[ | ]

함수 getDay()
입력(Input) 출력(Output) 비고
2017-09-16 6 토요일(Saturday)
2017-09-17 0 일요일(Sunday)
2017-09-18 1 월요일(Monday)

2 PHP[ | ]

echo date('w', strtotime('2017-09-16'));
# 6
echo date('w', strtotime('2017-09-17'));
# 0
echo date('w', strtotime('2017-09-18'));
# 1

3 JavaScript[ | ]

console.log( new Date('2017-09-16').getDay() );
// 6
console.log( new Date('2017-09-17').getDay() );
// 0
console.log( new Date('2017-09-18').getDay() );
// 1

4 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}