댓글 27개
꽃미남웹코디님
13년 전
좋으다~
1년넘게 SNS 생활을 해오다 보니 이게 더 좋습니다-0-ㅋ
어제게시물 부터는 1일전 2일전 보다는 날짜표기가 더 좋을듯 싶습니다-0-ㅋ
고쳐주세요 ㅡㅡㅋ
1년넘게 SNS 생활을 해오다 보니 이게 더 좋습니다-0-ㅋ
어제게시물 부터는 1일전 2일전 보다는 날짜표기가 더 좋을듯 싶습니다-0-ㅋ
고쳐주세요 ㅡㅡㅋ
13년 전
sns식. 좋죠.
대신 1252213445분전...이런거는 싫어요.
24시간되면 원상태로 표기...
24시간도 ㄷㄷ이네요
대신 1252213445분전...이런거는 싫어요.
24시간되면 원상태로 표기...
24시간도 ㄷㄷ이네요
13년 전
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 형식
// 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;
로 대체해 보세요.
$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;
로 대체해 보세요.
13년 전
판올림.
-----------------------
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;
-----------------------
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;
게시판 목록
자유게시판
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 공지 |
|
2주 전 | 53 | |
| 199718 |
|
2주 전 | 34 | |
| 199717 | 1개월 전 | 30 | ||
| 199716 |
느긋한카키쿠키
|
1개월 전 | 20 | |
| 199715 |
현대적인무질서한까마귀
|
1개월 전 | 24 | |
| 199714 | 1개월 전 | 35 | ||
| 199713 | 1개월 전 | 41 | ||
| 199712 | 1개월 전 | 303 | ||
| 199711 |
안졸리니졸리니
|
1개월 전 | 151 | |
| 199710 |
|
1개월 전 | 164 | |
| 199709 |
|
1개월 전 | 97 | |
| 199708 | 1개월 전 | 110 | ||
| 199707 | 2개월 전 | 246 | ||
| 199706 | 2개월 전 | 47 | ||
| 199705 | 2개월 전 | 31 | ||
| 199704 | 2개월 전 | 55 | ||
| 199703 | 2개월 전 | 60 | ||
| 199702 | 2개월 전 | 104 | ||
| 199701 | 2개월 전 | 114 | ||
| 199700 | 2개월 전 | 86 | ||
| 199699 | 2개월 전 | 92 | ||
| 199698 | 2개월 전 | 139 | ||
| 199697 | 2개월 전 | 103 | ||
| 199696 |
|
2개월 전 | 252 | |
| 199695 | 2개월 전 | 96 | ||
| 199694 | 2개월 전 | 126 | ||
| 199693 | 2개월 전 | 194 | ||
| 199692 | 2개월 전 | 207 | ||
| 199691 |
|
2개월 전 | 180 | |
| 199690 | 2개월 전 | 265 | ||
| 199689 | 2개월 전 | 166 |

댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기