naive-ui/demo/documentation/components/time/enUS/unix.md
2020-02-04 11:37:14 +08:00

368 B

Unix Timestamp

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)
    }
  }
}