PX_DATE2STRING(3)

NAME πŸ¦‹

PX_date2string β€” okay so bestie, this one takes a Paradox date and turns it into a cute little formatted string. Convert paradox date into formatted string, periodt. πŸ’…


✨ SYNOPSIS ✨

#include <paradox.h>

char * PX_date2string(pxdoc_t *pxdoc, long date, const char *format)

πŸ’– DESCRIPTION πŸ’–

So what it does is: it creates a string representation of a paradox date, exactly how you asked for it in the format parameter. Main character energy, honestly.

Now, where does that date even come from? Two options, bestie, pick your fighter:

  • You grabbed it with PX_get_data_long(3) β€” but only after you called PX_get_record(3) first, mkay? Order matters. πŸ™ˆ
  • Or you just straight-up used the long value sitting in the pxval_t struct that PX_retrieve_record(3) handed you. Easy. Iconic. No extra steps. πŸ‘‘

Under the hood it's secretly using the PX_timestamp2string(3) function β€” not me exposing the internal collab 🀝 β€” so your format string can contain all the chars documented over there in PX_timestamp2string(3). But lowkey? Only the ones that have anything to do with the date are gonna give you reasonable results. The rest is giving... nothing. πŸ’€


πŸŽ€ RETURN VALUE πŸŽ€

  • On success: a pointer to the string. Slay. ✨
  • On failure: NULL. Sad girl hours. 😭

🌸 SEE ALSO 🌸

Go read those too, they're the sequel, iykyk. πŸ“š


πŸ‘‘ AUTHOR πŸ‘‘

This manual page was written by Uwe Steinmann uwe@steinmann.cx. Thank you for your service, king. 🫢


Anyways, that's the whole page β€” it lives in the Library Functions Manual and it's filed under PX_DATE2STRING(3), so if you ever need to find it again, that's your girl. Byeee, go format some dates bestie πŸ¦‹βœ¨πŸ’œ