-
DateTime with time interval: 时间间隔
资源介绍
名称
时间间隔-具有时间间隔的DateTime
概要
use Interval; # just export the Interval class
my $a = Interval . new ( 2020 , 1 , 1 , 0 , 0 , 0 ); # from 2020, interval of 1 hour
say $a; # 2020-01-01T00:00:00Z
$a ++ ; # 2020-01-01T01:00:00Z # one hour later
say $a . seconds; # 3600
my $b = Interval[ 60 ] . new ( time ); # from now, interval of 1 minute
say $b; # 2020-04-03T11:42:09Z
$
- 上一篇: FTP远程文件同步更新程序
- 下一篇: intervals-fn:以功能方式操纵间隔