테스트 사이트 - 개발 중인 베타 버전입니다

이런 날짜 표시 어떻습니까?

..


댓글 작성

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

로그인하기

댓글 27개

좋아요!! 조아조아좋아!!!!!!!!!!!!


다만 글꼴좀 어떻게좀 해주세요?
자동 갱신도 해주세요.
만들줄 알면서~
좋으다~
1년넘게 SNS 생활을 해오다 보니 이게 더 좋습니다-0-ㅋ
어제게시물 부터는 1일전 2일전 보다는 날짜표기가 더 좋을듯 싶습니다-0-ㅋ
고쳐주세요 ㅡㅡㅋ
sns식. 좋죠.
대신 1252213445분전...이런거는 싫어요.
24시간되면 원상태로 표기...
24시간도 ㄷㄷ이네요
10년전
ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
목록 맨앞으로 갔더니!!

8년전
5년전

어우 까마득해 ㅠㅠ
10년 넘어가는 날짜는
"호랭담"으로 표기
"배피던시절" ㅋㅋㅋㅋㅋㅋㅋㅋㅋ
제 닉이 캡쳐됬으니..
쵸큼 좋습니다.
저도 캡쳐됬군요
도.촬당했따!!!
좋은 아이디어..
적용해야겠습니다!
좋네요 ^^
제개인사이트에도 적용하고 싶은데.. 어떻게 하신거지?!
그냥 하던 작업이나 해야겠네요.
오늘은 한번 웃껴보려고 다짐했건만 이렇게 또 못 웃낀 하루가 가버리는 군요.
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;

로 대체해 보세요.
쓸데없는 * 1 하면 얼마나 느려지려나? ㅠㅠ
PHP 내장함수를 쓰시면 훨 깔끔해질듯 해용..
무사 적용! 감사합니다!
2틀 이상 가면 그날이 몇일인지 모르니
일부터는 원래 시간으로 표시되면 좋겠습니다.
게시판 전체에 적용하셨네요
http://sir.co.kr/bbs/board.php?bo_table=cm_nick
테이블이 휘었(?)습니다.
관리자님 덧글에 적용할 생각 있으신가요?
추천!!!!!!!!!!!!!!!!!!!!
춧천!! 언넝 달아주세요.^^
판올림.
-----------------------
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;
정말 좋아요
갠적으로 전에께 더 낫네요..

게시판 목록

자유게시판

글쓰기

첫글

1개월 전
🐛 버그신고