Functions

Day

Return the day of the month as a numeric value

Syntax

Signature
int Day( int date );

Arguments

date Date encoded as the integer YYYYMMDD, for example 20261201.

Return value

The day field, or 0 for a nonpositive date.

Description

Read the `DD` field of a `YYYYMMDD` date. The result is useful when displaying the day next to `CMonth()` and `Year()` or when grouping valid dates by day of the month. A nonpositive date gives `0`.

Example

day.c
#include "xdev-wtui.h"

#include <stdio.h>

int main( void )
{
   printf( "%d\n", Day( 19901010 ) );

   return 0;
}