1. Trang chủ
  2. » Công Nghệ Thông Tin

PHP Developer''''s Dictionary- P102 docx

5 159 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 409,28 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Properties of the Returned Date/Time Objects alarm The number of minutes before an event to send out an alarm hour The numeric hour mday The numeric day of the month min The numeric

Trang 1

end This is an object containing a date/time entry

id This integer is the ID of that event

public This is a 1 if the event is public; 0 if the event is private

recur_data This is the recurrence data

recur_enddate This is the recurrence end date, in date/time format

recur_interval This is the recurrence interval

recur_type This is the recurrence type

start This is an object containing a date/time entry

title This is the title string of the event

The date/time entries are also objects These objects contain the properties shown in Table 11.6

Table 11.6 Properties of the Returned Date/Time Objects

alarm The number of minutes before an event to send out an alarm

hour The numeric hour

mday The numeric day of the month

min The numeric minute

month The numeric month

sec The numeric second

year The numeric year

mcal_is_leap_year()

Syntax

int mcal_is_leap_year(int year)

Description

The mcal_is_leap_year() function returns 1 if the year is a leap year

mcal_list_alarms()

Syntax

array mcal_list_alarms (int mcal_stream [, int begin_year

[, int begin_month [, int begin_day [,int end_year [, int end_month [, int end_day]]]]]])

Description

Trang 2

The mcal_list_alarms() function returns an array of IDs that have alarms that fall within the passed begin and end dates If no dates are passed, the function uses the

start and end dates in the global event structure

mcal_list_events()

Syntax

array mcal_list_events (int mcal_stream, object begin_date [, object end_date])

Description

The mcal_list_events() function returns an array of IDs that fall within the passed

begin and end dates If no dates are passed, the function uses the start and end

dates in the global event structure As for the date entries, they are objects These

objects contain the properties shown in Table 11.7

Table 11.7 Properties of the Returned Date/Time Objects

alarm The number of minutes before an event to send out an alarm

hour The numeric hour

mday The numeric day of month

min The numeric minute

month The numeric month

sec The numeric second

year The numeric year

mcal_next_recurrence()

Syntax

object mcal_next_recurrence(int mcal_stream, int week_start, array id)

Description

The mcal_next_recurrence() function returns a date and time object that contains information about the next time an event, contained in the id array, is supposed to

occur You must pass the week_start property to signify the day on which you

consider the week to start

The returned object contains the properties shown in Table 11.8

Table 11.8 Properties of the Returned Date/Time Objects

Trang 3

alarm The number of minutes before an event to send out an alarm

hour The numeric hour

mday The numeric day of the month

min The numeric minute

month The numeric month

sec The numeric second

year The numeric year

mcal_open()

Syntax

int mcal_open (string calendar, string username, string password, int options)

Description

The mcal_open() function creates an open stream, or handler, to calendar It

accesses calendar using the specified username and password You can also pass

any additional options as needed The stream's internal event structure is also

initialized

mcal_popen()

Syntax

int mcal_popen (string calendar, string username, string password, int options)

Description

The mcal_popen() function creates a persistent stream, or handler, to calendar It

accesses calendar by using the specified username and password You can also

pass any additional options as needed The stream's internal event structure is also

initialized

mcal_rename_calendar()

Syntax

int mcal_rename_calendar(string old_name, string new_name)

Trang 4

Description

The mcal_rename_calendar() function renames the old_name calendar to new_name

mcal_reopen()

Syntax

int mcal_reopen (string calendar, int options)

Description

The mcal_reopen() function, using a previously opened stream, opens a new

calendar and passes it any necessary options

mcal_snooze()

Syntax

int mcal_snooze (int id)

Description

The mcal_snooze() function turns off the alarm event for the specified event id

mcal_store_event()

Syntax

int mcal_store_event (int mcal_stream)

Description

The mcal_store_event() function stores any previously modified information about the event connected to by mcal_stream The function returns 1 if successful, and 0 otherwise

mcal_time_valid()

Trang 5

Syntax

int mcal_time_valid(int hour, int minutes, int seconds)

Description

The mcal_time_valid() function returns 1 if the hour , minutes , and seconds

passed represent a valid time

Miscellaneous

This set of miscellaneous calendar functions enables you to change between calendar formats It is based on the Julian day count standard, which applies the Julian calendar back to approximately 4713 B.C You must compile in the Calendar extension for this set of functions to work

easter_date()

Syntax

int easter_date(int year)

Description

The easter_date() function, which was added in PHP 3.0.9, returns the UNIX-formatted date for midnight on Easter of the specified year

echo date ("M-d-Y", easter_date(2001)); // returns Apr-15-2001

easter_days()

Syntax

int easter_days([int year])

Description

The easter_days() function, which was added in PHP 3.0.9, returns the number of days since March 21 on which Easter falls for the passed year If year is left off, the

current year is assumed

Ngày đăng: 07/07/2014, 05:20