From 8aae2f622c489574b341130440241fc75eec90b9 Mon Sep 17 00:00:00 2001 From: Yader Velásquez Date: Tue, 24 Aug 2010 02:29:39 +0000 Subject: date functions --- (limited to 'fecha.py') diff --git a/fecha.py b/fecha.py index 5009c10..dc12746 100644 --- a/fecha.py +++ b/fecha.py @@ -24,6 +24,11 @@ def fecha(): fecha = datetime.today() return fecha.strftime("%d de %B de %Y") +def fecha_cadena(): + '''return a string of the date''' + fecha = datetime.today() + return fecha.strftime("%y-%b-%d") + class Fecha(object): '''a simple class for get and convert date''' @@ -42,4 +47,4 @@ class Fecha(object): self.fecha_unix = mktime(self.fecha.timetuple()) self.fecha_unix = int(self.fecha_unix) return strftime("%d de %b de %Y", localtime(self.fecha_unix)) - + -- cgit v0.9.1