Interesting Advance C# exercise
HTTP has been In use by the WWW global Information Initiative since 1990 and nowadays It Is one of the most widely used protocols on the Internet
HTTP application have historically allowed three different formats for the representation of date/time stamps (described In RFC 2616)
1. RFC 1123 format, for example
Sun, 06 Nov 2005 08:49:37 GMT
2. RFC 1036 format, for example
Sunday, 06-Nov-05 08:49:37 GMT
3. ANSI C's asctime() format, for example
Sun Nov 6 08:49:37 2005
An Implementation Is not HTTP 1.1 compliant If It fails to understand one of the above date/time formats
Question 1
You are require to write an HTTP 1.1 compliant program to parse a string containing one of the above date/time formats. The program must detect the date/time format automatically based on the Input string and store the result In the following object
Class MyDate
{
public Int day; /*1 to 31*/
public Int month; /*1 to 12*/
public Int year; /*1970 to 9999*/
public Int hour; /*0 to 23*/
public Int minute; /*0 to 59*/
public Int second; /*0 to 59*/
public Int dayofweek; /* 0= Sun, 1=Mon,etc* /
}
Question 2
Develop a program to display the system date/time In the RFC 1123 format(as show In example)
=====================================================
I have no idea to do this exercise, please help me.
Thanks alot.
Good luck.