Gerryjun, as the others have stated, you need to use
localtime. The function localtime is usually called like so:
($secs,$mins,$hrs,$dom,$moy,$yrs,$dow,$juldays,$dst) = localtime $reft
+ime;
$secs: seconds
$mins: minutes
$hrs: hours (military 24hr)
$dom: day of month
$moy: month of year (values 0-11, 0=jan)
$yrs: years since 1900
$dow: day of week (values 0-6, 0=sun)
$juldays: number of days since jan 1, current year
$dst: using daylight savings time (0=no, 1=yes)
The function time() returns the number of seconds since Jan 1, 1970.
BTW, the $refdate you gave (102049345) is for Monday, March 26, 1973.
$secs: 25
$mins: 2
$hrs: 21
$dom: 26
$moy: 2
$yrs: 73
$dow: 1
$juldays: 84
$dst: 0
If you start out with a reference date like the value
returned by time (your example: 102049345) and you say:
$wklater = $reftime + 60*60*24*6
$wklater can then be passed to localtime and you can build
the text string you want:
($secs,$mins,$hrs,$dom,$moy,$yrs,$dow,$juldays,$dst) = localtime $wkla
+ter;
Hint: Build a few array constants to return the string
parts ($dow[1]="Monday", $moy[11]="December").
--Jim |