Search Results get_days




Overview

XDO_DGF_TEST_RULES is a utility PL/SQL package owned by the APPS schema in Oracle E-Business Suite. Its name and structure indicate it belongs to the XML Publisher/Document Generation Framework (XDO DGF) test utilities — a set of low-level helper routines used to evaluate simple conditional rules against date, time, and duration inputs. The package does not persist or manipulate application data; instead, it exposes pure functions that return computed results, making it a reusable building block for template logic, test harnesses, and custom validation code that must decide whether a given time span or working condition is satisfied.

As documented in the ETRM metadata for 12.2.2 and consistent with the 12.1.1 codebase, the package carries the noship header marker (120.1, dated 2008/01/19), indicating it was internal and not shipped as a public API. Its API classification is OTHER rather than a published interface, so it should be treated as an internal utility rather than a supported integration point.

Key Procedures and Functions

The package exposes three documented functions. The user's search term, GET_DAYS, corresponds to the second of these.

  • IS_ENOUGH_DAYS — Returns 'Y' if the difference between an end date and a start date is greater than or equal to a supplied number of days; otherwise returns 'N'. It accepts start date, end date, format mask, and number-of-days inputs, with the day count defaulting to 30. It is a boolean-style predicate for duration threshold checks.
  • GET_DAYS — Returns the numeric difference between the end date and the start date, computed using a supplied date format mask. This is the core duration calculator in the package and the function typically sought when developers need to quantify elapsed days between two date strings.
  • IS_WORKING_HOURS — Returns 'Y' if the current system time falls between 08:00 and 17:00 (based on the 24-hour clock derived from SYSDATE); otherwise returns 'N'. It provides a simple working-hours predicate.

All three functions share a common design philosophy: accept formatted string inputs where relevant and return a compact result (a single character or a number) suitable for embedding in conditional expressions.

Tables Accessed

The documented metadata lists no tables referenced via APPS synonyms. This is consistent with the package's nature as a computational utility: it performs date arithmetic and time comparisons in memory and does not read or write any application or interface tables. Because no persistent objects are touched, the package incurs no DML and no locking, and it can be invoked safely in read-only or high-concurrency contexts.

Usage Notes

Given its internal, non-shipped status and absence of table dependencies, XDO_DGF_TEST_RULES is typically invoked directly from PL/SQL — for example, in custom rule engines, XML Publisher template helpers, or test scripts that need to evaluate date spans or business hours. GET_DAYS is most useful when a developer must compute an elapsed-day count from two string-formatted dates without writing bespoke TO_DATE/date-subtraction logic; IS_ENOUGH_DAYS and IS_WORKING_HOURS serve parallel threshold and time-window checks.

Because the package is not documented as referenced by any other package and is classified as OTHER, it should not be relied upon as a stable public API. Confirm availability in the target environment before use, and prefer supported XML Publisher or date functions for production interfaces. When invoking these routines, ensure date strings match the supplied format mask, since the functions rely on implicit TO_DATE conversion and invalid formats will raise errors.