PFC Guide Titlebar
HomeFAQLinksPFCMAGExtensionsDownloadWhat's NewSearch

ISO Calendar Extension

Ver. 1.00
Contributed by Boris Gasin



This extension is part of an article published in the February 98 Issue of PowerTimes magazine.

What

u_calendar

Why

PFC calendar object displays days of the week Sunday through Monday.  According to the International Organization for Standardization (ISO) Monday is the first day of the week. The purpose of this extension is to allow the calendar object to comply with either convention.

ext_0013_fig7.gif (2976 bytes) ext_0013_fig8.gif (3056 bytes)

How

To allow the configuration of the  u_calendar display style following functions were added:

of_setdisplaystyle
(public)
Used to switch between the default (Sunday first ) and ISO (Monday first) display styles.  Valid arguments are DISPLAY_ISO and DISPLAY_DEFAULT
of_isodaynumber
(protected)
Replacement for DayNumber().  Returns ISO friendly day number.
mon - 1,  tue - 2, ...  sun - 7
of_DrawMonth
(protected)
Overridden the ancestor function to draw the ISO style month.
of_setdate
(protected)
Overridden the ancestor function.   Modified to reference the of_isodaynumber when appropriate.

Usage :

The calendar will default to the original (Sunday first) display style.  If ISO display style is required set it using the of_setDisplayStyle() function.

uo_calendar.of_setDisplayStyle(uo_calendar.DISPLAY_ISO)

To return to the original display style call the function once more with DISPLAY_DEFAULT argument:

uo_calendar.of_setDisplayStyle(uo_calendar.DISPLAY_DEFAULT)

.

 


Download the About the extension contributor

 

Revision History
03/02/1998 Initial Revision Ver. 1.00

Interested in contributing material to this web site? Send an email to submit@pfcguide.com, but don't forget to check the contribution guidelines first.


For information or suggestions about this web site please contact webmaster@pfcguide.com

PFCGuide is sponsored by Dynamic Technology Group.
The information on this site is provided for advice only and not to be considered a contract or a liability against Dynamic Technology Group.

Last Revised: February 15, 2004 03:58 AM.