Skip to content

Commit a388e49

Browse files
committed
add epoch functions to summary
1 parent 7f4ae1e commit a388e49

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

articles/azure-resource-manager/bicep/bicep-functions-date.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@ An ISO 8601 datetime string.
9797

9898
### Remarks
9999

100-
This function requires **Bicep version 0.5.5 or later**.
100+
This function requires **Bicep version 0.5.6 or later**.
101101

102102
### Example
103103

104104
The following example shows output values for the epoch time functions.
105105

106106
```bicep
107-
param convertToEpoch int = dateTimeToEpoch(dateTimeAdd(utcNow(), 'P1Y'))
107+
param convertedEpoch int = dateTimeToEpoch(dateTimeAdd(utcNow(), 'P1Y'))
108108
109-
var convertToDatetime = dateTimeFromEpoch(convertToEpoch)
109+
var convertedDatetime = dateTimeFromEpoch(convertedEpoch)
110110
111-
output epochValue int = convertToEpoch
112-
output datetimeValue string = convertToDatetime
111+
output epochValue int = convertedEpoch
112+
output datetimeValue string = convertedDatetime
113113
```
114114

115115
The output is:
@@ -119,7 +119,6 @@ The output is:
119119
| datetimeValue | String | 2023-05-02T15:16:13Z |
120120
| epochValue | Int | 1683040573 |
121121

122-
123122
## dateTimeToEpoch
124123

125124
`dateTimeToEpoch(dateTime)`
@@ -140,19 +139,19 @@ An integer that represents the number of seconds from midnight on January 1, 197
140139

141140
### Remarks
142141

143-
This function requires **Bicep version 0.5.5 or later**.
142+
This function requires **Bicep version 0.5.6 or later**.
144143

145144
### Examples
146145

147146
The following example shows output values for the epoch time functions.
148147

149148
```bicep
150-
param convertToEpoch int = dateTimeToEpoch(dateTimeAdd(utcNow(), 'P1Y'))
149+
param convertedEpoch int = dateTimeToEpoch(dateTimeAdd(utcNow(), 'P1Y'))
151150
152-
var convertToDatetime = dateTimeFromEpoch(convertToEpoch)
151+
var convertedDatetime = dateTimeFromEpoch(convertedEpoch)
153152
154-
output epochValue int = convertToEpoch
155-
output datetimeValue string = convertToDatetime
153+
output epochValue int = convertedEpoch
154+
output datetimeValue string = convertedDatetime
156155
```
157156

158157
The output is:

articles/azure-resource-manager/bicep/bicep-functions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Bicep functions
33
description: Describes the functions to use in a Bicep file to retrieve values, work with strings and numerics, and retrieve deployment information.
44
ms.topic: conceptual
5-
ms.date: 04/12/2022
5+
ms.date: 05/02/2022
66
---
77

88
# Bicep functions
@@ -56,6 +56,8 @@ The following functions are available for working with arrays. All of these func
5656
The following functions are available for working with dates. All of these functions are in the `sys` namespace.
5757

5858
* [dateTimeAdd](./bicep-functions-date.md#datetimeadd)
59+
* [dateTimeFromEpoch](./bicep-functions-date.md#datetimefromepoch)
60+
* [dateTimeToEpoch](./bicep-functions-date.md#datetimetoepoch)
5961
* [utcNow](./bicep-functions-date.md#utcnow)
6062

6163
## Deployment value functions

0 commit comments

Comments
 (0)