Table of Contents

NAME

SYNOPSIS

DESCRIPTION

The function formats the information from into the buffer according to the string pointed to by The string consists of zero or more conversion specifications and ordinary characters. All ordinary characters are copied directly into the buffer. A conversion specification consists of a percent sign and one other character. No more than characters will be placed into the array. If the total number of resulting characters, including the terminating null character, is not more than returns the number of characters in the array, not counting the terminating null. Otherwise, zero is returned. Each conversion specification is replaced by the characters as follows which are then copied into the buffer. is replaced by the locale’s full weekday name. is replaced by the locale’s abbreviated weekday name. is replaced by the locale’s full month name. is replaced by the locale’s abbreviated month name. is replaced by the century (a year divided by 100 and truncated to an integer) as a decimal number (00-99). is replaced by the locale’s appropriate date and time representation. is replaced by the date in the format is replaced by the day of the month as a decimal number (01-31). is replaced by the day of month as a decimal number (1-31); single digits are preceded by a blank. is replaced by the hour (24-hour clock) as a decimal number (00-23). is replaced by the hour (12-hour clock) as a decimal number (01-12). is replaced by the day of the year as a decimal number (001-366). is replaced by the hour (24-hour clock) as a decimal number (0-23); single digits are preceded by a blank. is replaced by the hour (12-hour clock) as a decimal number (1-12); single digits are preceded by a blank. is replaced by the minute as a decimal number (00-59). is replaced by the month as a decimal number (01-12). is replaced by a newline. is replaced by the locale’s equivalent of either or is replaced by the time in the format is replaced by the locale’s representation of 12-hour clock time using AM/PM notation. is replaced by the time in the format is replaced by a tab. is replaced by the second as a decimal number (00-60). is replaced by the number of seconds since the Epoch, UCT (see is replaced by the week number of the year (Sunday as the first day of the week) as a decimal number (00-53). is replaced by the weekday (Monday as the first day of the week) as a decimal number (1-7). is replaced by the week number of the year (Monday as the first day of the week) as a decimal number (01-53). If the week containing January 1 has four or more days in the new year, then it is week 1; otherwise it is week 53 of the previous year, and the next week is week 1. is replaced by the week number of the year (Monday as the first day of the week) as a decimal number (00-53). is replaced by the weekday (Sunday as the first day of the week) as a decimal number (0-6). is replaced by the locale’s appropriate date representation. is replaced by the locale’s appropriate time representation. is replaced by the year with century as a decimal number. is replaced by the year without century as a decimal number (00-99). is replaced by the time zone name. is replaced by

SEE ALSO

STANDARDS

The function conforms to The and conversion specifications are extensions.

BUGS

There is no conversion specification for the phase of the moon.


Table of Contents