Created
April 5, 2011 15:22
-
-
Save mgdelacroix/903820 to your computer and use it in GitHub Desktop.
Averiguar los días de semana a partir de una fecha
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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