How to get localized short day-in-week name (Mo/Tu/We/Th…)

The best way is with java.text.DateFormatSymbols DateFormatSymbols symbols = new DateFormatSymbols(new Locale(“it”)); // for the current Locale : // DateFormatSymbols symbols = new DateFormatSymbols(); String[] dayNames = symbols.getShortWeekdays(); for (String s : dayNames) { System.out.print(s + ” “); } // output : dom lun mar mer gio ven sab

NSCalendar first day of week

Edit: This does not check the edge case where the beginning of the week starts in the prior month. Some updated code to cover this: https://stackoverflow.com/a/14688780/308315 In case anyone is still paying attention to this, you need to use ordinalityOfUnit:inUnit:forDate: and set firstWeekday to 2. (1 == Sunday and 7 == Saturday) Here’s the code: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)