ALLEGRO_DATE(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

✨ ALLEGRO_DATE ✨

okay bestie, welcome to the Allegro manual πŸ’– this one's a tiny little macro and honestly? it's giving "small but mighty" energy πŸ‘‘


🌸 NAME 🌸

ALLEGRO_DATE</p> β€” it's defined to a number that holds the release date of Allegro πŸ—“οΈβœ¨


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro.h>

#define ALLEGRO_DATE

πŸ¦‹ DESCRIPTION πŸ¦‹

so like, ALLEGRO_DATE gets defined to an integer that contains the release date of Allegro, packed all cute into the format yyyymmdd 🫢 it's literally the date, just squished into one number. iconic behaviour tbh πŸ’…

here's the vibe, fr fr:

const int year = ALLEGRO_DATE / 10000;
const int month = (ALLEGRO_DATE / 100) % 100;
const int day = ALLEGRO_DATE % 100;

allegro_message("Year %d, month %d, day %d\n",
   year, month, day);

see how that works?? you divide to peel the year off the front, modulo to grab the month out the middle, and the leftover is your day 🌈 lowkey satisfying ngl 😭


and that's the whole page bestie, no cap 🧚 this was ALLEGRO_DATE(3) from the Allegro manual, and it's brought to you by Allegro version 4.4.3 ⭐ slay, stay hydrated, and go read some more manpages πŸ’œπŸŽ€

πŸ“¦ where this page comes from