.TH "__DATE__" "" "" "Manifest Constant"
.II "translation, date"
.II "date of translation"
.PC "Date of translation"
.PP
.B "__DATE__"
is a preprocessor constant
that is defined by the C preprocessor.
It represents the date that the source file was translated.
It is a string literal of the form
.DM
	"Mmm dd yyyy"
.DE
.PP
where
.B Mmm
is the same three-letter abbreviation for the month as is used by
.BR asctime ;
.B dd
is the day of the month, with the first \fBd\fR being a space if
translation occurs on the first through the ninth day of the month;
and
.B yyyy
is the current year.
.PP
The value of
.B "__DATE__"
remains constant throughout the processing of the a module of source code.
It may not be the subject of a
.B #define
or
.B #undef
preprocessing directive.
.SH Example
The following prints the preprocessor constants set by the ANSI standard.
.DM
#include <stddef.h>
#include <stdio.h>
.DE
.DM
main(void)
{
.DE
.DM
	printf("Date: %s\en", __DATE__);
	printf("Time: %s\en", __TIME__);
	printf("File: %s\en", __FILE__);
	printf("Line No.: %d\en", __LINE__);
.DE
.DM
	printf("ANSI C? ");
#ifndef __STDC__
	printf("no\n");
#else
	printf("ANSI C? %s(%d)\n", __STDC__ ? "Yes" : "No", __STDC__);
#endif /* _defined(__STDC__) */
.DE
.DM
	exit(EXIT_SUCCESS);
.DE
.DM
}
.DE
.SH "See Also"
.Xr "__FILE__," _5F5Ffile
.Xr "__LINE__," _5F5Fline
.Xr "__STDC__," _5F5Fstdc
.Xr "__TIME__," _5F5Ftime
.Xr "manifest constant" manifestc
.br
\*(AS, \(sc6.8.8
