>From d26da1df7498be73daa865816485118e17b8f764 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Wed, 19 Oct 2016 14:46:14 -0700 Subject: [PATCH] strftime: support %q to return the quarter --- lib/strftime.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/strftime.c b/lib/strftime.c index 4e65190..564e819 100644 --- a/lib/strftime.c +++ b/lib/strftime.c @@ -1115,6 +1115,10 @@ strftime_case_ (bool upcase, STREAM_OR_CHAR_T *s, goto underlying_strftime; #endif + case L_('q'): /* GNU extension. */ + DO_SIGNED_NUMBER (1, tp->tm_mon < -3, tp->tm_mon / 3 + 1U); + break; + case L_('R'): subfmt = L_("%H:%M"); goto subformat; -- 2.5.5