(window.webpackJsonp=window.webpackJsonp||[]).push([[44],{1126:function(e,t,r){"use strict";r.r(t);r(177),r(88);var n={props:{date:{type:String,required:!0},format:{type:String},updateEverySecond:{type:Number}},data:function data(){return{formattedDate:null,timer:null}},beforeMount:function beforeMount(){this.formatDate()},mounted:function mounted(){var e=this,t=this;this.updateEverySecond&&function reRender(){e.timer&&clearTimeout(e.timer),e.timer=setTimeout((function(){e.$nextTick((function(){return t.formatDate()})),reRender()}),1e3*e.updateEverySecond)}()},destroyed:function destroyed(){this.timer&&clearTimeout(this.timer)},methods:{formatDate:function formatDate(){var e=new Date(this.date);"date-relative-now"!==this.format?this.formattedDate=e.toLocaleString("sv",{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",hour12:!1}):this.formattedDate=this.timeAgo(e)},timeAgo:function timeAgo(e){var t=new Intl.RelativeTimeFormat("en",{numeric:"auto"}),r={years:31536e3,months:2592e3,weeks:604800,days:86400,hours:3600,minutes:60,seconds:1},n=new Date,o=new Date(e.getTime()-n.getTime());o.setMinutes(o.getMinutes()-n.getTimezoneOffset());var i=o/1e3;for(var a in r)if(r[a]<=Math.abs(i)){var u=i/r[a];return t.format(Math.round(u),a)}return t.format(0,"seconds")}}},o=r(38),i=Object(o.a)(n,(function render(){var e=this;return(0,e._self._c)("span",[e._v(" "+e._s(e.formattedDate)+" ")])}),[],!1,null,null,null);t.default=i.exports}}]);