Displaying “negative” time periods with Joda-Time PeriodFormatter
问题 I'm using joda-time (1.6.2) on a project and one of the things I'm doing is getting the difference between a predicted time and an actual time. Sometimes this difference is positive, sometimes negative. While the appropriate approach may be to use a Duration rather than a Period , using a PeriodFormatter to display the result led me a question about the PeriodFormatterBuilder class. As an example: DateTime d1 = new DateTime(2011, 6, 17, 13, 13, 5, 0) ; DateTime d2 = new DateTime(2011, 6, 17,