---
category: [Administration & Integrations, Platform and Product Extensions, Platform and Product Extensions/Integration, Administration & Integrations/Custom Integrations & Apps, Platform and Product Extensions/Workday Extend]
nav: wcp_docs
parent_url: /wcp_docs/
title: >- 
  Concept: date Functions
layout: subsection
---

<a id="section_wgq_5lq_rkb"></a>
The `date` namespace provides functions for extracting date values and performing date manipulations and calculations.

If an instance method is available, call a date function as a method on the `Date` instance:

```
thisDate.functionName(functionParam1, functionParam2)
```

Alternatively, you can call a date function using its `date` namespace sytnax, where the `Date` instance is the first parameter:

```
date:functionName(thisDate, functionParam1, functionParam2)
```

To specify the local timezone for functions accepting a timezone string parameter, you can use the `userTimeZone` variable, which contains the preferred timezone of the currently logged-in Workday user. If the preferred timezone isn't set for the Workday user, the `userTimeZone` contains the user's default timezone. For functions that accept a timezone object parameter, you can use the `getDateTimeZone(userTimeZone)` function.

## <a id="section_1"></a>Dates in Sample Apps

You can look at how the date functions are used in these sample apps in the [App Catalog](https://developer.workday.com/app-catalog):

-   Work From Almost Anywhere: The `dates.script` contains several date calculation functions.
-   Project Forecasting: The `dates.script` contains several data formatting functions.
-   PMD Scripting: The `dataCalculations.pmd` contains examples of the `onChange` event on the `date` widget.


