Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- 그대로 출력하기
- barplot
- 광명시버스분석
- 이용현황분석
- 값추가
- barplot in r
- R 그래프
- React
- 배열삭제
- 배열추가
- 이스케이프시퀀스
- setstate
- 탈출문자
- 값삭제
- vetor
- react #회원가입 #비밀번호비교
- asynchronization
- await
- 버스분석
- 데이터분석
- DataFrame
- useState
- 10172
- R데이터형태
- plot in r
- 그래픽
- 백준
- getline
- 백준 10172
- 백준 11718
Archives
- Today
- Total
devlog_zz
timestamp yyyy-mm-dd 본문
728x90
export const timeStamToStr = (timestamp:number|undefined) => {
if(timestamp){
try{
let date = new Date(timestamp)
return date.getFullYear()+'-'+fillZeroDay(date.getMonth()+1)+'-'+fillZeroDay(date.getDate())
}catch(e){return ''}
}
}
export const fillZeroDay = (day: number):String => {
return day<10 ? '0'+day : ''+day
}
728x90
'Front End > Javascript' 카테고리의 다른 글
1000원 이하 입력 방지하기 (0) | 2022.07.31 |
---|---|
금액 입력 시 자동 콤마 ( 천단위 ) 입력 - toLocaleString() (0) | 2022.07.31 |
timestamp 0시 0분 0초 구하기 (0) | 2022.05.23 |
Javascript 객체지향 프로그래밍 (0) | 2022.05.11 |
string 문자열 자르기 - substring, substr, slice (0) | 2022.01.24 |
Comments