[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Need some help with number/date related code
From:       Bertjan Broeksema <broeksema () kde ! org>
Date:       2010-06-23 11:34:10
Message-ID: 201006231334.10660.broeksema () kde ! org
[Download RAW message or body]

Hi all,

First of please cc me as I'm not subscribed to the list.

Currently I'm working on a rewrite of the Todo/Event editors of korganizer. We 
came up with a new concept for handling recurrence. The idea is briefly as 
follows:

For an event that recurs monthly the user can choose one of the following 
options from a combo:

- ${n}th day of the month
- ${month.lastDay() - n}th day of the month
- the ${i}th ${weekday} of the month
- the ${month.weekCount() - i}th day of the month

When an event recurs yearly the user can choose one of the following options 
from a combo:

- ${n}th of ${long-month-name}
- ${month.lastDay() - n}th last day of ${long-month-name}
- the ${i}th ${weekday} of ${long-month-name}
- the ${month.weekCount() - i}th day of ${long-month-name}
- the ${m}th day of the year

Calculating the numbers isn't the hardest part, that sort of works already, 
however I've no clue on how to construct the strings for the combos in such a 
way that they are translatable. Currently they aren't (as I was just 
implementing a proof of concept), but they should become.

It's not really possible to hard code strings because the values in the combo 
need to be recalculated when the start date of the event changes.

Relevant code can at the time of writing be found at:

${kdesvn}/branches/work/komo/kdepim/incidenceeditors/incidenceeditors-
ng/incidencerecurrence.cpp

Thanks in advance for any pointers to solve this problem.

Cheers,

Bertjan
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic