Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. find the date of next week monday with QDate
Forum Updated to NodeBB v4.3 + New Features

find the date of next week monday with QDate

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 932 Views 2 Watching
  • 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.
  • B Offline
    B Offline
    Babs
    wrote on last edited by
    #1

    Anyone have of an idea of how to find the date of next week's monday using QDate?

    JonBJ 1 Reply Last reply
    0
    • B Babs

      Anyone have of an idea of how to find the date of next week's monday using QDate?

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @Babs
      Use https://doc.qt.io/qt-5/qdate.html#dayOfWeek-1 to help you write it.

      B 1 Reply Last reply
      3
      • JonBJ JonB

        @Babs
        Use https://doc.qt.io/qt-5/qdate.html#dayOfWeek-1 to help you write it.

        B Offline
        B Offline
        Babs
        wrote on last edited by
        #3

        @JonB it's not exactly what i know. I already can have the day of the week. Why i want to know is the precise date. For example if i want to get the date of next Monday it returns: 03/02/2020

        JonBJ 1 Reply Last reply
        0
        • B Babs

          @JonB it's not exactly what i know. I already can have the day of the week. Why i want to know is the precise date. For example if i want to get the date of next Monday it returns: 03/02/2020

          JonBJ Offline
          JonBJ Offline
          JonB
          wrote on last edited by JonB
          #4

          @Babs
          I don't understand. Use QDate::dayOfWeek() to discover what day of week today is. Add the necessary number of days to advance to the next Monday. That's next Monday's date. What's the issue? I said "to help you write it", not that QDate::dayOfWeek() on its own tells you next Monday's date.

          B 1 Reply Last reply
          1
          • JonBJ JonB

            @Babs
            I don't understand. Use QDate::dayOfWeek() to discover what day of week today is. Add the necessary number of days to advance to the next Monday. That's next Monday's date. What's the issue? I said "to help you write it", not that QDate::dayOfWeek() on its own tells you next Monday's date.

            B Offline
            B Offline
            Babs
            wrote on last edited by
            #5

            @JonB i misunderstood you. Thank you

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved