logo

Week Numbers

Something funny happened today. I needed a formula to reliably work out the number of the week for any given date. So I searched the LDD forum for "week number" and opened the first result as it looked promising. Then I decided to read the main post that it was a response to. It took me a while to notice that it was me who posted it in the first place. Even more freaky is the date it was posted. Three years on and still no idea how to reliably work out the week number! In the end I opted for a sunday-to-sunday date string in the format 1901203_26012003, using the following formula:

DateWeekStart:=@Adjust(@Now; 0; 0; 1-@Weekday(@Now); 0; 0; 0);
DateWeekEnd:=@Adjust(DateWeekStart; 0; 0; 7; 0; 0; 0);

@ReplaceSubstring(@Text(DateWeekStart) + "_" + @Text(DateWeekEnd);"/"; "")

Thanks to Rob Wunderlich for treating me to a DVD of the Third Rock From the Sun. My favourite American comedy. Well, the only one I like really. Am I the only person in the world that thinks Friends is awful?

I wish I could make it to LotusSphere to thank people face-to-face and even just to put some faces to some names. The trouble with being a penny-pinching scumbag contractor is that it's just not economically attractive. Not only would I have to pay my own way there and in, I would be missing the wages from time off work! Maybe next year, if I'm not working, I'll make it over. Got some relatives in Florida somehere I could probably stay with. Jacksonville I think.

Ed Brill has acknowledged us doubters.

Comments

    • avatar
    • Hippo
    • Thu 23 Jan 2003 10:22

    Yes Jake,

    Friends indeed has gotten bad. A good yank comedy show is called Scrubs, its hilarious.

  1. Scrubs is very good, its currently on Thursday nights at 10pm on Sky 1.

    Friends is indeed a bit lame now. I still like Frasier though..

  2. Well, I AM CANADIAN (local joke regarding a beer brand: Yes we have a beer that's called Canadian!!!) and I just love That 70s show ({Link}) It is quite good and you shoudl like it if you like 3rd rock.

    I thing you guys still have in Europe (at least had 3 years ago when I was in Belgium) is the Muppet Show. I miss it so much...

    Different matter: Jake, did you get a chance to look at what I sent you? I can still give a hand for the Notes interface if you want. Just give me some feedback.

    • avatar
    • Chris
    • Thu 23 Jan 2003 12:18

    Regarding the announcement of iNotes/ Netscape 7 compatibility... This is a bit of a strange announcement... An (award winning) web based application that is going to be compatible with Netscape 7 ?! Is not this what it should be in the first place to be called a web based application ?...

    I dont watch sitcoms... for my fun fix I go to the IBM/Lotus sites instead.

    • avatar
    • Gerolf
    • Thu 23 Jan 2003 12:50

    If you're looking for ISO week numbers, you could check out {Link}

    In line with the wish list one might wish that the calendar views (they have week numbers don't they?) were more open to programming...

    • avatar
    • Jon LeDrew
    • Thu 23 Jan 2003 13:25

    Friends is awful.

    • avatar
    • Stan Rogers
    • Thu 23 Jan 2003 14:00

    "Penny-pinching scumbag contractors" aren't the only ones who have trouble getting to LotusSphere -- try explaining to your Canadian boss that you absolutely must get to Disney World -- or anywhere else in Florida -- for vital business purposes in mid-winter. It's not as easy as it seems....

    • avatar
    • Toto
    • Thu 23 Jan 2003 14:39

    @WeekNumber will be available in R7...

    • avatar
    • Kieren Johnson
    • Thu 23 Jan 2003 20:29

    You're right about Friends, its been crap since the end of series 3

    Seinfeld is my all-time favourite US comedy series though. Luckily one of the local channels here (Channel Ten - Oz) regularly repeats episodes every week night.

    I just got the whole of 'The Office' first series and that was great. What do you think?

    • avatar
    • Laurent de Walick
    • Fri 24 Jan 2003 01:13

    Jake,

    I calculate te week number according to the ISO8601 standars. This standard defines the week number by:

    - weeks start on a monday

    - week 1 of a given year is the one that includes the first Thursday of that year.

    (Ed: Here it is.)

    • avatar
    • Tone
    • Fri 24 Jan 2003 03:26

    Hmm - horizontal scroll!

    Friends: Overated, irritating, naff

    Scrubs: Refreshing, original, funny

    3rd rock: Perceptive, but increasingly tired

    I've been brief for once. I don't like it.

  3. Enough of the Friends-bashing! It may be a little inane but at least it is harmless.

    It is certainly better than much of the tat we throw out. "My Hero" anyone?

    For all round good comedy you need look no further than "The Day Today". This is me, Condublasney Piper, bidding you good-night.

  4. Talking of re-visitng your own posts...

    I did a very similar thing, looked up "OLE and excel 2000" on LDD, and read all these ultimately useful posts, turns out the poster was my collegue sat 3 feet away!

  5. I had a similar experience which involved enlisting some support from a third party.

    When they came back with a URL for a solution, whose post was it? The customer's!

  6. Jake:

    Happy to send along the DVDs, and happy to have given you a chance to start a new Blog War over American sitcoms.

    As much as I hate to admit it, I don't believe I've ever actually seen an entire episode of Friends, and 3rd Rock only seemed to catch my attention in reruns.

    Regardless, enjoy!

    - Rob

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Thu 23 Jan 2003

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content