Skip UCSF navigation|About accessibility UCSF University of California, San Francisco
About UCSF
Search UCSF
UCSF Medical Center
End of UCSF navigation

End of section-level navigation

School of Pharmacy

UCSF School of Pharmacy

Calendars

You can easily insert a calendar onto the page using calendar scripts written in PHP.

Current Date Calendar

To insert a calendar highlighting the current date:

<?
@include $_SERVER['DOCUMENT_ROOT'] . '/.calendar/calendardisplay.php';
?>

September 2008

Su

Mo

Tu

We

Th

Fr

Sa

 

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

 

 

 

 

By default, the calendar displays the current month of the current year and with the current date highlighted as above. You can change the highlighted date and customize other features of the displayed calendar.

Fixed Date Calendar

The example below displays the fixed date for June 21, 2003 rather than the current date.

<?
@include 'http://' . $_SERVER['HTTP_HOST'] . '/.calendar/calendardisplay.php?yr=2003&mo=6&mrks=2003-06-21&nt=1';
?>

June 2003

Su

Mo

Tu

We

Th

Fr

Sa

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

 

 

 

 

 

Syntax & Usage

To learn the syntax for customizing calendars, see Easy PHP Calendar.

Because calendars take up the full width of the column they're in, we almost always use them only in column 2 of a 2-column layout.

Linking to Full Year Calendars

To link to an offsite calendar showing a full year, use the calendaryear function. The example below displays links to calendar years for the current year and the year after. The calendar link appears as both a graphic link -- a thumbnail image of a full calendar year -- and accompanying text links.

<h3>Full Year Calendars</h3>
<?
@include $_SERVER['DOCUMENT_ROOT'] . '/.includes/yearlycalendar.php';
calendaryear( date('Y') );
calendaryear( date('Y') + 1 );
?>

Full Year Calendars

Thumbnail image of a full year calendar for 2008

Year 2008 Calendar
HTML format

Thumbnail image of a full year calendar for 2009

Year 2009 Calendar
HTML format

Examples

Examples of using calendars:

Go To: Visual Design or Style Guide