summaryrefslogtreecommitdiffstats
path: root/tdejava/koala/org/trinitydesktop/koala/KRFCDate.java
blob: 604e500e823e2acb231fc230d1f817ced0d1429d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
//Auto-generated by kalyptus. DO NOT EDIT.
package org.trinitydesktop.koala;

import org.trinitydesktop.qt.Qt;
import org.trinitydesktop.qt.QtSupport;

/**

 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){}

	public KRFCDate() {
		newKRFCDate();
	}
	private native void newKRFCDate();
	/**
		 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.
			@param date the date to parse
				@return the date, or 0 if not possible

		@short    This function tries to parse a string containing a date/time in any  of the formats specified by RFC822, RFC850, RFC1036, RFC1123 and RFC2822.
	*/
	public static native int 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.
			@param date the date to parse
				@return the date, or 0 if not possible

		@short    This function tries to parse a string containing a date/time in   any of the formats specified by http://www.
	*/
	public static native int parseDateISO8601(String date);
	/**
		 Returns the local timezone offset to UTC in minutes
				@return the local timezone offset in minutes

		@short    Returns the local timezone offset to UTC in minutes
	*/
	public static native int localUTCOffset();
	/**
		 Returns a string representation of the given date and time formated
		 in conformance to RFC2822.
			@param utcTime a date and time in UTC
			@param utcOffset the offset to UTC in minutes
				@return the string representation of the date

		@short    Returns a string representation of the given date and time formated  in conformance to RFC2822.
	*/
	public static native String rfc2822DateString(int 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()).
			@param utcTime a date and time in UTC
				@return the string representation of the date

		@short    Returns a string representation of the given date and time formated  in conformance to RFC2822.
	*/
	public static native String rfc2822DateString(int utcTime);
	/** Deletes the wrapped C++ instance */
	protected native void finalize() throws InternalError;
	/** Delete the wrapped C++ instance ahead of finalize() */
	public native void dispose();
	/** Has the wrapped C++ instance been deleted? */
	public native boolean isDisposed();
}