欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

perl獲取日期與時間的實例代碼

 更新時間:2013年02月09日 23:29:32   作者:  
perl獲取日期與時間的例子,供大家學習參考

注意:localtime獲取的年份是相對于1900的偏移,需要加上1900,而localtime獲取的month范圍是0-11,需要加1。

復制代碼 代碼如下:

#!/usr/bin/perl
my ($sec,$min,$hour,$day,$mon,$year,$wday,$yday,$isdst) = localtime();   
$year += 1900;   
$mon++;
my $date = "$year-$mon-$day";   
print $date, "\n";

相關文章

最新評論