Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

First weekday on android phones

According to Androids documentation I get the impression, that Android only supports ISO 8601 week number calculation (this is good for me as I live in Austria).

So, I think that an "Android Week" alway starts on Monday. This is important for me, because I want to read/write Androids calendar and the recurrence rules are encoded with the rfc2445 standard. The field in question is "WKST"

The WKST rule part specifies the day on which the workweek starts.

As long my application is used in Europa there is no problem with assuming that Monday is the first day of week. But what about other countries (USA)?

Is my assumption correct?

References:

http://www.ietf.org/rfc/rfc2445.txt

http://developer.android.com/reference/android/text/format/Time.html

like image 962
Arthur Avatar asked Feb 18 '10 11:02

Arthur


1 Answers

Android supports Java's Calendar.getFirstDayOfWeek(). This will tell you the proper first day of the week in the current locale.

Please keep in mind that some people might want to have a different first day of the week from their locale.

like image 172
David Schmitt Avatar answered Nov 03 '22 20:11

David Schmitt