~ knotless Search/
↑↓ move↵ open⇧↵ all results

spaces.cameron.stream/hello

Hello.

0
1
main
18 lines · 563 B Raw History
/* What the town said, on every first of the month from its founding to 2200. */

#include <stdio.h>

#include "greeting.h"
#include "weather.h"

int main(void)
{
	static const char *const days[] = {"Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"};
	char text[64];
	for (int month = month_of(calendar("Founded")); month < month_of((struct day){2201, 1, 1}); month++) {
		struct day day = month_day(month);
		greeting_on(day, text, sizeof text);
		printf("%04d-%02d-%02d %s %-4s %s\n", day.y, day.m, day.d, days[weekday(day)], weather(day), text);
	}
	return 0;
}