谁能解释一下....
>strptime("19300307", "%Y%m%d")
"1930-03-07"
>unlist(strptime("19300307", "%Y%m%d"))
sec min hour mday mon year wday yday isdst
0 0 0 7 2 30 5 65 0
突然之间,我的 strptime 让我感到困惑...... 为什么 mon = 2 而不是 3?
最佳答案
按照我的评论,如果你阅读 ?DateTimeClasses
,你会看到对于 POSIXlt 我们有:
0–11: months after the first of the year.
关于r - strptime $mon 的日期函数问题在 R 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10941004/