---
title: DateComponentsFormatter.ZeroFormattingBehavior
framework: foundation
role: symbol
role_heading: Structure
path: foundation/datecomponentsformatter/zeroformattingbehavior-swift.struct
---

# DateComponentsFormatter.ZeroFormattingBehavior

Formatting constants for when values contain zeroes.

## Declaration

```swift
struct ZeroFormattingBehavior
```

## Topics

### Constants

- [default](foundation/datecomponentsformatter/zeroformattingbehavior-swift.struct/default.md)
- [dropLeading](foundation/datecomponentsformatter/zeroformattingbehavior-swift.struct/dropleading.md)
- [dropMiddle](foundation/datecomponentsformatter/zeroformattingbehavior-swift.struct/dropmiddle.md)
- [dropTrailing](foundation/datecomponentsformatter/zeroformattingbehavior-swift.struct/droptrailing.md)
- [dropAll](foundation/datecomponentsformatter/zeroformattingbehavior-swift.struct/dropall.md)
- [pad](foundation/datecomponentsformatter/zeroformattingbehavior-swift.struct/pad.md)

### Initializers

- [init(rawValue:)](foundation/datecomponentsformatter/zeroformattingbehavior-swift.struct/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [ExpressibleByArrayLiteral](swift/expressiblebyarrayliteral.md)
- [OptionSet](swift/optionset.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)
- [SetAlgebra](swift/setalgebra.md)

## See Also

### Constants

- [DateComponentsFormatter.UnitsStyle](foundation/datecomponentsformatter/unitsstyle-swift.enum.md)
