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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:28:30+00:00 2026-05-13T21:28:30+00:00

I have week number of current year and week day generated by date() like

  • 0

I have week number of current year and week day generated by date() like this.

$week_number = date('W');
$week_day = date('w');

I need to format this. How can I get starting date of this week? Or day of month with $week_number and $week_day?

  • 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-13T21:28:30+00:00Added an answer on May 13, 2026 at 9:28 pm

    Update:

    Maybe this article helps you. It describes how to get the start and end date of a given week.

    <?php
    // Monday
    echo date(
        datetime::ISO8601,
        strtotime("2006W37"));
    
    // Sunday
    echo date(
        datetime::ISO8601,
        strtotime("2006W377"));
    ?>
    

    Where the format is <year>W<week-number><daynumber> and Monday is 1.

    Update 2:

    Maybe another possibility is to use strtotime() this way:

    echo strtotime("last Monday");
    echo strtotime("next Sunday");
    

    You can combine this with date() to get the date in the desired format.


    You can get the day of the month with date('d') directly.

    date() documentation.

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

Sidebar

Related Questions

I also have a week number, extracted from another time object like this other_time.strftime('%W').to_i
Hallo all. if i have week number 42 and i need to know what
I have for example: $week_number = '13'; $year = '2012'; 13 week in 2012
I have a jquery datepicker which selects week number and a date range based
If I have a certain week number (eg 51) and a given year (eg
I would like to have a function that takes a week number as input
I have a function that get the current weeknumber from the given date e.g.
This week I have figured out how to modify form elements in the location
A situation I ran across this week: we have a jQuery Ajax call that
I am trying to list the people who have birthday this week with this

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.