Project: Birt
Bug 177433 [XML Data Source Improvements] Addition of XML Duration Data Type
Reported: 2007-03-14 17:15:33 | Status: verified fixed

The duration data type is used to specify a time interval. Many XML data sources use the duration data type. [Duration Data Type seems like a major oversight, and one that should be easy to remedy] The time interval is specified in the following form "PnYnMnDTnHnMnS" where: * P indicates the period (required) * nY indicates the number of years * nM indicates the number of months * nD indicates the number of days * T indicates the start of a time section (required if you are going to specify hours, minutes, or seconds) * nH indicates the number of hours * nM indicates the number of minutes * nS indicates the number of seconds The following is an example of a duration declaration in a schema: <xs:element name="period" type="xs:duration"/> An element in the document might look like this: <period>P5Y</period> The example above indicates a period of five years. Or it might look like this: <period>P5Y2M10D</period> The example above indicates a period of five years, two months, and 10 days.

Files changed in fix:
data/org.eclipse.birt.core.script.function/src/org/eclipse/birt/core/script/function/bre/BirtDuration.java data/org.eclipse.birt.core.script.function/src/org/eclipse/birt/core/script/function/bre/BirtDurationFunctionFactory.java