Is
In order to determine first what a week in the current locale of the day is the first day on Monday in Russia, But my Mac shows the localized calendar incorrectly the first day. So I wonder if I can determine which day will be in the current locale. Thank you.
Anatoly @ MB: / user / Anatolie $ Cal ?? Ñ ?? Ð »Ñ ?? 2012²² ?? п ½ в² ?? Ñ ?? Ñ ?? Ñ ?? Ñ ?? Ð¿Ñ ?? ± ?? Ð ± 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
I was wrong in my first post, and provides a C API.
So, if reliance on the library is acceptable, you can get the first of the week using the following snippet:
#include & lt; Stdio.h & gt; * / #include & lt; for calendar tasks Unicode / ucal.h & gt; / * U_cleanup () * / #include & lt; Unicode / uclean.h & gt; * / #include for * * Uloc_getDefault () & lt; Unicode / Ulोक H & gt; Int main () {/ * It is * pre set * / UErrorCode err = U_ZERO_ERROR; UCalendar * cal = ucal_open (0, -1, / * default timezone * / uloc_getDefault (), / * default (current) locale * / UCAL_DEFAULT, / * default calendar type * / & amp; if (! Cal) {fprintf ( stderr, "ICU error:% s \ n", u_errorName (err)); u_cleanup (); return 1;} / * 1 Sunday 2 Monday, etc. * / Printf ( "% d \ n" , ucal_getAttribute (cal, Usiael_faiarsdeed DAY_OF_WEEK)); ucal_close (calories); u_cleanup (); return 0;} then icu-i18n pkg-config library Can link to the program. Ah, and they are quite broad, yes Person you might be interested.
Comments
Post a Comment