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 618893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:35:46+00:00 2026-05-13T18:35:46+00:00

OK so for example, today is Tuesday, Feb 02. Well the equivalent Tuesday from

  • 0

OK so for example, today is Tuesday, Feb 02. Well the equivalent “Tuesday” from last year was on Feb 03.

How can I find this out programmatically?

Thanks!!

  • 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-05-13T18:35:47+00:00Added an answer on May 13, 2026 at 6:35 pm

    Just my two cents. I don’t like the idea, that the second answer assumes 52 weeks in a year, it will work for a single year, but is a solution to only this exact problem – eg. if you want to check the same thing moving back 10 years it won’t work. I’d do it like this:

    var today:Date = new Date();    
    // Here we store the day of the week            
    var currentDay:int = today.day;
    trace (today);      
    const milisecondsInADay:uint = 1000*60*60*24;
    // Here we move back a year, but we can just as well move back 10 years
    // or 2 months      
    today.fullYear -= 1;
    // Find the closest date that is the same day of the week as current day
    today.time -= milisecondsInADay*(today.day-currentDay);     
    trace (today);
    

    returns:

    Tue Feb 2 21:13:18 GMT+0100 2010 
    Tue Feb 3 21:13:18 GMT+0100 2009
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For example, a user can view his password if today is Monday or Tuesday
So Coldfusion is acting wonky today. I can't seem to update DB. For example
Im trying to get the closest date to today from array dates. Example: Today
before this i'm using this function to from 6 month date to today date..
I want to find record by this week just declare current date. Example: select
I saw an example today of a method overriding a method in a base
I downloaded today Subsonic 3 and tried out the examples. I am having a
Example: print max(chain_length(i) for i in xrange(1,10001)) This returns the maximum/biggest chain_length (an arbitrary
Example: an Employee table with an optional DateOfBirth field can be normalized into two
How can we get the information on the past history of dead locks.For example

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.