The DaysBeforeAnnualEvent derived property represents the number of days before an annual event occurs. Note that the value of this property is cyclical. It starts at a positive integer less than 365 and decreases each day to zero. Once zero is reached, the value is reset to 365 and starts decreasing again the next day.

The DaysBeforeAnnualEvent derived property is implemented by the property descriptor atg.repository.dp.DaysBeforeAnnualEventPropertyDescriptor, which uses the supporting derivation method atg.repository.dp.DaysBeforeAnnualEvent. The property is readable and queryable but not writable.

The property has two attributes, which are described below:

Attribute

Type

Required

Description

monthPropertyName

string

yes

The name of the property that represents the month field.

dayOfMonthPropertyName

string

yes

The name of the property that represents the day field.

The following example shows how to configure the DaysBeforeAnnualEvent derived property in a GSA repository definition to calculate the number of days before a user’s birthday.

<property name="daysBeforeBirthday"
      data-type="int"
      writable="false"
      property-type="atg.repository.dp.DaysBeforeAnnualEventPropertyDescriptor">
  <attribute name="monthPropertyName" value="dobMonthOfDayField"/>
  <attribute name="dayOfMonthPropertyName" value="dobDayOfMonthField"/>
</property>
 
loading table of contents...