[Affelio-cvs 285] CVS update: affelio/lib/Affelio/misc

Back to archive index

Tadashi Okoshi slash****@users*****
2005年 6月 30日 (木) 01:07:44 JST


Index: affelio/lib/Affelio/misc/Time.pm
diff -u affelio/lib/Affelio/misc/Time.pm:1.4 affelio/lib/Affelio/misc/Time.pm:1.5
--- affelio/lib/Affelio/misc/Time.pm:1.4	Wed Jun 29 19:40:17 2005
+++ affelio/lib/Affelio/misc/Time.pm	Thu Jun 30 01:07:44 2005
@@ -4,14 +4,14 @@
 #    http://affelio.jp/ (Japan)
 #    http://affelio.jp/ (USA and other area)
 #
-# $Id: Time.pm,v 1.4 2005/06/29 10:40:17 slash5234 Exp $
+# $Id: Time.pm,v 1.5 2005/06/29 16:07:44 slash5234 Exp $
 
 package Affelio::misc::Time;
 {
     use strict;
     use Exporter;
     @Affelio::misc::Time::ISA = "Exporter";
-    @Affelio::misc::Time::EXPORT = qw (get_today get_timestamp get_past_timestamp get_expire_stamp timestamp2string);
+    @Affelio::misc::Time::EXPORT = qw (get_today get_timestamp get_past_timestamp get_expire_stamp timestamp2string timestamp2stringB);
 
     sub timestamp2string{
 	my $timestamp = shift;
@@ -26,6 +26,19 @@
 	return("$year/$mon/$mday $hour:$min");
     }
 
+    sub timestamp2stringB{
+	my $timestamp = shift;
+
+	my $mon  = substr ($timestamp, 4, 2);
+	my $mday = substr ($timestamp, 6, 2);
+	my $hour = substr ($timestamp, 8, 2);
+	my $min  = substr ($timestamp, 10, 2);
+	my $sec  = substr ($timestamp, 12, 2);
+
+	return("$mon/$mday $hour:$min");
+    }
+
+
 
     sub get_timestamp{
 	my ($sec, $min, $hour, $mday, $mon, $year,


Affelio-cvs メーリングリストの案内
Back to archive index