English 中文(简体)
页: 1
原标题:iPhone - How may I work with Monday as first day of week

I m working with many dates. For an international work, I d like to force (and be able to let the user decide) which is the first day of week.

But, once this is setted (let s say Minday as first day of week), I m searching the best way to work in my code. I see that EKSunday is 1 and EKMonday is 2.

How can I convert dynamicaly Sunday to 7 and Monday to 1 ? Am I obliged to convert each return value from different method calls (when working with components for example with the weekDay return value) ? Is there any way to foce this once for all and don t have to deal with conversion ?

最佳回答

Why not use the existing enumeration for coding purposes and use the first-day-of-the-week preference just to display? That way, you won t have to rebuild any existing functionality.

问题回答

暂无回答




相关问题
How does gettext handle dynamic content?

In php (or maybe gettext in general), what does gettext do when it sees a variable to dynamic content? I have 2 cases in mind. 1) Let s say I have <?=$user1?> poked John <?=$user2?>. ...

Explain the Need for Mutexes in Locales, Please

Reading the question Why doesn’t C++ STL support atoi(const string& ) like functions?, I encountered a comment which warned that GCC (at least) has a bug that can slow down multi-threaded ...

How does Vistalizer work

How does Vistalizer manage to override the language limit in Windows Vista Home edition. Which api s does it use to allow installation of Multiple language packages.

Localized exceptions (within a Struts2 app)

I am developing a Struts 2 application with support for multiple languages. If one of the domain objects needs to throw an exception, how can it do so in such a way that the error message is no ...

Rails Globalize plugin help

Has anyone gotten the Globalize plugin to work Rails 2.3.2 or later? If so, could you direct me to some useful info?

热门标签