R语言Instants瞬间
示例
瞬间是时间中的特定时刻。任何引用时间的日期时间对象都被识别为瞬间。要测试对象是否为瞬间,请使用is.instant。
library(lubridate)
today_start <- dmy_hms("22.07.2016 12:00:00", tz = "IST") # default tz="UTC"
today_start
## [1] "2016-07-22 12:00:00 IST"
is.instant(today_start)
## [1] TRUE
now_dt <- ymd_hms(now(), tz="IST")
now_dt
## [1] "2016-07-22 13:53:09 IST"
is.instant(now_dt)
## [1] TRUE
is.instant("helloworld")
## [1] FALSE
is.instant(60)
## [1] FALSE
热门推荐
2 破五的祝福语简短
10 高考成绩高分祝福语简短
11 毕业女孩祝福语简短独特
12 妈咪跟我生日祝福语简短
13 国庆祝福语简单简短
14 牛年公司新年祝福语简短
15 老人去世简短祝福语
16 六一祝福语简短十六字
17 父亲婚礼祝福语经典简短
18 朋友生闺女简短祝福语