Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8887725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T21:52:50+00:00 2026-06-14T21:52:50+00:00

I have 2 buttons( Previous and next ) for week. In between the previous

  • 0

I have 2 buttons( Previous and next ) for week. In between the previous and next week button needs to show week ending date (Fridays) for that week.
I want to display previous week date from Sun 11/18 to Mon 11/26 when we click the previous week button. Same as the next week button click event to show from Mon 11/26″ to Sun 12/2.
How it possible to show? and how to take the week ending date (Fridays) for that week?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T21:52:53+00:00Added an answer on June 14, 2026 at 9:52 pm

    This’s to get the date in 7 days, and from 7 days ago:

    var today = new Date();
    var nextWeek = Date.parse(new Date(today.getFullYear(), today.getMonth(), today.getDate() + 7));
    var previousWeek = Date.parse(new Date(today.getFullYear(), today.getMonth(), today.getDate() - 7));
    

    If you don’t want a timestamp returned, remove the Date.parse() from it to receive a string like this:

    Mon Dec 03 2012 00:00:00 GMT+0100 (West-Europa (standaardtijd))
    

    (This was returned on a system with Dutch language settings)

    To get the week dates, take a look at these 2 questions:
    JavaScript – get the first day of the week from current date
    How to get first and last day of the week in JavaScript

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my app I have next and previous week buttons, but also a UIDatePicker.
I have First/Last/Previous/Next buttons that change the selected child node of a TreeViewItem. Setting
I have a set of buttons(previous & next) that the user clicks. <a id=prev_btn
I have three HTML objects and want to arrange Previous button at the left
I have buttons on a page that look like: <p> <a href=view.php> <input type=button
I want to have buttons that kind of act like tabs - they switch
I have a webview and i have next previous buttons to get to the
In my web application I have wizards with many next previous buttons and choices
I have two buttons that switching to the next list of events and the
I am building a wordpress theme I want to have the next and previous

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.