|
|
|
13년 전
|
조회 1,201
|
|
|
|
13년 전
|
조회 1,370
|
|
|
|
13년 전
|
조회 1,133
|
|
|
|
13년 전
|
조회 1,185
|
|
|
관리자
|
13년 전
|
조회 1,171
|
|
|
|
13년 전
|
조회 1,241
|
|
|
|
13년 전
|
조회 1,139
|
|
|
관리자
|
13년 전
|
조회 1,252
|
|
|
|
13년 전
|
조회 2,391
|
|
|
|
13년 전
|
조회 1,389
|
|
|
|
13년 전
|
조회 2,215
|
|
|
|
13년 전
|
조회 2,799
|
|
|
|
13년 전
|
조회 1,233
|
|
|
|
13년 전
|
조회 1,161
|
|
|
관리자
|
13년 전
|
조회 3,111
|
|
|
|
13년 전
|
조회 1,145
|
|
|
|
13년 전
|
조회 2,182
|
|
|
|
13년 전
|
조회 1,262
|
|
|
|
13년 전
|
조회 1,715
|
|
|
|
13년 전
|
조회 2,519
|
|
|
|
13년 전
|
조회 4,080
|
|
|
|
13년 전
|
조회 1,175
|
|
|
|
13년 전
|
조회 1,386
|
|
|
|
13년 전
|
조회 1,169
|
|
|
지운아빠
|
13년 전
|
조회 1,171
|
|
|
지운아빠
|
13년 전
|
조회 1,167
|
|
|
|
13년 전
|
조회 1,290
|
|
|
관리자
|
13년 전
|
조회 1,632
|
|
|
|
13년 전
|
조회 1,208
|
|
|
|
13년 전
|
조회 1,369
|
댓글 27개
다만 글꼴좀 어떻게좀 해주세요?
1년넘게 SNS 생활을 해오다 보니 이게 더 좋습니다-0-ㅋ
어제게시물 부터는 1일전 2일전 보다는 날짜표기가 더 좋을듯 싶습니다-0-ㅋ
고쳐주세요 ㅡㅡㅋ
대신 1252213445분전...이런거는 싫어요.
24시간되면 원상태로 표기...
24시간도 ㄷㄷ이네요
ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
목록 맨앞으로 갔더니!!
8년전
5년전
어우 까마득해 ㅠㅠ
"호랭담"으로 표기
쵸큼 좋습니다.
도.촬당했따!!!
적용해야겠습니다!
오늘은 한번 웃껴보려고 다짐했건만 이렇게 또 못 웃낀 하루가 가버리는 군요.
$list['datetime2'] = $list['wr_datetime'];
if ($list['datetime'] == $g4['time_ymd'])
$list['datetime2'] = substr($list['datetime2'],11,5);
else
$list['datetime2'] = substr($list['datetime2'],5,5);
를
$timestamp = strtotime($list['wr_datetime']); // 글쓴날짜시간 Unix timestamp 형식
$current = $g4['server_time']; // 현재날짜시간 Unix timestamp 형식
// 1년전
if ($timestamp <= $current - 86400 * 365) {
$str = (int)(($current - $timestamp) / (86400 * 365)) . "년전";
}
else if ($timestamp <= $current - 86400 * 31) {
$str = (int)(($current - $timestamp) / (86400 * 31)) . "개월전";
}
else if ($timestamp <= $current - 86400 * 1) {
$str = (int)(($current - $timestamp) / 86400) . "일전";
}
else if ($timestamp <= $current - 3600 * 1) {
$str = (int)(($current - $timestamp) / 3600) . "시간전";
}
else if ($timestamp <= $current - 60 * 1) {
$str = (int)(($current - $timestamp) / 60) . "분전";
}
else {
$str = (int)($current - $timestamp) . "초전";
}
$list['datetime2'] = $str;
로 대체해 보세요.
일부터는 원래 시간으로 표시되면 좋겠습니다.
테이블이 휘었(?)습니다.
-----------------------
lib/common.lib.php 의
$list['datetime2'] = $list['wr_datetime'];
if ($list['datetime'] == $g4['time_ymd'])
$list['datetime2'] = substr($list['datetime2'],11,5);
else
$list['datetime2'] = substr($list['datetime2'],5,5);
를
$timestamp = strtotime($list['wr_datetime']); // 글쓴날짜시간 Unix timestamp 형식
$current = $g4['server_time']; // 현재날짜시간 Unix timestamp 형식
// 열라 긴 세월 20년
if ($timestamp <= $current - 86400 * 7300) {
$str = (int)(($current - $timestamp) / (86400 * 7300)) . "열라오래됨";
}
// 호랭이 담배피던 시절 10년
else if ($timestamp <= $current - 86400 * 3650) {
$str = (int)(($current - $timestamp) / (86400 * 3650)) . "호랭이 담배피던 시절";
}
else if ($timestamp <= $current - 86400 * 365) {
$str = (int)(($current - $timestamp) / (86400 * 365)) . "년전";
}
else if ($timestamp <= $current - 86400 * 31) {
$str = (int)(($current - $timestamp) / (86400 * 31)) . "개월전";
}
else if ($timestamp <= $current - 86400 * 1) {
$str = (int)(($current - $timestamp) / 86400) . "일전";
}
else if ($timestamp <= $current - 3600 * 1) {
$str = (int)(($current - $timestamp) / 3600) . "시간전";
}
else if ($timestamp <= $current - 60 * 1) {
$str = (int)(($current - $timestamp) / 60) . "분전";
}
else {
$str = (int)($current - $timestamp) . "초전";
}
$list['datetime2'] = $str;