#!/bin/sh

# the code in this file will define the YEAR4D macro to the current
# year in 4 digits
# In January, a regexp will be generated that matches both the current
# year and the previous year. This should prevent aide reports to be
# generated on the New Year. It is assumed that the aide database will
# be regenerated at least once in January.

if [ "$(date +%m)" = "01" ]; then
	printf "@@define YEAR4D (%s|%s)\\n" "$(date +%Y)" "$(date +%Y --date='last year')"
else
	printf "@@define YEAR4D %s\\n" "$(date +%Y)"
fi

printf "@@define LASTYEAR4D %s\\n" "$(date +%Y --date='last year')"

