# TimeConversionOptions

Options for how to convert time to a different unit.

- Source: [`core/lib/duration.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/core/lib/duration.ts#L298)

## Example

TypeScript:

```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:

```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:

```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();
```

C# / .NET:

```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
};
```

Golang:

```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

- `integral`: boolean = true — If `true`, conversions into a larger time unit (e.g. `Seconds` to `Minutes`) will fail if the result is not an integer.
