squirrelmail-webmail  1.4.22
About: SquirrelMail is a standards-based webmail package with strong MIME support, address books, and folder manipulation (written in PHP4).
  Fossies Dox: squirrelmail-webmail-1.4.22.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

date.php File Reference

Go to the source code of this file.

Namespaces

 squirrelmail
 

Functions

 getGMTSeconds ($stamp, $tzc)
 
 getDayName ( $day_number)
 
 getDayAbrv ( $day_number)
 
 getMonthName ( $month_number)
 
 getMonthAbrv ( $month_number)
 
 date_intl ( $date_format, $stamp)
 
 getLongDateString ( $stamp, $fallback='')
 
 getDateString ( $stamp)
 
 getTimeStamp ($dateParts)
 

Function Documentation

◆ date_intl()

date_intl (   $date_format,
  $stamp 
)

Returns the localized representation of the date/time.

Parameters
stringdate_format The format for the date, like the input for the PHP date() function.
intstamp the timestamp to convert
Returns
string a full date representation

Definition at line 286 of file date.php.

References $date_format, $ret, getDayAbrv(), getDayName(), getMonthAbrv(), and getMonthName().

Referenced by confirm_deletion(), confirm_update(), day_header(), display_events(), getDateString(), getLongDateString(), and startcalendar().

◆ getDateString()

getDateString (   $stamp)

Returns a short representation of the date, taking timezones and localization into account. Depending on user's settings, this string can be of the form: "14:23" or "Jun 14, 2003" depending on whether the stamp is "today" or not.

Parameters
intstamp the timestamp
Returns
string the date string

Definition at line 337 of file date.php.

References $date_format, $hour_format, $invert_time, $show_full_date, _(), date_intl(), and SMPREF_TIME_12HR.

Referenced by sqimap_get_small_header_list().

◆ getDayAbrv()

getDayAbrv (   $day_number)

Like getDayName, but returns the short form

Parameters
intday_number the day number
Returns
string the day in short human readable form

Definition at line 147 of file date.php.

References $ret, and _().

Referenced by date_intl().

◆ getDayName()

getDayName (   $day_number)

Returns the (localized) string for a given day number. Switch system has been intentionaly chosen for the internationalization of month and day names. The reason is to make sure that _("") strings will go into the main po.

Parameters
intday_number the day number
Returns
string the day in human readable form

Definition at line 112 of file date.php.

References $ret, and _().

Referenced by date_intl().

◆ getGMTSeconds()

getGMTSeconds (   $stamp,
  $tzc 
)

Load up some useful constants Corrects a time stamp to be the local time.

Parameters
intstamp the timestamp to adjust
stringtzc the timezone correction
Returns
int the corrected timestamp

now find what the server is at

Definition at line 28 of file date.php.

Referenced by getTimeStamp().

◆ getLongDateString()

getLongDateString (   $stamp,
  $fallback = '' 
)

This returns a date of the format "Wed, Oct 29, 2003 9:52 am", or the same in 24H format (depending on the user's settings), and taking localization into accout.

Parameters
intstamp the timestamp
stringfallback string to use when stamp not valid
Returns
string the long date string

Definition at line 309 of file date.php.

References $date_format, $hour_format, _(), date_intl(), and SMPREF_TIME_12HR.

Referenced by formatEnvheader(), getforwardHeader(), getReplyCitation(), and SendMDN().

◆ getMonthAbrv()

getMonthAbrv (   $month_number)

Returns the (localized) string for a given month number, short representation.

Parameters
stringmonth_number the month number (01..12)
Returns
string the shortened month in human readable form

Definition at line 235 of file date.php.

References $ret, and _().

Referenced by date_intl(), and select_option_month().

◆ getMonthName()

getMonthName (   $month_number)

Returns the (localized) string for a given month number.

Parameters
stringmonth_number the month number (01..12)
Returns
string the month name in human readable form

Definition at line 184 of file date.php.

References $ret, and _().

Referenced by date_intl().

◆ getTimeStamp()

getTimeStamp (   $dateParts)

Decodes a RFC 822 Date-header into a timestamp

Parameters
arraydateParts the Date-header split by whitespace
Returns
int the timestamp calculated from the header

$dateParts[0] == <day of="" week>=""> Mon, Tue, Wed $dateParts[1] == <day of="" month>=""> 23 $dateParts[2] == <month> Jan, Feb, Mar $dateParts[3] == <year> 1999 $dateParts[4] == <time> 18:54:23 (HH:MM:SS) $dateParts[5] == <from gmt>=""> +0100 $dateParts[6] == <zone> (EDT)

NOTE: In RFC 822, it states that <day of="" week>=""> is optional. In that case, dateParts[0] would be the <day of="" month>=""> and everything would be bumped up one.

Definition at line 395 of file date.php.

References getGMTSeconds().

Referenced by Message\parseEnvelope(), Rfc822Header\parseField(), and sqimap_get_small_header_list().