TimeConversionOptions Struct
Options for how to convert time to a different unit.
| Source | core/lib/duration.ts |
|---|
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
const timeConversionOptions: cdk.TimeConversionOptions = {
integral: false,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
time_conversion_options = cdk.TimeConversionOptions(
integral=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.*;
TimeConversionOptions timeConversionOptions = TimeConversionOptions.builder()
.integral(false)
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
var timeConversionOptions = new TimeConversionOptions {
Integral = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import cdk "github.com/aws/aws-cdk-go/awscdk"
timeConversionOptions := &TimeConversionOptions{
Integral: jsii.Boolean(false),
}
Properties
integraloptionalbooleanintegraloptionalboolintegraloptionalBooleanIntegraloptionalboolIntegraloptional*bool = true #If `true`, conversions into a larger time unit (e.g. `Seconds` to `Minutes`) will fail if the result is not an integer.