asctime shares tableName with strftime. Two fixed cases from the
libc.prx of PPSA07923 and PPSA05916: a weekday of 2^30 with a month of
-1073741825, and the reverse with INT_MIN.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The libc.prx that titles ship (PPSA07923, PPSA05916) finds the name of
tm_wday or tm_mon at field 2 * value of a table that alternates short
and full names, plus one for the full name, computed in 32-bit int. A
negative field gives the first short name and a field past the table
gives an empty name. The doubling wraps, so values from 2^30 up print
"Sun" or "Jan" where main printed nothing, negative values whose
doubling turns positive print nothing, and INT_MIN gives the full
"Sunday" or "January" for %A and %B.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
%G, %g and %V no longer throw for a negative tm_yday, a tm_yday past the year or a tm_wday below -6. They follow the year and week rule of the SDK libc.prx, read from its disassembly and checked by running it, with its leap-year test and 32-bit arithmetic. %U and %W also wrap in 32 bits as that module does.
%U and %W take the weekday as (tm_wday + 7) % 7 and (tm_wday + 6) % 7
with the C remainder, which fits the PS5 rows of libSceLibcInternal.sprx
and of the libc.prx titles ship. A composite conversion is written part
by part, each part all or nothing. %G, %g and %V throw for a tm_yday
past the year and a tm_wday below -6, where no rule fits the console.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
strftime handed most conversions to the host's strftime, which differs
from FreeBSD 11's for E and O modifiers on conversions glibc does not
pair with them (%Ea was printed literally), padding flags on %+ and %v,
years outside 1000 to 9999 (%Y printed 899 and -1 where FreeBSD prints
0899 and -001), and out-of-range fields (%I of hour 100, %u of weekday
8). On Windows the padding flags printed nothing. strftime now follows
FreeBSD 11 strftime.c with the C locale on every host, and asctime
follows FreeBSD 11 asctime.c, padding years to four digits and setting
longer years apart.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VZWLdTjf1S57iLgn2rcaFb