Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

paulm (5067)

  (email not shown publicly)

Hello! I'm Paul Makepeace [], a regular on []. Perl's my primary language I code in (since '95 I think); people even pay me [] for it! Although I'd say I'm a developer I spend a substantial chunk of time being a sysadmin for my own machines (I'm also one of's root), all Debian boxen.

This journal is my first foray into a technical annotation of my perl life...

Journal of paulm (5067)

Monday February 14, 2005
11:22 AM

25 hours in a day

[ #23190 ]

sub days_between($$) {
    (str2time($_[1])-str2time($_[0])) / SECONDS_IN_A_DAY;

Seems obvious enough. Then some results were non-integer. Boiled down to,

$ perl -MDate::Parse -le 'print ((str2time($ARGV[1])-str2time($ARGV[0]))/86400)' 2004-10-31  2004-11-01

Why? Ah, Daylight savings!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.