options/ansi: add %C and %y for strftime
@@ -230,6 +230,18 @@ size_t strftime(char *__restrict dest, size_t max_size,
return 0;
p += chunk;
c += 2;
+ }else if(*(c + 1) == 'C') {
+ auto chunk = snprintf(p, space, "%.2d", (1900 + tm->tm_year) / 100);
+ if(chunk >= space)
+ return 0;
+ p += chunk;
+ c += 2;
+ }else if(*(c + 1) == 'y') {
+ auto chunk = snprintf(p, space, "%.2d", (1900 + tm->tm_year) % 100);
+ if(chunk >= space)
+ return 0;
+ p += chunk;
+ c += 2;
}else if(*(c + 1) == '%') {
auto chunk = snprintf(p, space, "%%");
if(chunk >= space)
