tuo-time-utils
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

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

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 '일' | '월' | '화' | '수' | '목' | '금' | '토'

getPassedTimeKo

last time in Korean

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

Package Sidebar

Install

npm i tuo-time-utils

Weekly Downloads

4

Version

1.0.3

License

MIT

Unpacked Size

5.11 kB

Total Files

5

Last publish

Collaborators

  • thinkupout