


     strptime(XPG4.os/tRelease 4.4.1 (The Open Gstrptime(XPG4.os/time)



     NAME
	  XPG4.os/time/strptime	- conversion of	date and time string
	  to tm	structure testset

     DESCRIPTION
	  Strptime tests the strptime()	subroutine interface for
	  conformance to the XSI System	Interfaces Page:strptime()

     TESTS
     Compliance
	  1    If strptime() is	supported:
		   When	format contains	a whitespace character,	then
		   strptime() matches this by reading characters from
		   string upto,	but not	including, the first non-
		   whitespace character.
	       Otherwise:
		   A call to strptime()	returns	NULL and sets errno to
		   ENOSYS.

	  2    If strptime() is	supported:
		   When	format contains	an ordinary character (other
		   than	a conversion specification character preceded
		   by a	%), then strptime() reads the next character
		   from	string and the directive succeeds in the case
		   that	the two	characters match.
	       Otherwise:
		   A call to strptime()	returns	NULL and sets errno to
		   ENOSYS.

	  3    If strptime() is	supported:
		   When	format is a string made	up of a	series of the
		   following field descriptors :
		   a. d	day of month  -	01 to 31 (with or without
		   leading zeros)
		   b. D	date in	%m/%d/%y format
		   c. H	hour   - 00 to 23 (with	or without leading
		   zeros)
		   d. I	hour   - 01 to 12 (with	or without leading
		   zeros)
		   e. j	day of year - 001 to 366
		   f. M	minute - 00 to 59 (with	or without leading
		   zeros)
		   g. m	month of year -	01 to 12 (with or without
		   leading zeros)
		   h. n	any whitespace character sequence
		   i. r	time in	%I:%M:%S %p format
		   j. S	second - 00 to 61 (with	or without leading
		   zeros)
		   k. t	any whitespace character sequence
		   l. T	time in	%H:%M:%S notation
		   m. U	week number of year - 00 to 53 (Sunday as
		   first day of	week) (with or without leading zeros)



     Page 1					    (printed 2/21/103)






     strptime(XPG4.os/tRelease 4.4.1 (The Open Gstrptime(XPG4.os/time)



		   n. w	day of week - 0	to 6 (Sunday = 0) (with	or
		   without leading zeros)
		   o. W	week number of year - 00 to 53 (Monday as
		   first day of	week) (with or without leading zeros)
		   p. y	last two digits	of year	- 00 to	99 (with or
		   without leading zeros)
		   q. Y	four digit year	including century
		   then	a call to strptime() reads characters from
		   string and, in the case that	these characters match
		   the format of the directive,	translates these
		   characters into the appropriate member of the tm
		   structure.  Occurrences of "%%" in the format
		   string are matched against a	single "%" and do not
		   affect the tm structure.
	       Otherwise:
		   A call to strptime()	returns	NULL and sets errno to
		   ENOSYS.

	  4    If strptime() is	supported:
		   When	format is a string containing the following
		   field descriptors :
		   a. R	time in	%H:%M format
		   then	a call to strptime() reads characters from
		   string and, in the case that	these characters match
		   the format of the directive,	translates these
		   characters into the appropriate member of the tm
		   structure.
	       Otherwise:
		   A call to strptime()	returns	NULL and sets errno to
		   ENOSYS.

	  5    If strptime() is	supported:
		   When	format is a string containing the following
		   field descriptors :
		   a. a	or A abbreviated or full weekday name -	eg.
		   Sun to Sat or Sunday	to Saturday
		   b. b, B or h	abbreviated or full month name	- eg.
		   Jan to Dec or January to December
		   c. c	appropriate date and time as specified in the
		   D_T_FMT string
		   d. p	AM/PM string as	specified in the AM_STR/PM_STR
		   e. x	appropriate date as specified in the D_FMT
		   string
		   f. X	appropriate time as specified in the T_FMT
		   string
		   then	a call to strptime() reads characters from
		   string and, in the case that	these characters match
		   the format of the directive,	translates these
		   characters into the appropriate member of the tm
		   structure.
	       Otherwise:
		   A call to strptime()	returns	NULL and sets errno to



     Page 2					    (printed 2/21/103)






     strptime(XPG4.os/tRelease 4.4.1 (The Open Gstrptime(XPG4.os/time)



		   ENOSYS.

	  6    If strptime() is	supported:
		   When	langinfo data is not supported for the current
		   locale and format is	a not a	null string, then
		   strptime() uses the locale information from the 'C'
		   locale to replace the missing information.
	       Otherwise:
		   A call to strptime()	returns	NULL and sets errno to
		   ENOSYS.

	  7    If strptime() is	supported:
		   A successful	call to	strptime() returns a pointer
		   to the character in string which follows the	last
		   character read in interpreting format .
	       Otherwise:
		   A call to strptime()	returns	NULL and sets errno to
		   ENOSYS.

     Deviance
	  8    If strptime() is	supported:
		   An unsuccessful call	to strptime() returns a	null
		   pointer.
	       Otherwise:
		   A call to strptime()	returns	NULL and sets errno to
		   ENOSYS.

     OUTPUTS
     Tests:
	  1-6  Pass/Fail indication - failure information includes
	       detected	and expected date and time information.

	  7-8  Pass/Fail indication - failure information includes
	       detected	and expected return values.

     RELEASE
	  4.4.1	(06/09/97)
	  Copyright 1997, The Open Group
	  All Rights Reserved
















     Page 3					    (printed 2/21/103)



