root/lang/perl/blosxom/plugins/old @ 30075

Revision 30075, 0.7 kB (checked in by nyarla, 5 years ago)

oldプラグインに著者表記を追加

Line 
1# Blosxom Plugin:   old
2# Author:           Naoki Okamura (Nyarla) <thotep@nyarla.net>
3# Version:          2009-02-10
4# License:          public domain
5
6package old;
7
8use strict;
9use warnings;
10
11# -- package variables --------------- #
12
13my $today = time;
14
15our ( $year, $month, $day, $hr, $min, $sec );
16
17# ------------------------------------ #
18
19sub start { 1 }
20
21sub date {
22    my ( $class, $path, $date_ref, $mtime, $dw, $mo, $mo_num, $da, $ti, $yr ) = @_;
23
24    $sec = $today - $mtime;
25
26    $year   = int( $sec / 31556926 );
27    $month  = int( $sec /  2629744 );
28    $day    = int( $sec /    86400 );
29    $hr     = int( $sec /     3600 );
30    $min    = int( $sec /       60 );
31}
32
331;
Note: See TracBrowser for help on using the browser.