[PATCH] strftime.3: refer to the relevant nl_langinfo items

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As it wasn't clear before where this kind of information can be
obtained from.

* man3/strftime.3 (%a, %A, %b, %B, %c, %p, %r, %x, %X): Add information
about the locale elements that can be used to retrieve the relevant
information using nl_langinfo() library call.

Signed-off-by: Eugene Syromyatnikov <evgsyr@xxxxxxxxx>
---
 man3/strftime.3 | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/man3/strftime.3 b/man3/strftime.3
index dd7dec7..20ba057 100644
--- a/man3/strftime.3
+++ b/man3/strftime.3
@@ -89,24 +89,55 @@ structure are also shown.
 The abbreviated name of the day of the week according to the current locale.
 (Calculated from
 .IR tm_wday .)
+(The specific names used in the current locale can be obtained by calling
+.BR nl_langinfo (3)
+library call with
+.BR ABDAY_ { 1 \(en 7 }
+as an argument.)
 .TP
 .B %A
 The full name of the day of the week according to the current locale.
 (Calculated from
 .IR tm_wday .)
+(The specific names used in the current locale can be obtained by calling
+.BR nl_langinfo (3)
+library call with
+.BR DAY_ { 1 \(en 7 }
+as an argument.)
 .TP
 .B %b
 The abbreviated month name according to the current locale.
 (Calculated from
 .IR tm_mon .)
+(The specific names used in the current locale can be obtained by calling
+.BR nl_langinfo (3)
+library call with
+.BR ABMON_ { 1 \(en 12 }
+as an argument.)
 .TP
 .B %B
 The full month name according to the current locale.
 (Calculated from
 .IR tm_mon .)
+(The specific names used in the current locale can be obtained by calling
+.BR nl_langinfo (3)
+library call with
+.BR MON_ { 1 \(en 12 }
+as an argument.)
 .TP
 .B %c
 The preferred date and time representation for the current locale.
+(The specific format used in the current locale can be obtained by calling
+.BR nl_langinfo (3)
+library call with
+.B D_T_FMT
+as an argument for the
+.B %c
+conversion specification, and with
+.B ERA_D_T_FMT
+for the
+.B %Ec
+conversion specification.)
 (In the POSIX locale this is equivalent to
 .BR "%a %b %e %H:%M:%S %Y" .)
 .TP
@@ -230,6 +261,12 @@ corresponding strings for the current locale.
 Noon is treated as "PM" and midnight as "AM".
 (Calculated from
 .IR tm_hour .)
+(The specific string representations used for "AM" and "PM"
+in the current locale can be obtained by calling
+.BR nl_langinfo (3)
+library call with
+.BR AM_STR " and " PM_STR ,
+respectively.)
 .TP
 .B %P
 Like
@@ -243,6 +280,11 @@ string for the current locale.
 .B %r
 The time in a.m. or p.m. notation.
 (SU)
+(The specific format used in the current locale can be obtained by calling
+.BR nl_langinfo (3)
+library call with
+.B T_FMT_AMPM
+as an argument.)
 (In the POSIX locale this is equivalent to
 .BR "%I:%M:%S %p" .)
 .TP
@@ -326,11 +368,33 @@ and
 .TP
 .B %x
 The preferred date representation for the current locale without the time.
+(The specific format used in the current locale can be obtained by calling
+.BR nl_langinfo (3)
+library call with
+.B D_FMT
+as an argument for the
+.B %x
+conversion specification, and with
+.B ERA_D_FMT
+for the
+.B %Ex
+conversion specification.)
 (In the POSIX locale this is equivalent to
 .BR %m/%d/%y .)
 .TP
 .B %X
 The preferred time representation for the current locale without the date.
+(The specific format used in the current locale can be obtained by calling
+.BR nl_langinfo (3)
+library call with
+.B T_FMT
+as an argument for the
+.B %X
+conversion specification, and with
+.B ERA_T_FMT
+for the
+.B %EX
+conversion specification.)
 (In the POSIX locale this is equivalent to
 .BR %H:%M:%S .)
 .TP
@@ -657,6 +721,7 @@ main(int argc, char *argv[])
 .BR date (1),
 .BR time (2),
 .BR ctime (3),
+.BR nl_langinfo (3),
 .BR setlocale (3),
 .BR sprintf (3),
 .BR strptime (3)
-- 
2.1.4




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux