GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
DtSearchValidDateString(library call) DtSearchValidDateString(library call)

DtSearchValidDateString — Validate and convert a user date string

#include &<Dt/Search.h>
DtSrObjdate DtSearchValidDateString(
char *date_string);

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.

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.

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.

DtSrAPI(3), DtSearchQuery(3), dtsrfzkfiles(4), DtSearch(5)


Search for    or go to Top of page |  Section l |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.