about summary refs log tree commit diff
path: root/time/Makefile
diff options
context:
space:
mode:
authorTAMUKI Shoichi <tamuki@linet.gr.jp>2019-01-24 23:04:12 +0900
committerTAMUKI Shoichi <tamuki@linet.gr.jp>2019-01-24 23:04:12 +0900
commit32f600a27275ec7a315cbbc465cb19b06b44f9b8 (patch)
treeafb54923738a2adab619d19877e20707663127a0 /time/Makefile
parentb22eed371086b297adf9c1509850649de883d77b (diff)
downloadglibc-32f600a27275ec7a315cbbc465cb19b06b44f9b8.tar.gz
glibc-32f600a27275ec7a315cbbc465cb19b06b44f9b8.tar.xz
glibc-32f600a27275ec7a315cbbc465cb19b06b44f9b8.zip
strftime: Pass the additional flags from "%EY" to "%Ey" [BZ #24096]
The full representation of the alternative calendar year (%EY)
typically includes an internal use of "%Ey".  As a GNU extension,
apply any flags on "%EY" (e.g. "%_EY", "%-EY") to the internal "%Ey",
allowing users of "%EY" to control how the year is padded.

Reviewed-by: Rafal Luzynski <digitalfreak@lingonborough.com>
Reviewed-by: Zack Weinberg <zackw@panix.com>

ChangeLog:

	[BZ #24096]
	* manual/time.texi (strftime): Document "%EC" and "%EY".
	* time/Makefile (tests): Add tst-strftime2.
	(LOCALES): Add ja_JP.UTF-8, lo_LA.UTF-8, and th_TH.UTF-8.
	* time/strftime_l.c (__strftime_internal): Add argument yr_spec to
	override padding for "%Ey".
	If an optional flag ('_' or '-') is specified to "%EY", interpret the
	"%Ey" in the subformat as if decorated with that flag.
	* time/tst-strftime2.c: New file.
Diffstat (limited to 'time/Makefile')
-rw-r--r--time/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/time/Makefile b/time/Makefile
index d23ba2dee6..5c6304ece1 100644
--- a/time/Makefile
+++ b/time/Makefile
@@ -43,13 +43,14 @@ tests	:= test_time clocktest tst-posixtz tst-strptime tst_wcsftime \
 	   tst-getdate tst-mktime tst-mktime2 tst-ftime_l tst-strftime \
 	   tst-mktime3 tst-strptime2 bug-asctime bug-asctime_r bug-mktime1 \
 	   tst-strptime3 bug-getdate1 tst-strptime-whitespace tst-ftime \
-	   tst-tzname tst-y2039 bug-mktime4
+	   tst-tzname tst-y2039 bug-mktime4 tst-strftime2
 
 include ../Rules
 
 ifeq ($(run-built-tests),yes)
 LOCALES := de_DE.ISO-8859-1 en_US.ISO-8859-1 ja_JP.EUC-JP fr_FR.UTF-8 \
-	   es_ES.UTF-8 pl_PL.UTF-8 ru_RU.UTF-8
+	   es_ES.UTF-8 pl_PL.UTF-8 ru_RU.UTF-8 \
+	   ja_JP.UTF-8 lo_LA.UTF-8 th_TH.UTF-8
 include ../gen-locales.mk
 
 $(objpfx)tst-ftime_l.out: $(gen-locales)