hzCron::Initialize Set up start of era date if Y, M and D are non-zero and if the periodicity requires them.
| Return Type | Function name | Arguments |
|---|---|---|
| hzEcode | hzCron::Initialize | (hzSDate&,hzPeriodicity,hzMonthrule,) |
Declared in file: hzCron.h
Defined in file : hzCron.cpp
Function Logic:
Function body:
hzEcode hzCron::Initialize (hzSDate& start)hzPeriodicity period, hzMonthrule mrule,
{
// hzCron::Initialize
//
// Set up start of era date if Y, M and D are non-zero and if the periodicity requires them.
//
// Arguments: 1) start Ths short form date that marks the earliest date for which tasks can be generated
// 2) period The applicable periodicity
// 3) mrule The Monthrule augments the periodicity
//
// Returns: E_NOINIT If the settings have not been set up or set up correctly
// E_OK If the periodicity and monthrule settings are a viable combination
_hzfunc("hzCron::Initialize") ;
m_Era = start ;
if (period == HZPERIOD_NEVER)
{
m_error = "Periodicity not set" ;
return E_NOINIT ;
}
m_Period = period ;
return Validate() ;
}