ANSI C: standard definition for the size of the __DATE__ and __TIME__ strings?

后端 未结 2 1381
情深已故
情深已故 2021-01-25 04:29

Is there a standard definition for the size of the __DATE__ and __TIME__ strings in ANSI C?

The motivation behind this question is:

  • I have two applicati

2条回答
  •  耶瑟儿~
    2021-01-25 04:53

    __DATE__

    The date of translation of the source file (a character string literal of the form "Mmm dd yyyy", where the names of the months are the same as those generated by the asctime function, and the first character of dd is a space character if the value is less than 10). If the date of translation is not available, an implementation-defined valid date shall be supplied.

    __TIME__

    The time of translation of the source file (a character string literal of the form "hh:mm:ss" as in the time generated by the asctime function). If the time of translation is not available, an implementation-defined valid time shall be supplied.

提交回复
热议问题