|
of_juliandaynumber
|
|
Full name
|
pfc_n_cst_datetime.of_juliandaynumber
|
Access
|
public
|
Extend of
|
long
|
Return value
|
long
|
Prototype
|
public function long of_juliandaynumber(date)
|
Name
|
Datatype
|
ll_null
|
long
|
public function long of_juliandaynumber (date ad_source);//////////////////////////////////////////////////////////////////////////////
//
// Function: of_JulianDayNumber
//
// Access: public
//
// Arguments:
// ad_source Date to test
//
// Returns: long
// Number of the day (ex. 1/1/95=1 and 12/31/95=365)
// If ad_source is NULL, function returns NULL.
//
// Description: Given a date, will determine the day number within the same
// year.
//
//////////////////////////////////////////////////////////////////////////////
//
// Revision History
//
// Version
// 5.0 Initial version
// 5.0.03 Add date validity check
//
//////////////////////////////////////////////////////////////////////////////
//
// 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
// Get the days after the last day of the Previous Year.
Return daysafter(Date((Year(ad_source) - 1),12,31), ad_source)
end function
Name
|
Owner
|
systemfunctions.date |
systemfunctions
|
systemfunctions.daysafter |
systemfunctions
|
systemfunctions.isnull |
systemfunctions
|
systemfunctions.setnull |
systemfunctions
|
systemfunctions.year |
systemfunctions
|
pfc_n_cst_datetime.of_isvalid |
pfc_n_cst_datetime
|