CAL_$DECODE_ASCII_DATE Domain/OS CAL_$DECODE_ASCII_DATE
NAME
cal_$decode_ascii_date - decode an ASCII date
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/cal.h>
void cal_$decode_ascii_date(
char *date_string,
short &string_length,
short *year,
short *month,
short *day,
status_$t *status)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/cal.ins.pas';
procedure cal_$decode_ascii_date(
in date_string: univ cal_$string_t;
in string_length: integer;
out year: integer;
out month: integer;
out day: integer;
out status: status_$t);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/cal.ins.ftn'
integer*2 string_length, year, month, day
integer*4 status
character date_string*80
call cal_$decode_ascii_date(date_string, string_length, year,
& month, day, status)
DESCRIPTION
Cal_$decode_ascii_date decodes an ASCII date supplied in date_string into
three integers representing the year, month, and day. The ASCII date
must have the form "YEAR/MONTH/DAY", where YEAR, MONTH, and DAY are
decimal integers.
Cal_$decode_ascii_date adds 1900 to YEAR values between 80 and 99, and
adds 2000 to YEAR values between 0 and 79.
date_string
An ASCII string representing the date to be decoded.
Cal_$decode_ascii_date ignores leading and trailing spaces in
date_string.
string_length
The number of bytes in date_string.
year The year decoded from date_string.
month
The month decoded from date_string.
day The day decoded from date_string.
status
The completion status. If cal_$decode_ascii_date fails, it may
return one of the following values in status:
cal_$bad_syntax
The string is not in the proper format.
cal_$empty_string
The string length is 0 or the string contains only spaces.
cal_$out_of_range
The string contains an invalid month or day.