desktop-dart / duration

Utilities to make working with 'Duration's easier.
BSD 3-Clause "New" or "Revised" License
53 stars 47 forks source link

Add Japanese locale and Add defaultSpacer for CJK locale #54

Closed kyle-seongwoo-jun closed 2 years ago

kyle-seongwoo-jun commented 2 years ago

Hi, I just added Japanese locale.

and I added defaultSpacer to DurationLocale for CJK locale. It should be no space between value and unit on CJK locale.

const dur = Duration(days: 5, hours: 23);

prettyDuration(dur, locale: ChineseSimplifiedDurationLocale())
// current: '5 日 23 小时'
// changed: '5日 23小时'

prettyDuration(dur, locale: JapaneseDurationLocale())
// current: '5 日 23 時間'
// changed: '5日 23時間'

prettyDuration(dur, locale: KoreanDurationLocale())
// current: '5 일 23 시간'
// changed: '5일 23시간'

Thank you!

tejainece commented 2 years ago

Thanks for implementing the feature!