Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

193
Visualizações
Quasar framework- Vue js Date setting error
<q-separator class="divider" size="10px" color="grey-2" />
<q-list separator>
  <q-item 
  v-for="nweet in nweets"
  :key="nweet.date"
  class="q-py-md"
  

    <
      <q-item-label class="nweet-content">{{ nweet.content }}</q-item-label
      >
      <
    </q-item-section>

    <q-item-section side top> 
      {{ nweet.date | relativeDate }} 

    </q-item-section>
  </q-item>
</q-list>

I am facing a problem with {{ nweet.date | relativeDate }} It's giving me [vue/no-deprecated-filter] Filters are deprecated. Error. Please help

here is script

 <script>



import { formatDistance } from 'date-fns'




export default {
name: "PageHome",
data() {
return {
  newNweetContent: '',
  nweets: [
    {
      content: 'Hello world!',
      date: 1983230426
    },
    {
      content: 'Hello world!',
      date: 1983335689
    }

  ]
  
};},


filters: {
  relativeDate(value) {
    return formatDistance(value, new Date())
 }

} }

Is there any other way to set date? Can you tell me how I can use other thing. I mean can I use other library like date-fns. If yes how I can use it? Any help will be appreciated

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda