naive-ui/demo/documentation/components/time/enUS/unix.md
2019-10-29 12:38:53 +08:00

358 B

Unix

Use Unix timestamp as time.

<n-time :time="4320000000" :to="8640000000"/>
<br>
<n-time :time="4320000" :to="8640000" unix/>
<br>
<n-time :time="4320000000" format="yyyy-MM-dd hh:mm:ss"/>
<br>
<n-time :time="4320000" format="yyyy-MM-dd hh:mm:ss" unix/>
export default {
  data () {
    return {
      time: new Date(0)
    }
  }
}