Navigation

    Quasar Framework

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Date utils - endOfDate

    Framework
    2
    2
    267
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      PSTA last edited by Shone

      Hi,
      I’m using date.endOfDate this way:

      getEndDateOfYear (inputDate) {
          if (!date.isValid(inputDate)) {
            inputDate = this.getDate()
          }
          return date.endOfDate(newDate, 'year')
        }
      

      where inputDate value is for example : ‘Fri Sep 01 2017 00:00:00 GMT+0200 (Central Europe Daylight Time)’

      I found that output value of my method is ‘Sat Dec 30 2017 23:59:59 GMT+0100 (Central Europe Standard Time)’
      Is it correct? Because December has always 31 days… or is problem on my side?

      Thx in advance
      Petr

      1 Reply Last reply Reply Quote 0
      • s.molinari
        s.molinari last edited by

        Where did newDate come from?

        Scott

        1 Reply Last reply Reply Quote 0
        • First post
          Last post