| 
 |  | 
#include <time.h>char *nl_cxtime (clock, format) long *clock; char *format;
char *nl_ascxtime (tm, format) struct tm *tm; char *format;
nl_ascxtime- converts a tm structure to a 26-character string
The routines nl_cxtime and nl_ascxtime provide an alternative interface to the ctime(S) routines for programs written to the X/OPEN Portability Guide, Issue 2, standard. However, both nl_cxtime and nl_ascxtime have been withdrawn from XPG3.
They provide the same functions as the
ctime(S)
routines
ctime
and
asctime,
except that a
strftime(S)
format string is provided to determine the layout of the resulting string.
The following field descriptors are accepted:
| n | insert a newline character | 
| t | insert a tab character | 
| m | month of year - 01 to 12 | 
| d | day of month - 01 to 31 | 
| y | last 2 digits of year - 00 to 99 | 
| D | date as mm/dd/yy | 
| H | hour - 00 to 23 | 
| M | minute - 00 to 59 | 
| S | second - 00 to 61 | 
| T | time as HH:MM:SS | 
| j | day of year - 001 to 366 | 
| w | day of week - 0 to 6 (Sunday = 0) | 
| a | abbreviated weekday - Sun to Sat | 
| h | abbreviated month - Jan to Dec | 
| r | time in AM/PM notation | 
If format is the empty (zero length) string, the date and time format (D_T_FMT) of the currently selected LC_TIME locale is used.
The maximum length of the resultant string is defined by the constant NL_TEXTMAX in the limits.h file.
nl_cxtime and nl_ascxtime are obsolete and may not be supported on future releases. Use strftime(S) instead.