/***************************************************************************
                            KRFCDate.java -  description
                             -------------------
    begin                : Sun Jan 27 16:22:17 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd.
    email                : Richard_Dale@tipitina.demon.co.uk
    generated by         : duke@tipitina on Sun Jan 27 16:22:17 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
***************************************************************************/

package org.kde.koala;

import org.kde.qt.*;
import java.util.*;
import java.lang.Error;

/**

 The KRFCDate class contains functions related to the parsing of dates.

 @author Waldo Bastian <bastian@kde.org>
 
 @short 
 The KRFCDate class contains functions related to the parsing of dates.
*/
public class  KRFCDate implements QtSupport {
	private long _qt;
	private boolean _allocatedInJavaWorld = true;

	protected KRFCDate(Class dummy){}


/** 
 This function tries to parse a string containing a date/time in any
 of the formats specified by RFC822, RFC850, RFC1036, RFC1123 and RFC2822.

 If the date/time could not be parsed, 0 is returned.  If the
 parsed date is epoch, then epoch+1 is returned so that a valid
 date will not be confused with an improper date string.

 The date/time returned is converted to UTC.

    
*/
	public static native long parseDate( String date);

/** 
 This function tries to parse a string containing a date/time in 
 any of the formats specified by http://www.w3.org/TR/NOTE-datetime

 This is a subset of the formats specified in ISO8601.

 If the date/time could not be parsed, 0 is returned.  If the
 parsed date is epoch, then epoch+1 is returned so that a valid
 date will not be confused with an improper date string.

 The date/time returned is converted to UTC.

    
*/
	public static native long parseDateISO8601( String date);

/** 
 Returns the local timezone offset to UTC in seconds

   
*/
	public static native int localUTCOffset();

/** 
 Returns a string representation of the given date and time formated
 in conformance to RFC2822.

   
*/
	public static native String rfc2822DateString( long utcTime, int utcOffset);

/** 
 Returns a string representation of the given date and time formated
 in conformance to RFC2822.

 Provided for convenience, the function is equivalent to
 rfc2822DateString(t, localUTCOffset()).

   
*/
	public static native String rfc2822DateString( long utcTime);
}
