1.1.5 • Published 11 months ago

tuo-time-utils v1.1.5

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

tuo-time-utils

Utils related to time and date (esm)

Usage

getDateKo

getDateKo(date: Date, 'full') // 'YYYY년 M월 D일'
getDateKo(date: Date, 'no-year') // 'M월 D일'
getDateKo(date: Date, 'no-date') // 'YYYY년 M월'

compareCurrentDate

compare to current date without time

compareCurrentDate(date: Date)
return boolean

compareDate

compare to date without time

compareDate(first: Date, sec: Date)
return boolean

getWeek

check what week it is

getWeek(date:Date)
return 1 | 2 | 3 | 4 | 5 | 6

dayTranslateKo

day of the week in Korean

dayTranslateKo(day: Date.getDay())
return '일' | '월' | '화' | '수' | '목' | '금' | '토'

secToFullFormat

convert seconds to mm:ss format

secToFullFormat(sec: number)
return 'mm:ss'

getPassedTimeKo

last time in Korean

getPassedTimeKo(time: Date.getTime())
return '방금 전' | 'n분 전' | 'n시간 전' | n일 전
1.1.41

1 year ago

1.1.5

11 months ago

1.1.4

1 year ago

1.1.3

1 year ago

1.0.2

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago