* libc/time/strftime.c (strftime): Add %e format specifier.
This commit is contained in:
parent
930bc96b4a
commit
01f5155e98
|
@ -1,3 +1,7 @@
|
||||||
|
2002-06-21 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* libc/time/strftime.c (strftime): Add %e format specifier.
|
||||||
|
|
||||||
2002-06-21 Thomas Fitzsimmons <fitzsim@redhat.com>
|
2002-06-21 Thomas Fitzsimmons <fitzsim@redhat.com>
|
||||||
|
|
||||||
* libc/search/hash.h (LITTLE_ENDIAN, BIG_ENDIAN): Define if not
|
* libc/search/hash.h (LITTLE_ENDIAN, BIG_ENDIAN): Define if not
|
||||||
|
|
|
@ -64,6 +64,9 @@ A string representing the complete date and time, in the form
|
||||||
o %d
|
o %d
|
||||||
The day of the month, formatted with two digits.
|
The day of the month, formatted with two digits.
|
||||||
|
|
||||||
|
o %e
|
||||||
|
The day of the month, formatted with leading space if single digit.
|
||||||
|
|
||||||
o %H
|
o %H
|
||||||
The hour (on a 24-hour clock), formatted with two digits.
|
The hour (on a 24-hour clock), formatted with two digits.
|
||||||
|
|
||||||
|
@ -257,6 +260,16 @@ _DEFUN (strftime, (s, maxsize, format, tim_p),
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
|
case 'e':
|
||||||
|
if (count < maxsize - 2)
|
||||||
|
{
|
||||||
|
sprintf (&s[count], "%2d",
|
||||||
|
tim_p->tm_mday);
|
||||||
|
count += 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
break;
|
||||||
case 'H':
|
case 'H':
|
||||||
if (count < maxsize - 2)
|
if (count < maxsize - 2)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue