学习资源:https://zhuanlan.zhihu.com/p/30436665
R包:lubridate
解析日期与时间
ymd_hm(201805260300)
2018-05-26 06:00:00
操作日期与时间
year()
month()
yday() # day of year
mday() # day of week
wday()
hour()
tz()
now() # 当前的系统时间
日期时间的数学运算
is.instant() # 判断是否是时点数据
floor_date(), ceiling_date(), round_date() # 模糊取整
dminutes(1) # Time difference of 1 mins
dseconds(60) # Time difference of 60 seconds
months(3) # 3 months
with_tz() # 改变时区