---
title: pad
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/datecomponentsformatter/zeroformattingbehavior-swift.struct/pad
---

# pad

The add padding zeroes behavior. This behavior pads values with zeroes as appropriate. For example, consider the value of one hour formatted using the positional and abbreviated unit styles. When days, hours, minutes, and seconds are allowed, the value is displayed as “0d 1:00:00” using the positional style, and as “0d 1h 0m 0s” using the abbreviated style.

## Declaration

```swift
static var pad: DateComponentsFormatter.ZeroFormattingBehavior { get }
```

## See Also

### 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)
