in reply to Re: Get date interval from week of year -> Date::Manip
in thread Get date interval from week of year -> Date::Manip

2003-09-08 now (week 37) 2003-01-01 beginning of the year 2003-09-17 beginning of week 37 2003-09-24 end of week 37

Well, it's nice that people test their code before posting it, but if you don't look at the output then what's the point? According to your program, Sep 8 is between Sep 17 and Sep 24.

Abigail

Replies are listed 'Best First'.
Re: Re: Get date interval from week of year -> Date::Manip
by Anonymous Monk on Sep 08, 2003 at 08:12 UTC
    How do you draw that conclusion? (nowhere do I say that Sept8 is between Sept17 and Sept24). It's like you're purposefuly being rude ;(
      How do you draw that conclusion? (nowhere do I say that Sept8 is between Sept17 and Sept24).
      Ok, let me spell it out for you.
      2003-09-17 beginning of week 37

      Week 37 starts on September 17.

      2003-09-24 end of week 37

      And week 37 ends on September 24 (making it an 8 day week...)

      2003-09-08 now (week 37)

      8 September is in week 37. To be in a week, you must be on or after the start of the week, and on or before the end of the week. Conclusion, 8 September has to be between 17 and 24 September.

      Abigail

      elementary my dear anon.

      line one states that now 2003-09-08 is week 37.
      line 3 states that 2003-09-17 is the beginning of week 37
      line 4 states that 2003-09-24 is end of week 37

      ergo week 37 contains at least 2003-09-08 thru 2003-09-24.
      something in the neighborhood of 17 days.

      Abigail, perhaps you were a tad hasty, nowhere does he state that the eighth falls between the seventeenth and the twenty fourth in his seventeen day week.

      However, I do have difficulty understanding how a 17 day week can have the 17th and the 8th in the beginning,since the 17th is the 10th day of the 17 day week, that is over half way through the week and is no longer the beginning.

      Wait, Wait, It was never stated that the 24th was the LAST day of the week, it could contain more days, so both the 8th and the 17th COULD be in the beginning of the week, AND the 8th would not have to fall between the 17th and the 24th. Also proving my earlier statement incorrect (nope, no seventeen day week claimed here0.

      My apologies to Anon. This is not a flame, but the logic does appeal to my twisted sense of humor.

      I only hope your reply will extend the number of days in the week rather than a mundane code correction.

      Enjoy!
      dageek

      p.s. Please forgive the use of the male gender, since I do not know the true gender of Anon, but this seems to be the kind of mistake a guy like me would make.