diff options
Diffstat (limited to 'fecha.py')
-rw-r--r-- | fecha.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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)) - + |