asctime
来自cppreference.com
|
|
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
| Defined in header <time.h>
|
||
将定日历转换时间tm的文字表述.
Original:
Converts given calendar time tm to a textual representation.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
得到的字符串具有以下格式:
Original:
The resulting string has the following format:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Www Mmm dd hh:mm:ss yyyy
Www- 星期几(之一Mon,Tue,Wed,Thu,Fri,Sat,Sun).Original:Www- the day of the week (one ofMon,Tue,Wed,Thu,Fri,Sat,Sun).The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.Mmm- 月(之一Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec).Original:Mmm- the month (one ofJan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec).The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.dd- 月的一天Original:dd- the day of the monthThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.hh- 小时Original:hh- hoursThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.mm- 分钟Original:mm- minutesThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.ss- 秒Original:ss- secondsThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.yyyy- 年Original:yyyy- yearsThe text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
功能不支持本地化.
Original:
The function does not support localization.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
目录 |
[编辑] 参数
| time_ptr | - | 指定的时间打印到tm对象的指针
Original: pointer to a tm object specifying the time to print The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
[编辑] 返回值
指针指向一个静态的空字符结尾的字符串的文字表示的日期和时间。
asctime和ctime之间的字符串可以共享,并在每次调用时可能会被覆盖的任何职能.Original:
pointer to a static null-terminated character string holding the textual representation of date and time. The string may be shared between
asctime and ctime, and may be overwritten on each invocation of any of those functions.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 注释
这个函数返回一个指向静态数据的指针,是不是线程安全的。 POSIX标志着这个功能已经过时,并建议strftime,而不是.
Original:
This function returns a pointer to static data and is not thread-safe. POSIX marks this function obsolete and recommends strftime instead.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
如果输出的字符串将是超过25个字符的行为是不确定的,如果
timeptr->tm_wday或timeptr->tm_mon没有在预期的范围内,或timeptr->tm_year超过INT_MAX-1990.Original:
The behavior is undefined if the output string would be longer than 25 characters, if
timeptr->tm_wday or timeptr->tm_mon are not within the expected ranges, or if timeptr->tm_year exceeds INT_MAX-1990.The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
一些实现处理timeptr->tm_mday==0这意味着前一个月的最后一天.
Original:
Some implementations handle timeptr->tm_mday==0 as meaning the last day of the preceding month.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[编辑] 为例
| 本节是不完整的 原因: no example |
[编辑] 另请参阅
| 一个 tm对象转换为文本表示Original: converts a tm object to a textual representationThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
tm对象转换成自定义的文字表述Original: converts a tm object to custom textual representationThe text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (函数) | |
| C++ documentation for asctime
| |