# Package org.springframework.format.annotation

@NonNullApi @NonNullFields package org.springframework.format.annotation
Annotations for declaratively configuring field and parameter formatting rules.

Related Packages
Package
Description
org.springframework.format
An API for defining Formatters to format field model values for display in a UI.
org.springframework.format.datetime
Formatters for `java.util.Date` properties.
org.springframework.format.number
Formatters for `java.lang.Number` properties.
org.springframework.format.support
Support classes for the formatting package, providing common implementations as well as adapters.
Class
Description
DateTimeFormat
Declares that a field or method parameter should be formatted as a date or time.
DateTimeFormat.ISO
Common ISO date time format patterns.
DurationFormat
Declares that a field or method parameter should be formatted as a `Duration`, according to the specified `Style` and `Unit`.
DurationFormat.Style
`Duration` format styles.
DurationFormat.Unit
`Duration` format unit, which mirrors a subset of `ChronoUnit` and allows conversion to and from a supported `ChronoUnit` as well as conversion from durations to longs.
NumberFormat
Declares that a field or method parameter should be formatted as a number.
NumberFormat.Style
Common number format styles.