From 49ce8198c17841ff563e1f682c045c08c9dc82b1 Mon Sep 17 00:00:00 2001 From: Alex Schroeder Date: Wed, 22 Feb 2006 22:21:35 +0000 Subject: [PATCH] new --- modules/today.pl | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 modules/today.pl diff --git a/modules/today.pl b/modules/today.pl new file mode 100644 index 00000000..32b94bd3 --- /dev/null +++ b/modules/today.pl @@ -0,0 +1,29 @@ +# Copyright (C) 2006 Alex Schroeder +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the +# Free Software Foundation, Inc. +# 59 Temple Place, Suite 330 +# Boston, MA 02111-1307 USA + +$ModulesDescription .= '

$Id: today.pl,v 1.1 2006/02/22 22:21:35 as Exp $

'; + +# New Action + +$Action{new} = \&DoNew; + +sub DoNew { + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime(); + my $today = sprintf("%d-%02d-%02d", $year + 1900, $mon + 1, $mday); + DoEdit($today); +}