Syntax
const char *DToS( int date );
Arguments
date Date encoded as the integer YYYYMMDD, for example 20261201.
Return value
An eight-character string containing YYYYMMDD, or eight spaces for a nonpositive date.
Description
Produce a fixed-width, locale-independent `YYYYMMDD` string for a valid date. This is useful for a text key because chronological dates sort in the same order as their digit strings. An empty date gives eight spaces. The next `DToS()` call overwrites the shared buffer.
Example
#include "xdev-wtui.h"
#include <stdio.h>
int main( void )
{
puts( DToS( 19901010 ) );
return 0;
}