@servicetitan/docs-anvil-uikit-contrib 35.0.0 → 36.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/intl/dates.mdx +5 -1
- package/docs/intl/times.mdx +2 -2
- package/package.json +2 -2
package/docs/intl/dates.mdx
CHANGED
|
@@ -16,11 +16,15 @@ Dates can be formatted either by using the [`FormattedDate`](#formatteddate) com
|
|
|
16
16
|
|
|
17
17
|
## Available Formats
|
|
18
18
|
|
|
19
|
-
The following standard ServiceTitan formats are available to use as part of date formatting
|
|
19
|
+
The following standard ServiceTitan formats are available to use as part of date formatting, using the `format` option. The formats follow the "Date and Time" section of the [Anvil2 Content documentation](https://anvil.servicetitan.com/web/content/date-and-time).
|
|
20
20
|
|
|
21
21
|
- `short` results in `09/02/2025` for 'en-US' locale (default if no format is specified)
|
|
22
22
|
- `long` results in `September 2, 2025` for 'en-US' locale
|
|
23
23
|
|
|
24
|
+
The `format` option expands into [Intl.DateTimeFormatOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options) that make up the formats listed above.
|
|
25
|
+
|
|
26
|
+
Any options passed to `FormattedDate` or `formatDate` will be merged on top of `{ format: 'short' }` (which expands to `{ day: '2-digit', month: '2-digit', year: 'numeric' }` [Intl.DateTimeFormatOptions](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/DateTimeFormat#options)). If you want to use your custom options only, you can pass `format: undefined` to disable the default.
|
|
27
|
+
|
|
24
28
|
## Usage
|
|
25
29
|
|
|
26
30
|
### FormattedDate
|
package/docs/intl/times.mdx
CHANGED
|
@@ -12,13 +12,13 @@ Times can be formatted either by using the [`FormattedTime`](#formattedtime) com
|
|
|
12
12
|
|
|
13
13
|
## Available Formats
|
|
14
14
|
|
|
15
|
-
The following standard ServiceTitan formats are available to use as part of time formatting
|
|
15
|
+
The following standard ServiceTitan formats are available to use as part of time formatting, using the `format` option. The formats follow the "Date and Time" section of the [Anvil2 Content documentation](https://anvil.servicetitan.com/web/content/date-and-time).
|
|
16
16
|
|
|
17
17
|
:::note
|
|
18
18
|
The example results that follow use a locale of 'en-US' and time zone of 'America/New_York'
|
|
19
19
|
:::
|
|
20
20
|
|
|
21
|
-
- `short` results in `4:00 PM` (default
|
|
21
|
+
- `short` results in `4:00 PM` (default)
|
|
22
22
|
- `shortTimezone` results in `4:00 PM EDT`
|
|
23
23
|
- `utc` results in `08:00 PM UTC` (forces UTC timezone and adds leading zero)
|
|
24
24
|
- `medium` results in `4:00:00 PM`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@servicetitan/docs-anvil-uikit-contrib",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "36.0.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"cli": {
|
|
17
17
|
"webpack": false
|
|
18
18
|
},
|
|
19
|
-
"gitHead": "
|
|
19
|
+
"gitHead": "aafdfc3cb503509159642338517d94ca7f5c672b"
|
|
20
20
|
}
|