*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->HP-UX 11i man pages -> DtSearchValidDateString (3)              
Title
Content
Arch
Section
 

Contents


 DtSearchValidDateString(library call) DtSearchValidDateString(library call)




 NAME    [Toc]    [Back]
      DtSearchValidDateString - Validate and convert a user date string

 SYNOPSIS    [Toc]    [Back]
      #include <Dt/Search.h>
      DtSrObjdate DtSearchValidDateString(
      char *date_string);

 DESCRIPTION    [Toc]    [Back]
      DtSearchValidDateString validates a DtSearch date string, as might
      have been entered by a user in a free form text field, and converts it
      into a valid DtSrObjdate.

      Since an invalid date string format returns a distinctive DtSrObjdate,
      this function may also be used as a boolean test for string validity.

 ARGUMENTS    [Toc]    [Back]
      date_string
                Specifies the date string to be validated and converted.

                The format for a valid date string is "[yyyy [mm [dd]]",
                one, two, or three ASCII numeric tokens separated by one or
                more nonnumeric chars (whitespace, slashes, etc). The
                integer yyyy represents a Gregorian calendar year number in
                the range 1990 to 5995 inclusive. If yyyy is less than 1900,
                1900 is added to it. The integer mm is a Gregorian calendar
                month number in the range 1 to 12 inclusive. The integer dd
                is a Gregorian calendar day number in the range 1 to 31
                inclusive.

                If only two tokens are in the string, they are presumed to
                be yyyy and mm, and dd is presumed to be to 1.

                If only one token is in the string, it is presumed to be
                yyyy, and both mm and dd are presumed to be 1.

 RETURN VALUE    [Toc]    [Back]
      DtSearchValidDateString returns zero (a valid DtSrObjdate) if
      date_string is NULL or empty.

      It returns a correctly formatted DtSrObjdate on successful parse and
      conversion.

      It returns -1 and a message on the MessageList if date_string is
      invalid.

 SEE ALSO    [Toc]    [Back]
      DtSrAPI(3), DtSearchQuery(3), dtsrfzkfiles(4), DtSearch(5)


                                    - 1 -       Formatted:  January 24, 2005
[ Back ]
      
      
 Similar pages
Name OS Title
getdate IRIX convert user format date and time
cftime FreeBSD convert date and time to string
strftime Tru64 Convert a date and time to a string
ctime IRIX convert date and time to string
wcsftime Tru64 Convert a date and time to a string
strftime IRIX convert date and time to string
ascftime FreeBSD convert date and time to string
wcsftime FreeBSD convert date and time to a wide-character string
getdate Tru64 Convert formatted string into time/date structure
getdate_r Tru64 Convert formatted string into time/date structure
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service