libs/libc/time: update description of strftime

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
Petro Karashchenko 2022-03-27 15:20:00 +02:00 committed by Xiang Xiao
parent 466063ac9e
commit 2ac3e3c793

View File

@ -99,6 +99,8 @@ static const char * const g_monthname[12] =
* ter, and terminated by a conversion specifier character, and are
* replaced in s as follows:
*
* %a The abbreviated weekday name according to the current locale.
* %A The full weekday name according to the current locale.
* %b The abbreviated month name according to the current locale.
* %B The full month name according to the current locale.
* %C The century number (year/100) as a 2-digit integer. (SU)
@ -221,16 +223,6 @@ size_t strftime(FAR char *s, size_t max, FAR const char *format,
}
break;
/* %y: The year as a decimal number without a century
* (range 00 to 99).
*/
case 'y':
{
len = snprintf(dest, chleft, "%02d", tm->tm_year % 100);
}
break;
/* %C: The century number (year/100) as a 2-digit integer. */
case 'C':
@ -406,6 +398,16 @@ size_t strftime(FAR char *s, size_t max, FAR const char *format,
}
break;
/* %y: The year as a decimal number without a century
* (range 00 to 99).
*/
case 'y':
{
len = snprintf(dest, chleft, "%02d", tm->tm_year % 100);
}
break;
/* %Y: The year as a decimal number including the century. */
case 'Y':