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. |
| Заголовочный файл <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.
[править] Notes
Эта функция возвращает указатель на статические данные и не является поточно-ориентированными. 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.
[править] Пример
| Этот раздел не завершён Причина: нет примера |
[править] См. также
| преобразует 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++ документация для asctime
| |