I made a calendar view with year as the first argument and week as the second. When I browse to viewname/YYYY/WW the view I get is a month view, with a week title (Week of November 11 2006)

Comments

KarenS’s picture

The week argument is not working yet. I thought I had removed it as an option, but maybe not... Anyway, the problem is that I am still thinking through how to implement it (i.e. how can I tell if 2006/10 is 'month 10' of year '2006' or 'week 10' of 'year 2006')

Egon Bianchet’s picture

how can I tell if 2006/10 is 'month 10' of year '2006' or 'week 10' of 'year 2006

Are you thinking about a view that must work with both month and week arguments right? I guess that a week only view isn't a problem, but I'm not sure.

Here's a couple of ideas, I don't know if it's possible to implement them:

- use a wildcard for the month argument, eg: 2006/12/1 is December 1st, 2006/week/40 is the 40th week
- force months written as short sting, eg: 2006/dec/1
- use an additional argument, like view_rss, eg: 2006/12/1/week is the week of December 1st
- use a "day range", eg: 2006/12/1-7, from December 1st to December 7th

KarenS’s picture

That's the kind of thing I am looking at, except I am trying to keep English words out of the url for better internationalization.

KarenS’s picture

I just checked in changes to the cvs version to handle week displays. It is probably still buggy, but you can try it out. I ended up using 2006/W10 to mean week 10 of year 2006. The 'W' is an iso standard for indicating a week, so I figured it's OK even though the word 'week' in various languages might start with some other letter.

KarenS’s picture

Status: Active » Fixed

This should be fine now. The week view has been integrated in and you can switch between year, month, week, and day.

Egon Bianchet’s picture

That's great, thanks :-)

Anonymous’s picture

Status: Fixed » Closed (fixed)