Contact Us 1-800-596-4880

Periods (dw::core::Periods)

This module contains functions for working with and creating Period values.

To use this module, you must import it to your DataWeave code, for example, by adding the line import * from dw::core::Periods to the header of your DataWeave script.

Functions

Name Description

between

Returns a Period (P) value consisting of the number of years, months, and days between two Date values.

days

Creates a Period value from the provided number of days.

duration

Creates a Period value that represents a number of days, hours, minutes, or seconds.

hours

Creates a Period value from the provided number of hours.

minutes

Creates a Period value from the provided number of minutes.

months

Creates a Period value from the provided number of months.

period

Creates a Period value as a date-based number of years, months, and days in the ISO-8601 calendar system.

seconds

Creates a Period value from the provided number of seconds.

years

Creates a Period value from the provided number of years.