개요
- bbstime()
- "2017-07-26 21:30:00" → "07-26 21:30"
JavaScript
function bbstime(dt) {
return dt.substring(5, 16);
}
console.log( bbstime('2017-07-26 21:30:00') );
// 07-26 21:30
PHP
function bbstime($dt) {
return substr($dt, 5, 11);
}
echo bbstime('2017-07-26 21:30:00');
# 07-26 21:30