Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 035b427c authored by Eric Fischer's avatar Eric Fischer Committed by The Android Open Source Project
Browse files

am 722a5c04: Add support for "standalone months" to tztime\'s strftime().

Merge commit '722a5c04'

* commit '722a5c04':
  Add support for "standalone months" to tztime's strftime().
parents 9ded6bb1 722a5c04
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -32,6 +32,7 @@ void localtime_tz(const time_t * const timep, struct tm * tmp, const char* tz);
struct strftime_locale {
    const char *mon[12];    /* short names */
    const char *month[12];  /* long names */
    const char *standalone_month[12];  /* long standalone names */
    const char *wday[7];    /* short names */
    const char *weekday[7]; /* long names */
    const char *X_fmt;
+11 −4
Original line number Diff line number Diff line
@@ -172,10 +172,17 @@ label:
					pt, ptlim, modifier);
				continue;
			case 'B':
				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':