pict-section-formeditor 1.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/LICENSE +21 -0
- package/README.md +118 -0
- package/docs/.nojekyll +0 -0
- package/docs/README.md +162 -0
- package/docs/_sidebar.md +23 -0
- package/docs/_topbar.md +5 -0
- package/docs/cover.md +12 -0
- package/docs/css/docuserve.css +73 -0
- package/docs/index.html +39 -0
- package/docs/retold-catalog.json +224 -0
- package/docs/retold-keyword-index.json +46846 -0
- package/example_applications/form_editor/.quackage.json +10 -0
- package/example_applications/form_editor/FormEditor-Example-Application.js +226 -0
- package/example_applications/form_editor/html/icon-chooser.html +375 -0
- package/example_applications/form_editor/html/index.html +54 -0
- package/example_applications/form_editor/package.json +50 -0
- package/package.json +55 -0
- package/sample_manifests/Complex-Table.json +974 -0
- package/sample_manifests/Distill-Example.json +200 -0
- package/sample_manifests/Gradebook-Assignment.json +38 -0
- package/sample_manifests/Gradebook-Student.json +40 -0
- package/sample_manifests/Manyfest-Editor.json +347 -0
- package/sample_manifests/Simple-Form.json +232 -0
- package/sample_manifests/Simple-Table.json +79 -0
- package/source/Pict-Section-FormEditor-DefaultConfiguration.js +3321 -0
- package/source/Pict-Section-FormEditor.js +35 -0
- package/source/providers/Pict-Provider-ChildPictManager-Application.js +40 -0
- package/source/providers/Pict-Provider-ChildPictManager.js +238 -0
- package/source/providers/Pict-Provider-FormEditorDocumentation.js +356 -0
- package/source/providers/Pict-Provider-FormEditorDragDrop.js +535 -0
- package/source/providers/Pict-Provider-FormEditorIconography.js +1002 -0
- package/source/providers/Pict-Provider-FormEditorManifestOps.js +1443 -0
- package/source/providers/Pict-Provider-FormEditorRendering.js +730 -0
- package/source/providers/Pict-Provider-FormEditorUtilities.js +862 -0
- package/source/providers/Pict-Provider-PreviewCSS.js +42 -0
- package/source/views/PictView-FormEditor-InlineEditing.js +309 -0
- package/source/views/PictView-FormEditor-InputTypePicker.js +532 -0
- package/source/views/PictView-FormEditor-PropertiesPanel.js +7730 -0
- package/source/views/PictView-FormEditor.js +681 -0
- package/test/Pict-Section-FormEditor_tests.js +4102 -0
- package/user-documentation/.pict_documentation_topics.json +695 -0
- package/user-documentation/Getting-Started.md +32 -0
- package/user-documentation/Groups.md +52 -0
- package/user-documentation/Inputs.md +98 -0
- package/user-documentation/Sections.md +36 -0
- package/user-documentation/Shortcuts.md +44 -0
- package/user-documentation/Solver-Expression-Walkthrough.md +176 -0
- package/user-documentation/Solver-Expressions-Advanced.md +344 -0
- package/user-documentation/Solver-Functions.md +213 -0
- package/user-documentation/Solvers.md +81 -0
- package/user-documentation/ToC.md +18 -0
- package/user-documentation/solverfunctions/abs.md +84 -0
- package/user-documentation/solverfunctions/aggregationhistogram.md +83 -0
- package/user-documentation/solverfunctions/aggregationhistogrambyobject.md +64 -0
- package/user-documentation/solverfunctions/arrayconcat.md +64 -0
- package/user-documentation/solverfunctions/avg.md +81 -0
- package/user-documentation/solverfunctions/bucketset.md +69 -0
- package/user-documentation/solverfunctions/ceil.md +70 -0
- package/user-documentation/solverfunctions/cleanvaluearray.md +66 -0
- package/user-documentation/solverfunctions/cleanvalueobject.md +68 -0
- package/user-documentation/solverfunctions/colorgroupbackground.md +60 -0
- package/user-documentation/solverfunctions/colorinputbackground.md +62 -0
- package/user-documentation/solverfunctions/colorinputbackgroundtabular.md +64 -0
- package/user-documentation/solverfunctions/colorsectionbackground.md +59 -0
- package/user-documentation/solverfunctions/compare.md +72 -0
- package/user-documentation/solverfunctions/concat.md +73 -0
- package/user-documentation/solverfunctions/concatraw.md +73 -0
- package/user-documentation/solverfunctions/cos.md +75 -0
- package/user-documentation/solverfunctions/count.md +73 -0
- package/user-documentation/solverfunctions/countset.md +65 -0
- package/user-documentation/solverfunctions/countsetelements.md +63 -0
- package/user-documentation/solverfunctions/createarrayfromabsolutevalues.md +63 -0
- package/user-documentation/solverfunctions/createvalueobjectbyhashes.md +69 -0
- package/user-documentation/solverfunctions/cumulativesummation.md +96 -0
- package/user-documentation/solverfunctions/dateadddays.md +79 -0
- package/user-documentation/solverfunctions/dateaddhours.md +74 -0
- package/user-documentation/solverfunctions/dateaddmilliseconds.md +65 -0
- package/user-documentation/solverfunctions/dateaddminutes.md +72 -0
- package/user-documentation/solverfunctions/dateaddmonths.md +74 -0
- package/user-documentation/solverfunctions/dateaddseconds.md +66 -0
- package/user-documentation/solverfunctions/dateaddweeks.md +73 -0
- package/user-documentation/solverfunctions/dateaddyears.md +74 -0
- package/user-documentation/solverfunctions/datedaydifference.md +84 -0
- package/user-documentation/solverfunctions/datefromparts.md +81 -0
- package/user-documentation/solverfunctions/datehourdifference.md +64 -0
- package/user-documentation/solverfunctions/datemathadd.md +72 -0
- package/user-documentation/solverfunctions/datemilliseconddifference.md +64 -0
- package/user-documentation/solverfunctions/dateminutedifference.md +64 -0
- package/user-documentation/solverfunctions/datemonthdifference.md +66 -0
- package/user-documentation/solverfunctions/dateseconddifference.md +64 -0
- package/user-documentation/solverfunctions/dateweekdifference.md +65 -0
- package/user-documentation/solverfunctions/dateyeardifference.md +64 -0
- package/user-documentation/solverfunctions/differencearrays.md +59 -0
- package/user-documentation/solverfunctions/disablesolverordinal.md +58 -0
- package/user-documentation/solverfunctions/distributionhistogram.md +96 -0
- package/user-documentation/solverfunctions/distributionhistogrambyobject.md +64 -0
- package/user-documentation/solverfunctions/enablesolverordinal.md +57 -0
- package/user-documentation/solverfunctions/entryinset.md +72 -0
- package/user-documentation/solverfunctions/euler.md +77 -0
- package/user-documentation/solverfunctions/exp.md +74 -0
- package/user-documentation/solverfunctions/findfirstvaluebyexactmatch.md +67 -0
- package/user-documentation/solverfunctions/findfirstvaluebystringincludes.md +67 -0
- package/user-documentation/solverfunctions/flatten.md +76 -0
- package/user-documentation/solverfunctions/floor.md +70 -0
- package/user-documentation/solverfunctions/gaussianelimination.md +75 -0
- package/user-documentation/solverfunctions/generatearrayofobjectsfromsets.md +70 -0
- package/user-documentation/solverfunctions/generatehtmlhexcolor.md +67 -0
- package/user-documentation/solverfunctions/getvalue.md +90 -0
- package/user-documentation/solverfunctions/getvaluearray.md +64 -0
- package/user-documentation/solverfunctions/getvalueobject.md +67 -0
- package/user-documentation/solverfunctions/hidesections.md +58 -0
- package/user-documentation/solverfunctions/if.md +109 -0
- package/user-documentation/solverfunctions/iterativeseries.md +107 -0
- package/user-documentation/solverfunctions/join.md +75 -0
- package/user-documentation/solverfunctions/joinraw.md +64 -0
- package/user-documentation/solverfunctions/largestinset.md +63 -0
- package/user-documentation/solverfunctions/leastsquares.md +66 -0
- package/user-documentation/solverfunctions/linest.md +58 -0
- package/user-documentation/solverfunctions/log.md +74 -0
- package/user-documentation/solverfunctions/logvalues.md +65 -0
- package/user-documentation/solverfunctions/match.md +71 -0
- package/user-documentation/solverfunctions/matrixinverse.md +67 -0
- package/user-documentation/solverfunctions/matrixmultiply.md +71 -0
- package/user-documentation/solverfunctions/matrixtranspose.md +72 -0
- package/user-documentation/solverfunctions/matrixvectormultiply.md +69 -0
- package/user-documentation/solverfunctions/max.md +73 -0
- package/user-documentation/solverfunctions/mean.md +63 -0
- package/user-documentation/solverfunctions/median.md +79 -0
- package/user-documentation/solverfunctions/min.md +73 -0
- package/user-documentation/solverfunctions/mode.md +66 -0
- package/user-documentation/solverfunctions/objectkeystoarray.md +66 -0
- package/user-documentation/solverfunctions/objectvaluessortbyexternalobjectarray.md +65 -0
- package/user-documentation/solverfunctions/objectvaluestoarray.md +67 -0
- package/user-documentation/solverfunctions/percent.md +75 -0
- package/user-documentation/solverfunctions/pi.md +77 -0
- package/user-documentation/solverfunctions/polynomialregression.md +69 -0
- package/user-documentation/solverfunctions/predict.md +71 -0
- package/user-documentation/solverfunctions/rad.md +85 -0
- package/user-documentation/solverfunctions/randomfloat.md +63 -0
- package/user-documentation/solverfunctions/randomfloatbetween.md +72 -0
- package/user-documentation/solverfunctions/randomfloatupto.md +65 -0
- package/user-documentation/solverfunctions/randominteger.md +56 -0
- package/user-documentation/solverfunctions/randomintegerbetween.md +72 -0
- package/user-documentation/solverfunctions/randomintegerupto.md +64 -0
- package/user-documentation/solverfunctions/refreshtabularsection.md +57 -0
- package/user-documentation/solverfunctions/resolvehtmlentities.md +64 -0
- package/user-documentation/solverfunctions/round.md +111 -0
- package/user-documentation/solverfunctions/runsolvers.md +49 -0
- package/user-documentation/solverfunctions/setconcatenate.md +64 -0
- package/user-documentation/solverfunctions/setgroupvisibility.md +60 -0
- package/user-documentation/solverfunctions/setsectionvisibility.md +59 -0
- package/user-documentation/solverfunctions/setsolverordinalenabled.md +59 -0
- package/user-documentation/solverfunctions/settabularrowlength.md +57 -0
- package/user-documentation/solverfunctions/setvalue.md +65 -0
- package/user-documentation/solverfunctions/showsections.md +58 -0
- package/user-documentation/solverfunctions/sin.md +83 -0
- package/user-documentation/solverfunctions/slice.md +80 -0
- package/user-documentation/solverfunctions/smallestinset.md +63 -0
- package/user-documentation/solverfunctions/sortarray.md +58 -0
- package/user-documentation/solverfunctions/sorthistogram.md +70 -0
- package/user-documentation/solverfunctions/sorthistogrambykeys.md +69 -0
- package/user-documentation/solverfunctions/sortset.md +75 -0
- package/user-documentation/solverfunctions/sqrt.md +85 -0
- package/user-documentation/solverfunctions/stdev.md +81 -0
- package/user-documentation/solverfunctions/stdeva.md +58 -0
- package/user-documentation/solverfunctions/stdevp.md +83 -0
- package/user-documentation/solverfunctions/stringcountsegments.md +66 -0
- package/user-documentation/solverfunctions/stringgetsegments.md +74 -0
- package/user-documentation/solverfunctions/subtractingsummation.md +66 -0
- package/user-documentation/solverfunctions/sum.md +78 -0
- package/user-documentation/solverfunctions/tan.md +78 -0
- package/user-documentation/solverfunctions/tofixed.md +75 -0
- package/user-documentation/solverfunctions/unionarrays.md +59 -0
- package/user-documentation/solverfunctions/uniquearray.md +58 -0
- package/user-documentation/solverfunctions/var.md +67 -0
- package/user-documentation/solverfunctions/vara.md +58 -0
- package/user-documentation/solverfunctions/varp.md +66 -0
- package/user-documentation/solverfunctions/when.md +98 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# dateaddseconds
|
|
2
|
+
|
|
3
|
+
Adds a specified number of seconds to a date.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
dateaddseconds(date, seconds)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `date` | String | Starting date (ISO 8601 format) |
|
|
16
|
+
| `seconds` | Number | Number of seconds to add (can be negative) |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
String - The resulting date in ISO 8601 format.
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `dateaddseconds` function adds a specified number of seconds to a date and returns the new date/time. Use negative numbers to subtract seconds.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
Result = DATEADDSECONDS("2025-04-01T10:30:00.000Z", 30)
|
|
32
|
+
// Result: "2025-04-01T10:30:30.000Z"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Subtracting Seconds
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
Result = DATEADDSECONDS("2025-04-01T10:30:30.000Z", -15)
|
|
39
|
+
// Result: "2025-04-01T10:30:15.000Z"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Timeout Calculation
|
|
43
|
+
|
|
44
|
+
```expression
|
|
45
|
+
TimeoutExpiry = DATEADDSECONDS(RequestTime, TimeoutSeconds)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Use Cases
|
|
49
|
+
|
|
50
|
+
- **Timeouts**: Calculate expiry times
|
|
51
|
+
- **Animations**: Timing calculations
|
|
52
|
+
- **Performance**: Measure durations
|
|
53
|
+
- **Precision timing**: Second-level calculations
|
|
54
|
+
|
|
55
|
+
## Related Functions
|
|
56
|
+
|
|
57
|
+
- [dateaddmilliseconds](./dateaddmilliseconds.md) - Add milliseconds
|
|
58
|
+
- [dateaddminutes](./dateaddminutes.md) - Add minutes
|
|
59
|
+
- [dateseconddifference](./dateseconddifference.md) - Calculate second difference
|
|
60
|
+
|
|
61
|
+
## Notes
|
|
62
|
+
|
|
63
|
+
- Returns ISO 8601 formatted string
|
|
64
|
+
- Handles minute/hour boundaries
|
|
65
|
+
- Negative values subtract seconds
|
|
66
|
+
- Uses the Dates service internally
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# dateaddweeks
|
|
2
|
+
|
|
3
|
+
Adds a specified number of weeks to a date.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
dateaddweeks(date, weeks)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `date` | String | Starting date (ISO 8601 format) |
|
|
16
|
+
| `weeks` | Number | Number of weeks to add (can be negative) |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
String - The resulting date in ISO 8601 format.
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `dateaddweeks` function adds a specified number of weeks to a date and returns the new date. Use negative numbers to subtract weeks.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
Result = DATEADDWEEKS("2025-04-01T00:00:00.000Z", 2)
|
|
32
|
+
// Result: "2025-04-15T00:00:00.000Z"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Subtracting Weeks
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
Result = DATEADDWEEKS("2025-04-15T00:00:00.000Z", -1)
|
|
39
|
+
// Result: "2025-04-08T00:00:00.000Z"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Sprint Planning
|
|
43
|
+
|
|
44
|
+
```expression
|
|
45
|
+
SprintEndDate = DATEADDWEEKS(SprintStartDate, 2)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Weekly Schedule
|
|
49
|
+
|
|
50
|
+
```expression
|
|
51
|
+
NextMeeting = DATEADDWEEKS(LastMeeting, 1)
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Use Cases
|
|
55
|
+
|
|
56
|
+
- **Sprint planning**: Calculate sprint dates
|
|
57
|
+
- **Scheduling**: Weekly recurring events
|
|
58
|
+
- **Project management**: Week-based milestones
|
|
59
|
+
- **Payroll**: Bi-weekly pay periods
|
|
60
|
+
|
|
61
|
+
## Related Functions
|
|
62
|
+
|
|
63
|
+
- [dateadddays](./dateadddays.md) - Add days
|
|
64
|
+
- [dateaddmonths](./dateaddmonths.md) - Add months
|
|
65
|
+
- [dateweekdifference](./dateweekdifference.md) - Calculate week difference
|
|
66
|
+
- [datefromparts](./datefromparts.md) - Create date from parts
|
|
67
|
+
|
|
68
|
+
## Notes
|
|
69
|
+
|
|
70
|
+
- Returns ISO 8601 formatted string
|
|
71
|
+
- One week equals 7 days
|
|
72
|
+
- Negative values subtract weeks
|
|
73
|
+
- Uses the Dates service internally
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# dateaddyears
|
|
2
|
+
|
|
3
|
+
Adds a specified number of years to a date.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
dateaddyears(date, years)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `date` | String | Starting date (ISO 8601 format) |
|
|
16
|
+
| `years` | Number | Number of years to add (can be negative) |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
String - The resulting date in ISO 8601 format.
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `dateaddyears` function adds a specified number of years to a date and returns the new date. Use negative numbers to subtract years.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
Result = DATEADDYEARS("2025-04-15T00:00:00.000Z", 5)
|
|
32
|
+
// Result: "2030-04-15T00:00:00.000Z"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Subtracting Years
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
Result = DATEADDYEARS("2025-04-15T00:00:00.000Z", -10)
|
|
39
|
+
// Result: "2015-04-15T00:00:00.000Z"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### With Variables
|
|
43
|
+
|
|
44
|
+
```expression
|
|
45
|
+
ExpirationDate = DATEADDYEARS(IssueDate, ValidityPeriod)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Age Calculation
|
|
49
|
+
|
|
50
|
+
```expression
|
|
51
|
+
// Calculate future age date
|
|
52
|
+
FutureDate = DATEADDYEARS(BirthDate, 18)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Use Cases
|
|
56
|
+
|
|
57
|
+
- **Contracts**: Multi-year contract expiration
|
|
58
|
+
- **Warranties**: Long-term warranty dates
|
|
59
|
+
- **Planning**: Long-term projections
|
|
60
|
+
- **Legal**: Statute of limitations
|
|
61
|
+
|
|
62
|
+
## Related Functions
|
|
63
|
+
|
|
64
|
+
- [dateadddays](./dateadddays.md) - Add days
|
|
65
|
+
- [dateaddmonths](./dateaddmonths.md) - Add months
|
|
66
|
+
- [dateyeardifference](./dateyeardifference.md) - Calculate year difference
|
|
67
|
+
- [datefromparts](./datefromparts.md) - Create date from parts
|
|
68
|
+
|
|
69
|
+
## Notes
|
|
70
|
+
|
|
71
|
+
- Returns ISO 8601 formatted string
|
|
72
|
+
- Handles leap years appropriately
|
|
73
|
+
- Negative values subtract years
|
|
74
|
+
- Uses the Dates service internally
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# datedaydifference
|
|
2
|
+
|
|
3
|
+
Calculates the difference between two dates in days.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
datedaydifference(startDate, endDate)
|
|
9
|
+
datedaydifference(startDate, endDate, requireEndDate)
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Parameter | Type | Description |
|
|
15
|
+
|-----------|------|-------------|
|
|
16
|
+
| `startDate` | String | Start date (ISO 8601 format) |
|
|
17
|
+
| `endDate` | String | End date (ISO 8601 format) |
|
|
18
|
+
| `requireEndDate` | Number | If 1, returns NaN when endDate is missing |
|
|
19
|
+
|
|
20
|
+
## Returns
|
|
21
|
+
|
|
22
|
+
String - The number of days between the two dates. Negative if endDate is before startDate.
|
|
23
|
+
|
|
24
|
+
## Description
|
|
25
|
+
|
|
26
|
+
The `datedaydifference` function calculates how many days have elapsed between two dates. The result is positive when endDate is after startDate, and negative otherwise.
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
### Basic Usage
|
|
31
|
+
|
|
32
|
+
```expression
|
|
33
|
+
Result = datedaydifference("2023-08-10T05:00:00.000Z", "2023-08-11T05:00:00.000Z")
|
|
34
|
+
// Result: "1"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### With Variables
|
|
38
|
+
|
|
39
|
+
```expression
|
|
40
|
+
Result = datedaydifference(StartDate, EndDate)
|
|
41
|
+
// With StartDate = "2023-08-10T05:00:00.000Z", EndDate = "2023-08-11T05:00:00.000Z"
|
|
42
|
+
// Result: "1"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Negative Result
|
|
46
|
+
|
|
47
|
+
```expression
|
|
48
|
+
// When end date is before start date
|
|
49
|
+
Result = datedaydifference("2023-08-15T05:00:00.000Z", "2023-08-10T05:00:00.000Z")
|
|
50
|
+
// Result: "-5"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Requiring End Date
|
|
54
|
+
|
|
55
|
+
```expression
|
|
56
|
+
// Returns NaN if end date is missing when required
|
|
57
|
+
Result = datedaydifference(StartDate, EndDate, 1)
|
|
58
|
+
// With EndDate undefined
|
|
59
|
+
// Result: "NaN"
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Use Cases
|
|
63
|
+
|
|
64
|
+
- **Age calculation**: Days since birth or event
|
|
65
|
+
- **Project tracking**: Days until deadline
|
|
66
|
+
- **Billing**: Calculate billing periods
|
|
67
|
+
- **SLA monitoring**: Days since ticket opened
|
|
68
|
+
|
|
69
|
+
## Related Functions
|
|
70
|
+
|
|
71
|
+
- [datemilliseconddifference](./datemilliseconddifference.md) - Difference in milliseconds
|
|
72
|
+
- [dateseconddifference](./dateseconddifference.md) - Difference in seconds
|
|
73
|
+
- [dateminutedifference](./dateminutedifference.md) - Difference in minutes
|
|
74
|
+
- [datehourdifference](./datehourdifference.md) - Difference in hours
|
|
75
|
+
- [dateweekdifference](./dateweekdifference.md) - Difference in weeks
|
|
76
|
+
- [datemonthdifference](./datemonthdifference.md) - Difference in months
|
|
77
|
+
- [dateyeardifference](./dateyeardifference.md) - Difference in years
|
|
78
|
+
- [dateadddays](./dateadddays.md) - Add days to a date
|
|
79
|
+
|
|
80
|
+
## Notes
|
|
81
|
+
|
|
82
|
+
- Uses ISO 8601 date format
|
|
83
|
+
- Result can be negative
|
|
84
|
+
- Uses the Dates service internally
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# datefromparts
|
|
2
|
+
|
|
3
|
+
Creates a date from individual year, month, day (and optionally time) components.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
datefromparts(year, month, day)
|
|
9
|
+
datefromparts(year, month, day, hour, minute, second, millisecond)
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Parameter | Type | Description |
|
|
15
|
+
|-----------|------|-------------|
|
|
16
|
+
| `year` | Number | Four-digit year |
|
|
17
|
+
| `month` | Number | Month (1-12) |
|
|
18
|
+
| `day` | Number | Day of month (1-31) |
|
|
19
|
+
| `hour` | Number | Hour (0-23), optional |
|
|
20
|
+
| `minute` | Number | Minute (0-59), optional |
|
|
21
|
+
| `second` | Number | Second (0-59), optional |
|
|
22
|
+
| `millisecond` | Number | Millisecond (0-999), optional |
|
|
23
|
+
|
|
24
|
+
## Returns
|
|
25
|
+
|
|
26
|
+
String - An ISO 8601 formatted date string.
|
|
27
|
+
|
|
28
|
+
## Description
|
|
29
|
+
|
|
30
|
+
The `datefromparts` function constructs a date from individual components. This is useful when you have date parts stored separately or need to build a specific date programmatically.
|
|
31
|
+
|
|
32
|
+
## Examples
|
|
33
|
+
|
|
34
|
+
### Date Only
|
|
35
|
+
|
|
36
|
+
```expression
|
|
37
|
+
DateFromPartsExample = DATEFROMPARTS(2025, 4, 1)
|
|
38
|
+
// Result: "2025-04-01T00:00:00.000Z"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### With Time Components
|
|
42
|
+
|
|
43
|
+
```expression
|
|
44
|
+
DateFromPartsExample = DATEFROMPARTS(2025, 4, 1, 13, 03, 51, 761)
|
|
45
|
+
// Result: "2025-04-01T13:03:51.761Z"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Combined with Date Math
|
|
49
|
+
|
|
50
|
+
```expression
|
|
51
|
+
// Create a date then add days
|
|
52
|
+
FutureDate = DATEADDDAYS(DATEFROMPARTS(2025, 4, 1, 13, 03, 51, 761), 87)
|
|
53
|
+
// Result: "2025-06-27T13:03:51.761Z"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### With Variables
|
|
57
|
+
|
|
58
|
+
```expression
|
|
59
|
+
EventDate = DATEFROMPARTS(EventYear, EventMonth, EventDay)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Use Cases
|
|
63
|
+
|
|
64
|
+
- **Form processing**: Build dates from separate input fields
|
|
65
|
+
- **Report generation**: Create specific dates for reports
|
|
66
|
+
- **Data migration**: Convert separate date columns to dates
|
|
67
|
+
- **Scheduling**: Construct dates for calendar events
|
|
68
|
+
|
|
69
|
+
## Related Functions
|
|
70
|
+
|
|
71
|
+
- [dateadddays](./dateadddays.md) - Add days to a date
|
|
72
|
+
- [dateaddmonths](./dateaddmonths.md) - Add months to a date
|
|
73
|
+
- [dateaddyears](./dateaddyears.md) - Add years to a date
|
|
74
|
+
- [datedaydifference](./datedaydifference.md) - Calculate day difference
|
|
75
|
+
|
|
76
|
+
## Notes
|
|
77
|
+
|
|
78
|
+
- Month is 1-based (January = 1, December = 12)
|
|
79
|
+
- Returns ISO 8601 formatted string (UTC)
|
|
80
|
+
- Time components default to 0 if not provided
|
|
81
|
+
- Uses the Dates service internally
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# datehourdifference
|
|
2
|
+
|
|
3
|
+
Calculates the difference between two dates in hours.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
datehourdifference(startDate, endDate)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `startDate` | String | Start date (ISO 8601 format) |
|
|
16
|
+
| `endDate` | String | End date (ISO 8601 format) |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
String - The number of hours between the two dates.
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `datehourdifference` function calculates how many hours have elapsed between two dates. The result is positive when endDate is after startDate, and negative otherwise.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
Result = DATEHOURDIFFERENCE("2025-04-01T08:00:00.000Z", "2025-04-01T17:00:00.000Z")
|
|
32
|
+
// Result: "9"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### SLA Tracking
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
HoursSinceCreated = DATEHOURDIFFERENCE(TicketCreated, Now)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Work Hours
|
|
42
|
+
|
|
43
|
+
```expression
|
|
44
|
+
HoursWorked = DATEHOURDIFFERENCE(ClockIn, ClockOut)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Use Cases
|
|
48
|
+
|
|
49
|
+
- **SLA monitoring**: Hours since ticket opened
|
|
50
|
+
- **Time tracking**: Work hours calculation
|
|
51
|
+
- **Scheduling**: Hours until deadline
|
|
52
|
+
- **Billing**: Hourly billing calculations
|
|
53
|
+
|
|
54
|
+
## Related Functions
|
|
55
|
+
|
|
56
|
+
- [dateminutedifference](./dateminutedifference.md) - Difference in minutes
|
|
57
|
+
- [datedaydifference](./datedaydifference.md) - Difference in days
|
|
58
|
+
- [dateaddhours](./dateaddhours.md) - Add hours to a date
|
|
59
|
+
|
|
60
|
+
## Notes
|
|
61
|
+
|
|
62
|
+
- Uses ISO 8601 date format
|
|
63
|
+
- Result can be negative
|
|
64
|
+
- Uses the Dates service internally
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# datemathadd
|
|
2
|
+
|
|
3
|
+
Generic date math function for adding time units to a date.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
datemathadd(date, amount, unit)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `date` | String | Starting date (ISO 8601 format) |
|
|
16
|
+
| `amount` | Number | Amount to add (can be negative) |
|
|
17
|
+
| `unit` | String | Time unit ('days', 'months', 'years', etc.) |
|
|
18
|
+
|
|
19
|
+
## Returns
|
|
20
|
+
|
|
21
|
+
String - The resulting date in ISO 8601 format.
|
|
22
|
+
|
|
23
|
+
## Description
|
|
24
|
+
|
|
25
|
+
The `datemathadd` function provides a generic way to add various time units to a date. This is an alternative to the specific functions like `dateadddays`, `dateaddmonths`, etc.
|
|
26
|
+
|
|
27
|
+
## Examples
|
|
28
|
+
|
|
29
|
+
### Add Days
|
|
30
|
+
|
|
31
|
+
```expression
|
|
32
|
+
Result = DATEMATHADD("2025-04-01T00:00:00.000Z", 10, "days")
|
|
33
|
+
// Result: "2025-04-11T00:00:00.000Z"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Add Months
|
|
37
|
+
|
|
38
|
+
```expression
|
|
39
|
+
Result = DATEMATHADD("2025-04-01T00:00:00.000Z", 3, "months")
|
|
40
|
+
// Result: "2025-07-01T00:00:00.000Z"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Subtract Years
|
|
44
|
+
|
|
45
|
+
```expression
|
|
46
|
+
Result = DATEMATHADD("2025-04-01T00:00:00.000Z", -5, "years")
|
|
47
|
+
// Result: "2020-04-01T00:00:00.000Z"
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### With Variable Unit
|
|
51
|
+
|
|
52
|
+
```expression
|
|
53
|
+
NewDate = DATEMATHADD(StartDate, Amount, TimeUnit)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Use Cases
|
|
57
|
+
|
|
58
|
+
- **Dynamic date math**: Unit specified at runtime
|
|
59
|
+
- **Generic calculations**: Flexible time operations
|
|
60
|
+
- **Configuration-based**: Configurable time adjustments
|
|
61
|
+
|
|
62
|
+
## Related Functions
|
|
63
|
+
|
|
64
|
+
- [dateadddays](./dateadddays.md) - Specific day addition
|
|
65
|
+
- [dateaddmonths](./dateaddmonths.md) - Specific month addition
|
|
66
|
+
- [dateaddyears](./dateaddyears.md) - Specific year addition
|
|
67
|
+
|
|
68
|
+
## Notes
|
|
69
|
+
|
|
70
|
+
- Supports various time units
|
|
71
|
+
- Negative values subtract
|
|
72
|
+
- Uses the Dates service internally
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# datemilliseconddifference
|
|
2
|
+
|
|
3
|
+
Calculates the difference between two dates in milliseconds.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
datemilliseconddifference(startDate, endDate)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `startDate` | String | Start date (ISO 8601 format) |
|
|
16
|
+
| `endDate` | String | End date (ISO 8601 format) |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
String - The number of milliseconds between the two dates.
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `datemilliseconddifference` function calculates how many milliseconds have elapsed between two dates. The result is positive when endDate is after startDate, and negative otherwise.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
Result = DATEMILLISECONDDIFFERENCE("2025-04-01T10:00:00.000Z", "2025-04-01T10:00:00.500Z")
|
|
32
|
+
// Result: "500"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Performance Measurement
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
ExecutionTime = DATEMILLISECONDDIFFERENCE(StartTime, EndTime)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Precise Timing
|
|
42
|
+
|
|
43
|
+
```expression
|
|
44
|
+
LatencyMs = DATEMILLISECONDDIFFERENCE(RequestTime, ResponseTime)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Use Cases
|
|
48
|
+
|
|
49
|
+
- **Performance profiling**: Precise execution times
|
|
50
|
+
- **Latency measurement**: Network latency
|
|
51
|
+
- **Animation timing**: Frame durations
|
|
52
|
+
- **Benchmarking**: Comparing execution speeds
|
|
53
|
+
|
|
54
|
+
## Related Functions
|
|
55
|
+
|
|
56
|
+
- [dateseconddifference](./dateseconddifference.md) - Difference in seconds
|
|
57
|
+
- [dateaddmilliseconds](./dateaddmilliseconds.md) - Add milliseconds to a date
|
|
58
|
+
|
|
59
|
+
## Notes
|
|
60
|
+
|
|
61
|
+
- Uses ISO 8601 date format
|
|
62
|
+
- Result can be negative
|
|
63
|
+
- Highest precision time difference
|
|
64
|
+
- Uses the Dates service internally
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# dateminutedifference
|
|
2
|
+
|
|
3
|
+
Calculates the difference between two dates in minutes.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
dateminutedifference(startDate, endDate)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `startDate` | String | Start date (ISO 8601 format) |
|
|
16
|
+
| `endDate` | String | End date (ISO 8601 format) |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
String - The number of minutes between the two dates.
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `dateminutedifference` function calculates how many minutes have elapsed between two dates. The result is positive when endDate is after startDate, and negative otherwise.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
Result = DATEMINUTEDIFFERENCE("2025-04-01T10:00:00.000Z", "2025-04-01T10:45:00.000Z")
|
|
32
|
+
// Result: "45"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Meeting Duration
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
MeetingLength = DATEMINUTEDIFFERENCE(MeetingStart, MeetingEnd)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Time Until Event
|
|
42
|
+
|
|
43
|
+
```expression
|
|
44
|
+
MinutesUntilStart = DATEMINUTEDIFFERENCE(Now, EventStart)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Use Cases
|
|
48
|
+
|
|
49
|
+
- **Meeting tracking**: Duration calculations
|
|
50
|
+
- **Response time**: Minutes to respond
|
|
51
|
+
- **Scheduling**: Time intervals
|
|
52
|
+
- **Performance**: Duration metrics
|
|
53
|
+
|
|
54
|
+
## Related Functions
|
|
55
|
+
|
|
56
|
+
- [dateseconddifference](./dateseconddifference.md) - Difference in seconds
|
|
57
|
+
- [datehourdifference](./datehourdifference.md) - Difference in hours
|
|
58
|
+
- [dateaddminutes](./dateaddminutes.md) - Add minutes to a date
|
|
59
|
+
|
|
60
|
+
## Notes
|
|
61
|
+
|
|
62
|
+
- Uses ISO 8601 date format
|
|
63
|
+
- Result can be negative
|
|
64
|
+
- Uses the Dates service internally
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# datemonthdifference
|
|
2
|
+
|
|
3
|
+
Calculates the difference between two dates in months.
|
|
4
|
+
|
|
5
|
+
## Syntax
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
datemonthdifference(startDate, endDate)
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Parameters
|
|
12
|
+
|
|
13
|
+
| Parameter | Type | Description |
|
|
14
|
+
|-----------|------|-------------|
|
|
15
|
+
| `startDate` | String | Start date (ISO 8601 format) |
|
|
16
|
+
| `endDate` | String | End date (ISO 8601 format) |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
String - The number of months between the two dates.
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
The `datemonthdifference` function calculates how many months have elapsed between two dates. The result is positive when endDate is after startDate, and negative otherwise.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### Basic Usage
|
|
29
|
+
|
|
30
|
+
```expression
|
|
31
|
+
Result = DATEMONTHDIFFERENCE("2025-01-15T00:00:00.000Z", "2025-04-15T00:00:00.000Z")
|
|
32
|
+
// Result: "3"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Negative Result
|
|
36
|
+
|
|
37
|
+
```expression
|
|
38
|
+
Result = DATEMONTHDIFFERENCE("2025-06-01T00:00:00.000Z", "2025-01-01T00:00:00.000Z")
|
|
39
|
+
// Result: "-5"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Subscription Length
|
|
43
|
+
|
|
44
|
+
```expression
|
|
45
|
+
MonthsSubscribed = DATEMONTHDIFFERENCE(SubscriptionStart, Today)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Use Cases
|
|
49
|
+
|
|
50
|
+
- **Subscriptions**: Calculate subscription duration
|
|
51
|
+
- **Billing**: Monthly billing periods
|
|
52
|
+
- **Age**: Age in months
|
|
53
|
+
- **Project tracking**: Project duration
|
|
54
|
+
|
|
55
|
+
## Related Functions
|
|
56
|
+
|
|
57
|
+
- [datedaydifference](./datedaydifference.md) - Difference in days
|
|
58
|
+
- [dateweekdifference](./dateweekdifference.md) - Difference in weeks
|
|
59
|
+
- [dateyeardifference](./dateyeardifference.md) - Difference in years
|
|
60
|
+
- [dateaddmonths](./dateaddmonths.md) - Add months to a date
|
|
61
|
+
|
|
62
|
+
## Notes
|
|
63
|
+
|
|
64
|
+
- Uses ISO 8601 date format
|
|
65
|
+
- Result can be negative
|
|
66
|
+
- Uses the Dates service internally
|