go-utils
[ class tree: go-utils ] [ index: go-utils ] [ all elements ]

Class: Date

Source Location: /classes/Date.class.inc.php

Class Overview


This class has functions that handle dates and takes the user's date preferences into account.


Author(s):

Version:

  • $Id: Date.class.inc.php 1248 2008-10-27 10:00:59Z mschering $

Copyright:

  • Copyright Intermesh

Methods



Class Details

[line 39]
This class has functions that handle dates and takes the user's date preferences into account.

Tags:

version:  $Id: Date.class.inc.php 1248 2008-10-27 10:00:59Z mschering $
copyright:  Copyright Intermesh
since:  Group-Office 3.0


[ Top ]


Class Methods


static method build_rrule [line 660]

static void build_rrule( $repeat_type, $interval, $repeat_end_time, $days, $month_time)

Tags:

access:  public

Parameters:

   $repeat_type  
   $interval  
   $repeat_end_time  
   $days  
   $month_time  

[ Top ]

static method date_add [line 535]

static int date_add( int $time, [int $days = 0], [int $months = 0], [int $years = 0])

Add a period to a unix timestamp

Tags:

access:  public

Parameters:

int   $time  
int   $days  
int   $months  
int   $years  

[ Top ]

static method format [line 584]

static void format( $time, [ $with_time = true], [ $timezone = 'GMT'])

Tags:

access:  public

Parameters:

   $time  
   $with_time  
   $timezone  

[ Top ]

static method getmicrotime [line 571]

static int getmicrotime( )

Get the current server time in microseconds

Tags:

access:  public
[ Top ]

static method get_dateformat [line 552]

static int get_dateformat( string $format, string $seperator)

Takes two Group-Office settings like Ymd and - and converts this into Y-m-d

Tags:

return:  unix timestamp
access:  public

Parameters:

string   $format   Any format accepted by php's date function
string   $seperator   A seperate like - / or .

[ Top ]

static method get_next_recurrence_time [line 77]

static int get_next_recurrence_time( int $first_occurence_time, int $start_time, string $rrule, [boolean $local_time = false])

Calculates the next occurence of a recurring event

Tags:

access:  public

Parameters:

int   $first_occurence_time   The time this events occurs for the first time.
int   $start_time   The next occurence returns will happen after this time.
string   $rrule   The iCalendar rrule
boolean   $local_time   Set to true if the days in the url are not in GMT but local time

[ Top ]

static method get_timestamp [line 576]

static void get_timestamp( $utime, [ $with_time = true], [ $timezone = 'GMT'])

Tags:

access:  public

Parameters:

   $utime  
   $with_time  
   $timezone  

[ Top ]

static method get_timezone_offset [line 618]

static void get_timezone_offset( $utime)

Tags:

access:  public

Parameters:

   $utime  

[ Top ]

static method to_db_date [line 512]

static int to_db_date( string $date_string, [bool $with_time = false])

Convert a Group-Office date to MySQL date format

A Group-Office date is formated by user preference.

Tags:

return:  unix timestamp
access:  public

Parameters:

string   $date_string   The Group-Office date string
bool   $with_time   The output sting should contain time too

[ Top ]

static method to_input_format [line 438]

static string to_input_format( string $date_string, [string $date_seperator = null], [string $date_format = null])

Reformat a date string formatted by Group-Office user preference to a string that can be read by strtotime related PHP functions

Tags:

access:  public

Parameters:

string   $date_string  
string   $date_seperator  
string   $date_format  

[ Top ]

static method to_unixtime [line 492]

static int to_unixtime( String $date_string)

Takes a date string formatted by Group-Office user preference and turns it into a unix timestamp.

Tags:

return:  Unix timestamp
access:  public

Parameters:

String   $date_string  

[ Top ]

method byday_to_days [line 52]

int byday_to_days( $byday, string $date_string)

Converts a Group-Office date to unix time.

A Group-Office date is formated by user preference.

Tags:

return:  unix timestamp
access:  public

Parameters:

string   $date_string   The date string formated in the user's preference
   $byday  

[ Top ]

method ical_freq_to_repeat_type [line 624]

void ical_freq_to_repeat_type( $freq)

Parameters:

   $freq  

[ Top ]

method shift_days_to_gmt [line 328]

void shift_days_to_gmt( $days, $local_start_hour, $timezone_offset)

Parameters:

   $days  
   $local_start_hour  
   $timezone_offset  

[ Top ]

method shift_days_to_local [line 377]

void shift_days_to_local( $days, $local_start_hour, $timezone_offset)

Tags:

access:  public

Parameters:

   $days  
   $local_start_hour  
   $timezone_offset  

[ Top ]


Documentation generated on Thu, 30 Oct 2008 14:13:26 +0100 by phpDocumentor 1.4.0