phpDocumentor sf-active
base_classes
[ class tree: sf-active ] [ index: sf-active ] [ all elements ]

Class: Date

Source Location: /classes/date_class.inc

Class Date

Property Summary
int   $timestamp   a timestamp

[ Top ]
Method Summary
Date   clone_date()   returns a new Date object given an old one
void   find_start_of_week()   moves the date object to the beginning of the week (compared to its current date)
int   get_day()   returns the day portion of the date object
int   get_days_in_month()   returns the amount of days in the month.
int   get_day_of_week()   returns the day of the week. (before we returned the text name of the day of the week ("Mon", "Tue" etc..))
string   get_formatted_date()   returns a date formatted as "d/m/Y"
string   get_formatted_time()   returns the time as "h:i A"
int   get_hour()   returns the hour portion of the date object
int   get_minute()   returns the minute portion of the date object
int   get_month()   returns the month portion of the date object
string   get_sql_date()   returns a date in the format needed for inserts by MySQL
void   get_sql_time()   empty method.
int   get_unix_time()   retuns the Unix $timestamp of the given date
string   get_weekname()   returns the date of the beginning of the week
int   get_year()   returns the year portion of the dat object
void   move_forward_n_days()   moves the date object forward N days (can be negative to go backwards)
void   move_n_weeks_forward()   moves the date object forward N weeks (can be negative to go backwards)
void   move_to_start_of_day()   moves a date object to teh beginning of the day that it currently represents
void   move_to_start_of_month()  
void   move_to_start_of_next_month()  
int   set_date_to_now()   sets this date object to point to teh current date
void   set_time()   sets the Date object given the hour, minute, day, month, and year
void   set_time_from_sql_time()   empty method
void   set_time_from_string()   empty method.
void   set_time_from_unix_time()   sets the $datetime of the date object based off a unix time stamp
void   set_time_zone()   sets the time based on the system offset, then the local offset

[ Top ]
Properties
int   $timestamp = 0 [line 18]

a timestamp


[ Top ]
Methods
clone_date  [line 224]

  Date clone_date( )

returns a new Date object given an old one



[ Top ]
find_start_of_week  [line 145]

  void find_start_of_week( )

moves the date object to the beginning of the week (compared to its current date)



[ Top ]
get_day  [line 46]

  int get_day( )

returns the day portion of the date object



[ Top ]
get_days_in_month  [line 319]

  int get_days_in_month( )

returns the amount of days in the month.



[ Top ]
get_day_of_week  [line 110]

  int get_day_of_week( )

returns the day of the week. (before we returned the text name of the day of the week ("Mon", "Tue" etc..))



[ Top ]
get_formatted_date  [line 90]

  string get_formatted_date( )

returns a date formatted as "d/m/Y"



[ Top ]
get_formatted_time  [line 100]

  string get_formatted_time( )

returns the time as "h:i A"



[ Top ]
get_hour  [line 24]

  int get_hour( )

returns the hour portion of the date object



[ Top ]
get_minute  [line 35]

  int get_minute( )

returns the minute portion of the date object



[ Top ]
get_month  [line 57]

  int get_month( )

returns the month portion of the date object



[ Top ]
get_sql_date  [line 236]

  string get_sql_date( )

returns a date in the format needed for inserts by MySQL



[ Top ]
get_sql_time  [line 258]

  void get_sql_time( )

empty method.



[ Top ]
get_unix_time  [line 267]

  int get_unix_time( )

retuns the Unix $timestamp of the given date



[ Top ]
get_weekname  [line 119]

  string get_weekname( )

returns the date of the beginning of the week



[ Top ]
get_year  [line 68]

  int get_year( )

returns the year portion of the dat object



[ Top ]
move_forward_n_days  [line 197]

  void move_forward_n_days( int $n  )

moves the date object forward N days (can be negative to go backwards)

Parameters:
int   $n:  the amount of days the date should be moved.


[ Top ]
move_n_weeks_forward  [line 214]

  void move_n_weeks_forward( int $n  )

moves the date object forward N weeks (can be negative to go backwards)

Parameters:
int   $n:  amount of weeks the date should be moved forwards/backwards.


[ Top ]
move_to_start_of_day  [line 156]

  void move_to_start_of_day( )

moves a date object to teh beginning of the day that it currently represents



[ Top ]
move_to_start_of_month  [line 168]

  void move_to_start_of_month( )



[ Top ]
move_to_start_of_next_month  [line 178]

  void move_to_start_of_next_month( )



[ Top ]
set_date_to_now  [line 136]

  int set_date_to_now( )

sets this date object to point to teh current date



[ Top ]
set_time  [line 307]

  void set_time( int $newhour, int $newminute, int $newday, int $newmonth, int $newyear  )

sets the Date object given the hour, minute, day, month, and year

Parameters:
int   $newhour: 
int   $newminute: 
int   $newday: 
int   $newmonth: 
int   $newyear: 


[ Top ]
set_time_from_sql_time  [line 276]

  void set_time_from_sql_time( mixed $sqltime  )

empty method



[ Top ]
set_time_from_string  [line 294]

  void set_time_from_string( mixed $string_time  )

empty method.



[ Top ]
set_time_from_unix_time  [line 285]

  void set_time_from_unix_time( int $unixtime  )

sets the $datetime of the date object based off a unix time stamp

Parameters:
int   $unixtime:  a unix timestamp.


[ Top ]
set_time_zone  [line 78]

  void set_time_zone( )

sets the time based on the system offset, then the local offset



[ Top ]

Documentation generated on Tue, 24 Jun 2008 01:03:05 -0700 by phpDocumentor 1.3.0RC3