aboutsummaryrefslogtreecommitdiffstats
path: root/libcutils
diff options
context:
space:
mode:
authorEric Fischer <enf@google.com>2009-05-15 10:15:18 -0700
committerThe Android Open Source Project <initial-contribution@android.com>2009-05-15 10:15:18 -0700
commit035b427c703e24d583be7aef9923a85327d8b546 (patch)
treeb61e0defdacbdb02cfde2334f463c8df260ce512 /libcutils
parent9ded6bb1e1fbdecb47cee03529ebc9f0adfa40ee (diff)
parent722a5c0462f38827f4097065bfc3826b9e0e9fb4 (diff)
downloadsystem_core-035b427c703e24d583be7aef9923a85327d8b546.tar.gz
system_core-035b427c703e24d583be7aef9923a85327d8b546.tar.bz2
system_core-035b427c703e24d583be7aef9923a85327d8b546.zip
am 722a5c04: Add support for "standalone months" to tztime\'s strftime().
Merge commit '722a5c0462f38827f4097065bfc3826b9e0e9fb4' * commit '722a5c0462f38827f4097065bfc3826b9e0e9fb4': Add support for "standalone months" to tztime's strftime().
Diffstat (limited to 'libcutils')
-rw-r--r--libcutils/tzstrftime.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/libcutils/tzstrftime.c b/libcutils/tzstrftime.c
index 29c50154..e37d79ae 100644
--- a/libcutils/tzstrftime.c
+++ b/libcutils/tzstrftime.c
@@ -172,10 +172,17 @@ label:
pt, ptlim, modifier);
continue;
case 'B':
- pt = _add((t->tm_mon < 0 ||
- t->tm_mon >= MONSPERYEAR) ?
- "?" : Locale->month[t->tm_mon],
- pt, ptlim, modifier);
+ if (modifier == '-') {
+ pt = _add((t->tm_mon < 0 ||
+ t->tm_mon >= MONSPERYEAR) ?
+ "?" : Locale->standalone_month[t->tm_mon],
+ pt, ptlim, modifier);
+ } else {
+ pt = _add((t->tm_mon < 0 ||
+ t->tm_mon >= MONSPERYEAR) ?
+ "?" : Locale->month[t->tm_mon],
+ pt, ptlim, modifier);
+ }
continue;
case 'b':
case 'h':