yarn add react-moment
import moment from "moment"; import "moment/locale/ko";
moment(날짜).fromNow()
이렇게 간단하게 해주면 하루전, 이틀전, 5시간전, 20분전 등등 표현된다. 간단하다!