Im using the joda time library in my scala code. My code is as follows .
val dt:DateTime = new DateTime()
val dtf:DateTimeFormatter = DateTimeFormat.forPattern("yyyy-mm-dd")
return dtf.print(dt.minusDays(1))
Assuming the current date is March 11 2011,the above code should return the string 2011-03-10,but the output i get is 2011-52-10
What could be causing this problem ?
Please Help Thank You
在DateTimeFormat
,模式mm
为分钟,使用MM
月。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.