COHERENT manpages

This page displays the COHERENT manpage for __DATE__ [Date of translation].

List of available manpages
Index


__DATE__ -- Manifest Constant

Date of translation

__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

    "Mmm dd yyyy"

where Mmm is the same three-letter abbreviation for the month as is used by
asctime; dd  is the day  of the month,  with the first  d being a  space if
translation occurs  on the first  through the ninth  day of the  month; and
yyyy is the current year.

The value  of __DATE__ remains constant throughout the  processing of the a
module of  source code.  It may  not be the subject of  a #define or #undef
preprocessing directive.

Example

The following prints the preprocessor constants set by the ANSI standard.

#include <stddef.h>
#include <stdio.h>

main(void)
{

    printf("Date: %s\n", __DATE__);
    printf("Time: %s\n", __TIME__);
    printf("File: %s\n", __FILE__);
    printf("Line No.: %d\n", __LINE__);

    printf("ANSI C? ");
#ifndef __STDC__
    printf("no0);
#else
    printf("ANSI C? %s(%d)0, __STDC__ ? "Yes" : "No", __STDC__);
#endif /* _defined(__STDC__) */

    exit(EXIT_SUCCESS);

}

See Also

__FILE__,
__LINE__,
__STDC__,
__TIME__,
manifest constant
ANSI Standard, §6.8.8