API Joda-Time(java)不遵守ISO 8601:bug或功能?

ada*_*dam 0 duration jodatime

根据他们的网站,DUration类实现了ISO 8601

http://en.wikipedia.org/wiki/ISO_8601#Durations

但让我们看一个例子.持续时间为14分钟和51秒.在ISO 8601中,这些代码是等效的:

    PT14M51S
    PT891S
    System.out.println("bug "+new Duration("PT14M51S"));
     System.out.println("NO bug "+new Duration("PT891S");
Run Code Online (Sandbox Code Playgroud)

PT14M51S是postgresql数据库的真正摘录并且正确.joda-time api只是将所有内容转换为秒为什么?它似乎不知道任何东西比关键字S(theres Y,M,D ...)

提前致谢

Jod*_*hen 5

你需要:

System.out.println("bug "+new Period("PT14M51S"));
Run Code Online (Sandbox Code Playgroud)