Ignore:
Timestamp:
2011-08-02 13:07:44 (8 years ago)
Author:
tekrjant
Message:

Viikonpäivä näkyy suomeksi.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2011/31/build_games.py

    r2491 r2492  
    6868 
    6969 
     70def get_weekday_name(n): 
     71        if n == 0: return "Maanantai" 
     72        if n == 1: return "Tiistai" 
     73        if n == 2: return "Keskiviikko" 
     74        if n == 3: return "Torstai" 
     75        if n == 4: return "Perjantai" 
     76        if n == 5: return "Lauantai" 
     77        if n == 6: return "Sunnuntai" 
     78        raise Exception("Invalid weekday number") 
     79 
    7080def write_result(author, name, success, last_changed_date): 
    7181        global counter 
     
    7787                        result = "fail" 
    7888                f.write(result+"\n") 
    79                 formatted_time = last_changed_date.strftime("%H:%M") 
     89                formatted_time = get_weekday_name(last_changed_date.weekday()) + last_changed_date.strftime(" %H:%M") 
    8090                f.write(formatted_time+"\n") 
    8191        counter += 1 
Note: See TracChangeset for help on using the changeset viewer.