Пример #1
0
 public static KDateTime FromString(string arg1, string format, KTimeZones zones)
 {
     return (KDateTime) staticInterceptor.Invoke("fromString$$#", "fromString(const QString&, const QString&, const KTimeZones*)", typeof(KDateTime), typeof(string), arg1, typeof(string), format, typeof(KTimeZones), zones);
 }
Пример #2
0
 /// <remarks>
 ///  Constructs a time zone selection widget.
 /// <param> name="parent" The parent widget.
 /// </param><param> name="timeZones" The time zone database to use. If 0, the system time zone
 ///                   database is used.
 ///      </param></remarks>        <short>    Constructs a time zone selection widget.</short>
 public KTimeZoneWidget(QWidget parent, KTimeZones timeZones)
     : this((Type) null)
 {
     CreateProxy();
     interceptor.Invoke("KTimeZoneWidget##", "KTimeZoneWidget(QWidget*, KTimeZones*)", typeof(void), typeof(QWidget), parent, typeof(KTimeZones), timeZones);
 }
Пример #3
0
 /// <remarks>
 ///  Returns the KDateTime represented by <code>string</code>, using the <code>format</code>
 ///  given, optionally using a time zone collection <code>zones</code> as the source of
 ///  time zone definitions. The <code>format</code> codes are basically the same as
 ///  those for toString(), and are similar but not identical to those used by
 ///  strftime(3).
 ///  The <code>format</code> string consists of the same codes as that for
 ///  toString(). However, some codes which are distinct in toString() have
 ///  the same function as each other here.
 ///  Numeric values without a stated number of digits permit, but do not
 ///  require, leading zeroes. The maximum number of digits consumed by a
 ///  numeric code is the minimum needed to cover the possible range of the
 ///  number (e.g. for minutes, the range is 0 - 59, so the maximum number of
 ///  digits consumed is 2). All non-numeric values are case insensitive.
 ///  <b></b>ate
 ///  - %y   year excluding century (0 - 99). Years 0 - 50 return 2000 - 2050,
 ///         while years 51 - 99 return 1951 - 1999.
 ///  - %Y   full year number (4 digits with optional sign)
 ///  - %:Y  full year number (>= 4 digits with optional sign)
 ///  - %:m  month number (1 - 12)
 ///  - %m   month number, 2 digits (01 - 12)
 ///  - %b
 ///  - %B   month name in the current locale or, if no match, in English,
 ///         abbreviated or in full
 ///  - %:b
 ///  - %:B  month name in English, abbreviated or in full
 ///  - %e   day of the month (1 - 31)
 ///  - %d   day of the month, 2 digits (01 - 31)
 ///  - %a
 ///  - %A   weekday name in the current locale or, if no match, in English,
 ///         abbreviated or in full
 ///  - %:a
 ///  - %:A  weekday name in English, abbreviated or in full
 ///  <b></b>ime
 ///  - %H   hour in the 24 hour clock, 2 digits (00 - 23)
 ///  - %k   hour in the 24 hour clock (0 - 23)
 ///  - %I   hour in the 12 hour clock, 2 digits (01 - 12)
 ///  - %l   hour in the 12 hour clock (1 - 12)
 ///  - %M   minute, 2 digits (00 - 59)
 ///  - %:M  minute (0 - 59)
 ///  - %S   seconds, 2 digits (00 - 59)
 ///  - %s   seconds (0 - 59)
 ///  - %:S  optional seconds value (0 - 59) preceded with ':'. If no colon is
 ///         found in <code>string</code>, no input is consumed and the seconds value is
 ///         set to zero.
 ///  - %:s  fractional seconds value, preceded with a decimal point (either '.'
 ///         or the locale's decimal point symbol)
 ///  - %P
 ///  - %p   "am" or "pm", in the current locale or, if no match, in
 ///         English. This format is only useful when used with %I or %l.
 ///  - %:P
 ///  - %:p  "am" or "pm" in English. This format is only useful when used with
 ///         %I or %l.
 ///  <b></b>ime zone
 ///  - %:u
 ///  - %z   UTC offset of the time zone in hours and optionally minutes,
 ///         e.g. -02, -0200.
 ///  - %:z  UTC offset of the time zone in hours and minutes, colon separated,
 ///         e.g. +02:00.
 ///  - %Z   time zone abbreviation, consisting of alphanumeric characters,
 ///         e.g. UTC, EDT, GMT.
 ///  - %:Z  time zone name, e.g. Europe/London. The name may contain any
 ///         characters and is delimited by the following character in the
 ///         <code>format</code> string. It will not work if you follow %:Z with another
 ///         escape sequence (except %% or %t).
 ///  <b></b>ther
 ///  - %t   matches one or more whitespace characters
 ///  - %%   literal '%' character
 ///  Any other character must have a matching character in <code>string</code>, except
 ///  that a space will match zero or more whitespace characters in the input
 ///  string.
 ///  If any time zone information is present in the string, the function
 ///  attempts to find a matching time zone in the <code>zones</code> collection. A time
 ///  zone name (format code %:Z) will provide an unambiguous look up in
 ///  <code>zones.</code> Any other type of time zone information (an abbreviated time
 ///  zone code (%Z) or UTC offset (%z, %:z, %:u) is searched for in <code>zones</code>
 ///  and if only one time zone is found to match, the result is set to that
 ///  zone. Otherwise:
 ///  - If more than one match of a UTC offset is found, the action taken is
 ///    determined by <code>offsetIfAmbiguous</code>: if <code>offsetIfAmbiguous</code> is true,
 ///    a local time with an offset from UTC (type <code>OffsetFromUTC</code>) will be
 ///    returned; if false an invalid KDateTime is returned.
 ///  - If more than one match of a time zone abbreviation is found, the UTC
 ///    offset for each matching time zone is compared and, if the offsets are
 ///    the same, a local time with an offset from UTC (type <code>OffsetFromUTC</code>)
 ///    will be returned provided that <code>offsetIfAmbiguous</code> is true. Otherwise
 ///    an invalid KDateTime is returned.
 ///  - If a time zone abbreviation does not match any time zone in <code>zones</code>,
 ///    or the abbreviation does not apply at the parsed date/time, an
 ///    invalid KDateTime is returned.
 ///  - If a time zone name does not match any time zone in <code>zones</code>, an
 ///    invalid KDateTime is returned.
 ///  - If the time zone UTC offset does not match any time zone in <code>zones</code>,
 ///    a local time with an offset from UTC (type <code>OffsetFromUTC</code>) is
 ///    returned.
 ///  If <code>format</code> contains more than one time zone or UTC offset code, an
 ///  error is returned.
 ///  If no time zone information is present in the string, by default a local
 ///  clock time (type <code>ClockTime</code>) is returned. You can use
 ///  setFromStringDefault() to change this default.
 ///  If no time is found in <code>string</code>, a date-only value is returned.
 ///  If any inconsistencies are found, i.e. the same item of information
 ///  appears more than once but with different values, the weekday name does
 ///  not tally with the date, an invalid KDateTime is returned.
 ///  If an invalid KDateTime is returned, you can check why <code>format</code> was
 ///  considered invalid by use of outOfRange(). If that method returns true,
 ///  it indicates that <code>format</code> was in fact valid, but the date lies outside
 ///  the range which can be represented by QDate.
 /// <param> name="string" string to convert
 /// </param><param> name="format" format string
 /// </param><param> name="zones" time zone collection, or null for none
 /// </param><param> name="offsetIfAmbiguous" specifies what to do if more than one zone
 ///                           matches the UTC offset found in the
 ///                           string. Ignored if <code>zones</code> is null.
 /// </param></remarks>        <return> KDateTime value, or an invalid KDateTime if an error occurs, if
 ///          time zone information doesn't match any in <code>zones</code>, or if the
 ///          time zone information is ambiguous and <code>offsetIfAmbiguous</code> is
 ///          false
 /// </return>
 ///         <short>    Returns the KDateTime represented by <code>string</code>, using the <code>format</code>  given, optionally using a time zone collection <code>zones</code> as the source of  time zone definitions.</short>
 ///         <see> setFromStringDefault</see>
 ///         <see> toString</see>
 ///         <see> outOfRange</see>
 public static KDateTime FromString(string arg1, string format, KTimeZones zones, bool offsetIfAmbiguous)
 {
     return (KDateTime) staticInterceptor.Invoke("fromString$$#$", "fromString(const QString&, const QString&, const KTimeZones*, bool)", typeof(KDateTime), typeof(string), arg1, typeof(string), format, typeof(KTimeZones), zones, typeof(bool), offsetIfAmbiguous);
 }