<script>
import TimeAgo from 'svelte-timeago@0.1.2';
</script>
<main>
<span><TimeAgo date={new Date()} live/></span>
<span><TimeAgo date={(new Date().getTime()-30000)} live asPrefix suffix="Il y à "/></span>
<span><TimeAgo date={1635135699} withSuffix={false}/></span>
<span><TimeAgo date={"2021-10-01"}/></span>
<span><TimeAgo date={1629956789}/></span>
<span><TimeAgo date={"2020-10-02 12:22"} withSuffix suffix="前" units={{seconds:'秒',minutes:'分',hours:'時間',days:'日',months:'月',years:'年'}}/></span>
</main>
<style>
main{
display:flex;
flex-direction:column;
}
span{
font-weight:600;
}
</style>