PX_TIME2STRING(3)

πŸ’– PX_TIME2STRING(3) β€” the library functions manual page, but make it cute πŸ’–

okay bestie, so this is the manual page for PX_time2string from the Library Functions Manual section 3. yes it's a real manpage and yes we're gonna read it together, grab a boba πŸ§‹


✨ NAME ✨

PX_time2string β€” literally converts a paradox time into a formatted string. that's the whole job. she's focused. πŸ’…


🌸 SYNOPSIS 🌸

#include <paradox.h>

char * PX_time2string(pxdoc_t *pxdoc, long time, const char *format)

look at her signature, so clean, so iconic πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so what she does is: she creates a string representation of a paradox time, exactly the way you asked for it in the format parameter. the way that she's just handing you a string version of a time, no cap.

now where do you even get that time from, bestie? two options, both valid:

internally she's using the PX_timestamp2string(3) function to do the heavy lifting. she's not out here reinventing anything, she's delegating. main character energy but collaborative. 🫢

about that format string: it can contain all the chars that are documented over in PX_timestamp2string(3). BUT β€” and this is important, so listen β€” only the ones that concern the time will actually produce reasonable results. the rest are just kinda there, vibing, doing nothing. πŸ™ˆ

fr fr, don't expect the date-y format chars to do anything useful here. time only. periodt.

πŸ’€ RETURN VALUE πŸ’€

  • on success β†’ she returns a pointer to the string πŸ’–
  • on failure β†’ you get NULL 😭

that's it. no in-between. she either ate or she didn't.


πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, they're the siblings, the whole family is slaying 🌈


πŸŽ€ AUTHOR πŸŽ€

this manual page was written by Uwe Steinmann uwe@steinmann.cx. give them their flowers πŸ’


sign-off time bestie ✨ this lil masterpiece lives in the Library Functions Manual, she's page PX_TIME2STRING(3), and yeah the footer is just her name again because she's that girl. mwah πŸ’‹ slay, go format some times πŸ’…πŸ¦‹πŸŒΈ