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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:42:16+00:00 2026-06-14T14:42:16+00:00

How can I get the same day of the same ISO-8601 week number but

  • 0

How can I get the same day of the same ISO-8601 week number but in the previous year using php?

I am familiar with extracting this soft of information from a time stamp. Is there a built-in way for me to go from day of week, week of year and year to time stamp?

  • 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-14T14:42:17+00:00Added an answer on June 14, 2026 at 2:42 pm

    You can use the combination of both date and strtotime like so:

    // get the timestamp
    $ts = strtotime('today');
    
    // get year, week number and day of week
    list($year, $week, $dow) = explode('-', date('Y-W-N', $ts));
    
    // use the "YYYY-WXX-ZZ" format    
    $format = ($year - 1) . "-W$week-$dow";
    echo date('Y-m-d', strtotime($format)), PHP_EOL;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Pretty much the same as this question. But I can't seem to get this
How can I get several GridViews on a single page to share the same
I can get the file path with: (message (file-name-directory (or buffer-file-name load-file-name))) But if
You can get a list of databases using PRAGMA database_list or a list of
I can easily get Explorer to open up and select a file using the
Good day! I am wondering how can I get the desired result in my
This is going to sound very silly but I can't get a string to
How can you get the number of current events that are enlisted on a
I can get the 15/02 - 21/06 date range data on every year from
I'm wondering if there's an easy way (like using strtotime) whereby I can get

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.