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:
- grab it with
PX_get_data_long(3)after you've calledPX_get_record(3), or - just use the
longvalue sitting right there in thepxval_tstruct thatPX_retrieve_record(3)hands back to you. lowkey the easier path ngl.
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 π
π¦πΈ
π¦ where this page comes from
- debian bookworm: pxlib-dev 0.6.8-1+b1
- debian trixie: pxlib-dev 0.6.9-1+b1
- ubuntu jammy: pxlib-dev 0.6.8-1
- ubuntu noble: pxlib-dev 0.6.8-1
- ubuntu questing: pxlib-dev 0.6.9-1
- ubuntu resolute: pxlib-dev 0.6.9-1build1
- ubuntu stonking: pxlib-dev 0.6.10-1 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms