|
of_dayofweek
|
|
Full name
|
pfc_n_cst_datetime.of_dayofweek
|
Access
|
public
|
Extend of
|
integer
|
Return value
|
integer
|
Prototype
|
public function integer of_dayofweek(date)
|
Name
|
Datatype
|
ll_null
|
long
|
public function integer of_dayofweek (date ad_source);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_DayOfWeek
//
// Access: public
//
// Arguments:
// ad_source Date which contains the day to be determined.
//
// Returns: integer
// 1 - If the Day is Sunday.
// 2 - If the Day is Monday
// 3 - If the Day is Tuesday.
// 4 - If the Day is Wednesday.
// 5 - If the Day is Thursday.
// 6 - If the Day is Friday.
// 7 - If the Day is Saturday.
// If any argument's value is NULL, function returns NULL.
//
// Description: Based on the the passed date, determines the day of the week.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
// 5.0.02 Fixed - function would fail under some international date sets
// Function duplicates PowerScript DayNumber function.
// 5.0.03 Add parameter and invalid date checking
// 6.0 Marked obsolete Replaced by DayNumber(...)
//
//////////////////////////////////////////////////////////////////////////////
//
// Copyright © 1996-1997 Sybase, Inc. and its subsidiaries. All rights reserved.
// Any distribution of the PowerBuilder Foundation Classes (PFC)
// source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////
//Check parameters
If IsNull(ad_source) Then
long ll_null
SetNull(ll_null)
Return ll_null
End If
//Check for invalid date
If Not of_IsValid(ad_source) Then
Return -1
End If
return DayNumber (ad_source)
end function
Name
|
Owner
|
systemfunctions.daynumber |
systemfunctions
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.setnull |
systemfunctions
|
pfc_n_cst_datetime.of_isvalid |
pfc_n_cst_datetime
|