Skip to content

Instantly share code, notes, and snippets.

@mgdelacroix
Created April 5, 2011 15:22
Show Gist options
  • Save mgdelacroix/903820 to your computer and use it in GitHub Desktop.
Save mgdelacroix/903820 to your computer and use it in GitHub Desktop.
Averiguar los días de semana a partir de una fecha
import datetime
diccionario = {'MONDAY':'Lunes','TUESDAY':'Martes','WEDNESDAY':'Miercoles','THURSDAY':'Jueves', 'FRIDAY':'Viernes','SATURNDAY':'Sabado','SUNDAY':'Domingo'}
fecha = datetime.date(2011, 4, 6)
diaSemana = diccionario[fecha.strftime('%A').upper()]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment