Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

184
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!