• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Static Public Member Functions | List of all members
KRFCDate Class Reference

#include <krfcdate.h>

Static Public Member Functions

static time_t parseDate (const TQString &date)
 
static time_t parseDateISO8601 (const TQString &date)
 
static int localUTCOffset ()
 
static TQCString rfc2822DateString (time_t utcTime, int utcOffset)
 
static TQCString rfc2822DateString (time_t utcTime)
 

Detailed Description

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

Author
Waldo Bastian basti.nosp@m.an@k.nosp@m.de.or.nosp@m.g

Definition at line 32 of file krfcdate.h.

Member Function Documentation

◆ localUTCOffset()

int KRFCDate::localUTCOffset ( )
static

Returns the local timezone offset to UTC in minutes.

Returns
the local timezone offset in minutes

Definition at line 462 of file krfcdate.cpp.

◆ parseDate()

time_t KRFCDate::parseDate ( const TQString &  date)
static

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.

Parameters
datethe date to parse
Returns
the date, or 0 if not possible

Definition at line 98 of file krfcdate.cpp.

◆ parseDateISO8601()

time_t KRFCDate::parseDateISO8601 ( const TQString &  date)
static

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.

Parameters
datethe date to parse
Returns
the date, or 0 if not possible

Definition at line 343 of file krfcdate.cpp.

◆ rfc2822DateString() [1/2]

TQCString KRFCDate::rfc2822DateString ( time_t  utcTime)
static

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()).

Parameters
utcTimea date and time in UTC
Returns
the string representation of the date

Definition at line 506 of file krfcdate.cpp.

◆ rfc2822DateString() [2/2]

TQCString KRFCDate::rfc2822DateString ( time_t  utcTime,
int  utcOffset 
)
static

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

Parameters
utcTimea date and time in UTC
utcOffsetthe offset to UTC in minutes
Returns
the string representation of the date

Definition at line 488 of file krfcdate.cpp.


The documentation for this class was generated from the following files:
  • krfcdate.h
  • krfcdate.cpp

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.9.4
This website is maintained by Timothy Pearson.