You have seven days, is it horribly looked down upon to store a byte and just mask the bits? Probably so, but that's how I'd do it in C :-).
Hopefully that doesn't store up too much excitement, kris On Mon, Dec 27, 2010 at 1:32 PM, Kristopher Micinski <[email protected]> wrote: > Would JSON perhaps be a good solution for this? > > Kris Micinski > > On Mon, Dec 27, 2010 at 12:09 PM, Bret Foreman <[email protected]> wrote: >> I would use an enum for the Weekdays like this enum Weekdays >> { SUNDAY , MONDAY, TUESDAY, ...} >> >> And then store the ordinal in the DB like this: int >> ordinal_to_store_in_DB = weekday.SUNDAY.ordinal() >> >> And retrieve the values from the DB like this: Weekdays day = >> Weekdays.values()[ordinal_value_from_Db]; >> >> This makes it easy to read your code and still provides maximum >> performance. >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

