PERL:



PERL: - . 105


$bree = 361535725, # 04 35 25 16 1981 $nat = 96201950, # 03 45 50 18 1973

$difference = $bree - $nat,

print There were Sdifference seconds between Nat and Bree\n ,

There were 266802575 seconds between Nat and Bree

Sseconds = Sdifference % 60,

Sdifference = (Sdifference - Sseconds) / 60

Sminutes = Sdifference % 60,

Sdifference = (Sdifference - Sminutes) / 60,

Shours = Sdifference $ 24,

Sdifference = (Sdifference - Shours) / 24,

Sdays = Sdifference % 7,

$weeks = (Sdifference - Sdays) / 7,

print (Sweeks weeks, Sdays days, Shours Sminutes $seconds)\n , (441 weeks, 0 days, 23: 49: 35)

Date::Calc . Delta_Days . // , .

> ---------------------------------------------------------------------------------------------

Date::Calc CPAN.

3.6. //

, . . , /­/ .

, , ­ localtime. .


3.6. //ࠠ 103

(SMONTHDAY, $WEEKDAY, $YEARDAY) = (localtime $DATE) [3,6,7], $WEEKNUM = mt($YEARDAY / 7) + 1,

(. 3.3) . Day_of_Week, Week_Number Day_of_Year Date::Calc CPAN:

use Date Calc qw(Day_of_Week Week_Number Day_of_Year),

# - $year, Smonth $day