---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
keyword: [Extend, Orchestration Builder, Orchestrate, Orchestration]
nav: wcp_docs
parent_url: /wcp_docs/
title: >- 
  Reference: Date Member Functions
layout: subsection
---

<a id="section_N10022_N1001F_N10001"></a>
<b>Instance Type: Date</b>

<table><thead><tr><th>Name</th><th>Description</th></tr></thead><tbody><tr><td>diffDays</td><td>Arguments: <ul><li>other (Date)
</li></ul> <p>Return Type:</p><ul><li>Number
</li></ul> Returns the number of days between the specified date and the instance date.</td></tr><tr><td>diffMonths</td><td>Arguments: <ul><li>other (Date)
</li></ul> <p>Return Type:</p><ul><li>Number
</li></ul> Returns the number of months between the specified date and the instance date</td></tr><tr><td>diffWeeks</td><td>Arguments: <ul><li>other (Date)
</li></ul> <p>Return Type:</p><ul><li>Number
</li></ul> Returns the number of weeks between the specified date and the instance date</td></tr><tr><td>diffYears</td><td>Arguments: <ul><li>other (Date)
</li></ul> <p>Return Type:</p><ul><li>Number
</li></ul> Returns the number of years between the specified date and the instance date</td></tr><tr><td>format</td><td>Arguments: <ul><li>pattern (String)
</li></ul> <p>Return Type:</p><ul><li>String
</li></ul> Returns the date formatted according to the specified pattern. Examples: ISO_LOCAL_DATE, yyyy-MM-dd.</td></tr><tr><td>getDayOfMonth</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Number
</li></ul> Returns the primitive integer value for the day of the month.</td></tr><tr><td>getDayOfWeek</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>String
</li></ul><p>Returns the enum value for the day of the week.</p></td></tr><tr><td>getDayOfYear</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>Number
</li></ul><p>Returns the primitive integer value for the day of the year.</p></td></tr><tr><td>isAfter</td><td>Arguments: <ul><li>other (Date)
</li></ul> <p>Return Type:</p><ul><li>Boolean
</li></ul> Returns true if the specified date is after the instance date.</td></tr><tr><td>isBefore</td><td>Arguments: <ul><li>other (Date)
</li></ul> <p>Return Type:</p><ul><li>Boolean
</li></ul> Returns true if the specified date is before the instance date.</td></tr><tr><td>isEqual</td><td>Arguments: <ul><li>other (Date)
</li></ul> <p>Return Type:</p><ul><li>Boolean
</li></ul> Returns true if the specified date is the same as the instance date.</td></tr><tr><td>minusDays</td><td>Arguments: <ul><li>daysToSubtract (Number)
</li></ul> <p>Return Type:</p><ul><li>Date
</li></ul> Returns a copy of <code>LocalDate</code> with the specified number of days subtracted.</td></tr><tr><td>minusMonths</td><td>Arguments: <ul><li>monthsToSubtract (Number)
</li></ul> <p>Return Type:</p><ul><li>Date
</li></ul> Returns a copy of <code>LocalDate</code> with the specified number of months subtracted. If the resulting date is invalid because of the number of days in that month, returns the last valid date of that month.</td></tr><tr><td>minusWeeks</td><td>Arguments: <ul><li>weeksToSubtract (Number)
</li></ul> <p>Return Type:</p><ul><li>Date
</li></ul> Returns a copy of <code>LocalDate</code> with the specified number of weeks subtracted.</td></tr><tr><td>minusYears</td><td>Arguments: <ul><li>yearsToSubtract (Number)
</li></ul> <p>Return Type:</p><ul><li>Date
</li></ul> Returns a copy of <code>LocalDate</code> with the specified number of years subtracted. If the resulting date is invalid because of a leap year, returns the last valid date of that month.</td></tr><tr><td>plusDays</td><td>Arguments: <ul><li>daysToAdd (Number)
</li></ul> <p>Return Type:</p><ul><li>Date
</li></ul> Returns a copy of <code>LocalDate</code> with the specified number of days added.</td></tr><tr><td>plusMonths</td><td>Arguments: <ul><li>monthsToAdd (Number)
</li></ul> <p>Return Type:</p><ul><li>Date
</li></ul> Returns a copy of <code>LocalDate</code> with the specified number of months added. If the resulting date is invalid because of the number of days in that month, returns the last valid date of that month.</td></tr><tr><td>plusWeeks</td><td>Arguments: <ul><li>weeksToAdd (Number)
</li></ul> <p>Return Type:</p><ul><li>Date
</li></ul> Returns a copy of <code>LocalDate</code> with the specified number of weeks added.</td></tr><tr><td>plusYears</td><td>Arguments: <ul><li>yearsToAdd (Number)
</li></ul> <p>Return Type:</p><ul><li>Date
</li></ul> Returns a copy of <code>LocalDate</code> with the specified number of years added. If the resulting date is invalid because of a leap year, returns the last valid date of that month.</td></tr><tr><td>toString</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>String
</li></ul> Returns a string representation of the value.</td></tr><tr><td>toXMLDate</td><td>Arguments: <ul><li>None
</li></ul> <p>Return Type:</p><ul><li>String
</li></ul> Returns the date as a string in the ISO-8601 format <code>yyyy-MM-dd</code>.</td></tr></tbody></table><br/>

